Deploying Dokploy - Self-Hosted PaaS for Docker Applications on Ubuntu 24.04
Prerequisites
- Ubuntu 24.04 server
- Non-root sudo user
- DNS A records for two subdomains (e.g.
dokploy.example.comfor the dashboard,app.example.comfor your app)
Install Dokploy
Update packages:
$ sudo apt updateRun the installer (installs Docker if missing, sets up Swarm mode, deploys the Dokploy stack):
$ curl -sSL https://dokploy.com/install.sh | sudo shCongratulations, Dokploy is installed! Wait 15 seconds for the server to start.
Please go tohttp://YOUR-SERVER-IP:3000.Add your user to the Docker group:
$ sudo usermod -aG docker $USER $ newgrp dockerVerify the services:
$ docker service ls ID NAME MODE REPLICAS IMAGE yjuz1bv9slln dokploy replicated 1/1 dokploy/dokploy:latest icesr4uht5py dokploy-postgres replicated 1/1 postgres:16 aqb1hms95ox8 dokploy-redis replicated 1/1 redis:7
Access the Dashboard
Open http://SERVER_IP:3000, enter your name, email, and password, and click Register. You land on the main project view.
Note: This is HTTP on port 3000 - HTTPS for the dashboard gets set up later in "Secure the Dokploy Dashboard."
Deploy a Sample App
- Create a project - Create Project, name it (e.g.
demo-project), Create. - Add an application - Create Service โ Application, name it (e.g.
hello-app). - Configure the source under General:
- Provider: GitHub (or Git for custom repos)
- Repository URL: e.g.
https://github.com/dokploy/hello-world - Branch:
main
- Set the build type: Nixpacks (auto-detects language/dependencies). Other options: Heroku Buildpacks, Paketo Buildpacks, or a custom Dockerfile.
- Save, then click Deploy. Watch the Deployments tab for build progress, and Logs for runtime output:
Server listening on port 3000
Add a Custom Domain with SSL
Open the firewall:
$ sudo ufw allow 80/tcp $ sudo ufw allow 443/tcp $ sudo ufw enable $ sudo ufw statusOn the app's Domains tab, click Add Domain:
- Host:
app.example.com - Container Port: match what your app listens on (check the logs)
- HTTPS: enabled
- Certificate Provider: Let's Encrypt
- Host:
Confirm DNS resolves to your server:
$ sudo apt install -y dnsutils $ dig +short app.example.comOutput should match your server's public IP.
Visit
https://app.example.com- Traefik issues the certificate on first request and renews automatically before expiry.
Secure the Dokploy Dashboard
- Settings โ Web Server, set a domain (e.g.
dokploy.example.com). - Enable HTTPS with Let's Encrypt.
- Confirm
https://dokploy.example.comworks. - Once confirmed, disable direct IP:port access:
$ docker service update --publish-rm "published=3000,target=3000,mode=host" dokploy
Warning: Confirm the HTTPS domain works before running this - otherwise you lock yourself out of the dashboard.
Deploy a Database
- In your project, Create Service โ Database โ PostgreSQL, name it (e.g.
app-db), Create. - The General tab shows user, database name, password, internal port/host, and a ready-to-use Internal Connection URL. Only set External Port if you need access from outside the server.
- Click Deploy.
- (Optional) Backups tab - set frequency and an S3-compatible destination for off-server backup storage.
Connect the app: copy the Internal Connection URL into the app's Environment tab:
DATABASE_URL=INTERNAL-CONNECTION-URL
Save and redeploy.
Monitor Resources
The app's Monitoring tab graphs CPU, memory, block I/O, and network I/O in real time. Use Advanced to set CPU and memory limits per container.
Next Steps
Dokploy is running an app and a database behind HTTPS. From here you can:
- Deploy a Docker Compose stack instead of a single app for multi-service projects
- Add remote servers to Dokploy for multi-node deployments
- Configure custom Traefik middleware for auth, rate limiting, or redirects
For the full guide with additional tips, visit the original article on Vultr Docs.
Comments
No comments yet. Start the discussion.