![]() |
|
Guide CyberPanel Docker Manager: Run an App on Your Domain With SSL (and a Firewall Trap) - Printable Version +- AdminsForum (https://adminsforum.com) +-- Forum: Free & open-source control panels (https://adminsforum.com/Forum-free-open-source-control-panels) +--- Forum: CyberPanel (https://adminsforum.com/Forum-cyberpanel) +---- Forum: CyberPanel Guides & Tutorials (https://adminsforum.com/Forum-cyberpanel-guides-tutorials) +----- Forum: CyberPanel Docker & One-Click Apps Guides (https://adminsforum.com/Forum-cyberpanel-docker-one-click-apps-guides) +----- Thread: Guide CyberPanel Docker Manager: Run an App on Your Domain With SSL (and a Firewall Trap) (/Thread-guide-cyberpanel-docker-manager-run-an-app-on-your-domain-with-ssl-and-a-firewall-trap) |
CyberPanel Docker Manager: Run an App on Your Domain With SSL (and a Firewall Trap) - JAY - 10-27-2026 CyberPanel Docker Manager: Run an App on Your Domain With SSL (and a Firewall Trap) CyberPanel 3.0 has a built-in Docker Manager, so you can run apps that don't fit in a normal PHP website: monitoring, n8n, a small API, anything that ships as a Docker image. We tested the whole path on our lab server (CyberPanel 3.0, Ubuntu 24.04, OpenLiteSpeed): install Docker, run Uptime Kuma in a container, and put it on its own domain with a real SSL certificate. It works, but three things are not obvious from the screens:
Step 1: Install Docker In the left menu open Server and then Docker (or go straight to Code: https://YOUR-SERVER-IP:8090/docker/It installs Ubuntu's own packages: Code: docker.ioCode: docker-composeCode: docker composeCode: docker-compose-v2The Docker page after the install: You get three buttons: Manage Containers, New Container and Manage Images. Step 2: Pull the image Open Manage Images, type the app name in Search Docker Hub and press Enter. Pick the right publisher: for Uptime Kuma the official image is Code: louislam/uptime-kumaCode: 2Code: latestSearch, choose the tag, Pull: Click Pull. When it's done the image shows under Local Images. Step 3: Create the container Click Create Container, choose the image and tag, and click Create Container again. The form has four parts:
Add a volume. Click Add Volume. Host path: a folder on the server, for example Code: /opt/docker-data/uptime-kumaCode: /app/dataVolume mapping, filled in: Without this, the data sits inside the container. When you delete or re-create it (which is also how you update to a newer image), the new container starts empty. Step 4: Start it, and make it survive a reboot After Create Container the status said created, CPU and memory 0%, Restart Policy: No and Start on boot: Disabled. The container existed but wasn't running. What we got right after clicking Create Container: Scroll down to Container Actions and click Start. Then open Settings, tick Enable automatic startup and Save Settings. Leave the box "I understand that editing ENV or Volumes will recreate the container" unticked; you don't need it for this. Container Settings with automatic startup ticked (Restart Policy changed to Yes in the background): Check from SSH: Code: docker ps --format '{{.Names}} {{.Status}} {{.Ports}}'
docker inspect -f '{{.HostConfig.RestartPolicy.Name}}' uptime-kumaCode: uptime-kuma Up About a minute (healthy) 127.0.0.1:3001->3001/tcpCode: alwaysCode: curl -sI http://127.0.0.1:3001Code: /setup-databaseStep 5: Don't publish container ports to the internet The Host IP field says you can use Code: 0.0.0.0Code: 0.0.0.0Our test, with a throwaway container on port 3999: And this is what anyone on the internet saw on port 3999: That was a brand-new Uptime Kuma waiting for someone to create the admin account. Anyone who found it first could have taken it. We removed the test container right away. So: keep Host IP at Code: 127.0.0.1Step 6: Put the app on a domain with SSL OpenLiteSpeed passes the requests on to the container. You need a normal CyberPanel website for the domain:
a) vHost Conf. Click vHost Conf, scroll to the very bottom and add: Code: extprocessor uptimekuma {
type proxy
address 127.0.0.1:3001
maxConns 100
pcKeepAliveTimeout 60
initTimeout 60
retryTimeout 0
respBuffer 0
}
websocket /socket.io/ {
address 127.0.0.1:3001
}Code: uptimekumaCode: 127.0.0.1:3001The end of our vHost Conf: b) Rewrite Rules. Click Rewrite Rules. On a new website the box wasn't empty: it showed an error text, Code: cat: /home/kuma.cyber.adminslab.com/public_html/.htaccess: No such file or directoryCode: RewriteEngine On
RewriteCond %{HTTPS} !=on
RewriteRule ^(.*)$ https://%{HTTP_HOST}/$1 [R=301,L]
RewriteRule ^(.*)$ http://uptimekuma/$1 [P,L]Code: uptimekumaOur rewrite rules: Test from SSH: Code: curl -sI http://kuma.cyber.adminslab.com/ | head -3
curl -sI https://kuma.cyber.adminslab.com/ | head -3Code: 301Code: HTTP/2 302Code: location: /setup-databaseWhy the websocket block matters Many apps (Uptime Kuma, n8n, chat apps, anything "live") use WebSockets. The rewrite rule above does not pass them on; only the Code: websocketCode: wss://kuma.cyber.adminslab.com/socket.io/Code: wstestWith and without the websocket block: Without the block: Code: non-101 status codeCode: /socket.io/Code: /Step 7: Finish the app's setup right away As soon as the domain works, the app's setup page is public. Open your domain and create the admin account immediately. For Uptime Kuma: choose the database (SQLite is fine for small setups), then create the admin user. Updating the app without losing data Pull the new tag in Manage Images, then re-create the container with the same settings and the same volume. The data lives in the host folder, not in the container. We tested exactly that from SSH: deleted the container and ran a new one with the same volume. Uptime Kuma went straight to its dashboard instead of the setup page, and the database files were still there: Delete and re-create, data still there: The equivalent command, if you prefer SSH: Code: docker run -d --name uptime-kuma --restart always -m 512m \
-p 127.0.0.1:3001:3001 -v /opt/docker-data/uptime-kuma:/app/data \
louislam/uptime-kuma:2Code: /opt/docker-data/...Troubleshooting
More CyberPanel guides
|