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
}
}
}
}
}
}
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.