Help me create 3x-ui rock-on

Hi
I have this compose file.

version: ‘3.8’
services:
3x-ui:
image: Package 3x-ui · GitHub
container_name: 3x-ui
volumes:
- /volume1/docker/3x-ui:/etc/x-ui
environment:
- XRAY_VMESS_AEAD_FORCED=false
restart: unless-stopped
network_mode: host

Please help me write json for rock-ons.

@littleyo Hello again.

A good place to start is our GitHub - rockstor/rockon-registry: hosted registry for Rock-ons · GitHub which has a README.md file that explains what is needed to define a Rock-on definition. It is just a json file with set requirements, many of which are optional.

That repository also has all our existing Rock-on definition json files that can server as examples.

The above referenced repo’s README.md also links to a dedicated doc entry as follows:

Hope that helps.

1 Like

@littleyo.

Take a look at the below and start with that. I’ve added the certs directory mapping in there (so you will need to create a second share for the certs, in addition to the database one) as well as the fail2ban parameter (if you set it to false it should behave the same way your compose file does).

Then you can follow @phillxnet’s link on where to install the custom json file and how to get it updated (and removed if it doesn’t work, etc.)

I have not tested this, so let me know whether this works:

{
  "3x-ui": {
    "description": "3X-UI — advanced, open-source web-based control panel designed for managing Xray-core server. It offers a user-friendly interface for configuring and monitoring various VPN and proxy protocols.</p><p>Based on a <a href='https://github.com/mhsanaei/3x-ui/pkgs/container/3x-ui' target='_blank'>custom OCI image</a>, available for amd64 and arm64 architecture.</p>",
    "version": "1.0",
    "website": "https://github.com/MHSanaei/3x-ui",
    "ui": {
      "slug": ""
    },
    "volume_add_support": false,
    "containers": {
      "3x-ui": {
        "image": "ghcr.io/mhsanaei/3x-ui",
        "launch_order": 1,
        "ports": {
          "2053": {
            "description": "Web-UI port.",
            "label": "Web-UI port [e.g. 2053]",
            "host_default": 2053,
            "ui": true
          }
        },
        "volumes": {
          "/etc/x-ui": {
            "description": "x-ui database storage",
            "label": "Database share [e.g. 3x-ui-config]"
          },
          "/root/cert/": {
            "description": "Certificate storage",
            "label": "Certificates share [e.g. 3x-ui-certs]"
          }
        },
        "opts": [
          [
            "--net=host",
            ""
          ]
        ],
        "environment": {
          "XRAY_VMESS_AEAD_FORCED": {
            "description": "true or false",
            "label": "Enable XRAY VMESS AEAD FORCED [true/false]",
            "index": 1
          },
          "XUI_ENABLE_FAIL2BAN": {
            "description": "Enable Fail2Ban",
            "label": "Enable Fail2Ban [true/false]",
            "index": 2
          }
        }
      }
    }
  }
}
2 Likes

I had a few minutes to test the above (corrected some typos in there) proposal, and it seems to work, taking me to the login screen and into the control panel.

Thanks a lot. guys, you are the best.