How to Install Dokploy on a Linux VPS and Deploy Docker Compose Apps
If you are tired of managing containers only with CLI and raw Docker commands, learning how to install Dokploy on a Linux VPS is the perfect way to move to a panel‑driven workflow. Dokploy is a self‑hosted PaaS built on Docker and Traefik that runs on your own server. With Dpkploy, you get a web dashboard to create projects, apps, databases, and Docker Compose services with automatic routing and HTTPS.
In this guide, you will learn to prepare an Ubuntu VPS, install Dokploy, connect a domain, and deploy a simple Docker Compose application step by step.
Table of Contents
Requirements Before You Install Dokploy on a Linux VPS
Before you install Dokploy on a Linux VPS, make sure you have:
- A Linux VPS running Ubuntu 24.04 or 22.04 with at least 2 GB RAM and 30 GB disk.
- Root or sudo SSH access to the server.
- A domain name and the ability to edit DNS A records.
If you still do not have a VPS, you can start with a simple plan from PerLod’s Linux VPS Hosting Plans and then start your deployment.
Step 1: Connect to Your VPS and Update the System
To start the process, connect from your local machine to the server with SSH:
ssh root@YOUR_SERVER_IP
# or
ssh YOUR_USER@YOUR_SERVER_IP
If you log in as a non‑root user, confirm that the user has sudo rights. Once logged in, you are ready to prepare the system and then install Dokploy safely.
Update packages and add a few required tools with the commands below:
sudo apt update && sudo apt upgrade -y
sudo apt install curl git ufw -y
Also, you must stop and disable any web server that might already be using ports 80 or 443, which Dokploy’s Traefik needs:
sudo systemctl stop nginx apache2 || true
sudo systemctl disable nginx apache2 || true
Doing this helps the script later, because Traefik must bind to ports 80 and 443 without conflict.
Step 2: Configure the Firewall Rules for Dokploy
Before you install Dokploy on a Linux VPS, you only need to open the ports required for SSH, HTTP, HTTPS, and the dashboard. To do this, you can run:
sudo ufw allow ssh #SSH management
sudo ufw allow 80/tcp #Traefik HTTP and HTTPS for your apps
sudo ufw allow 443/tcp #Traefik HTTP and HTTPS for your apps
sudo ufw allow 3000/tcp #Dokploy dashboard
sudo ufw enable
sudo ufw status
Later, you can restrict port 3000 or front it with a domain only, but for now, this keeps setup simple.
Step 3: Run the Dokploy Script
The easiest and recommended way to install Dokploy on a Linux VPS is to use the official script. Run the command below as root or with sudo:
curl -sSL https://dokploy.com/install.sh | sudo bash
This script will:
- Install Docker and dependencies if missing.
- Initialize Docker Swarm and create the required networks.
- Deploy Dokploy core services, including UI, Traefik, database, and Redis as containers.
The script takes a few minutes. When it finishes, you will have a working setup.
Step 4: Access the Dokploy Web Panel
Once your installation is completed, you can access the Dokploy web panel by navigating to the URL below from your browser:
http://YOUR_SERVER_IP:3000
You will see the Dokploy initial configuration page:
- Enter your admin email.
- Set a strong password.
- Register to create the admin user.

This is your main login to control everything and use a panel instead of pure Docker.

Step 5: Prepare a Domain for Dokploy and Your App
To get clean URLs and HTTPS, you can point a domain or subdomain to your server. This step is not required to install Dokploy on a Linux VPS, but it is highly recommended before real deployments.
- Buy or manage a domain; you can use PerLod’s domain service.
- In your DNS panel, create an A record, for example:
- Name: app or panel
- Type: A
- Value: YOUR_SERVER_IP
- Save and wait for propagation.
Once DNS is correct, the domain will be ready to connect to the apps created.
Step 6: Create the Demo App Locally with Docker Compose YAML File
On your local machine, not on the VPS, you can create a simple app that Dokploy will deploy for you:
mkdir my-demo-app
cd my-demo-app
git init
Create the docker-compose.yml file:
nano docker-compose.yml
Paste this simple Nginx example:
version: "3.8"
services:
web:
image: nginx:alpine
restart: always
ports:
- "8080:80"
volumes:
- ./html:/usr/share/nginx/html:ro
networks:
- dokploy-network
networks:
dokploy-network:
external: true
Save and exit the editor, then create a basic index page:
mkdir html
echo "Hello from Dokploy!" > html/index.html
This gives you a very small demo stack that is perfect for first tests after you install Dokploy on a Linux VPS.
Step 7: Commit the App and Push It to GitHub
Dokploy works best when your code lives in a Git repository. Still in my-demo-app directory, configure your Git identity, only once per machine:
git config --global user.email "yo********@*****le.com"
git config --global user.name "Your Name"
Stage and commit the files:
git add .
git commit -m "Initial demo app"
Create an empty repo on GitHub, for example, my-demo-app, under your account, and copy its HTTPS URL, like:
https://github.com/your-user/my-demo-app.git
Connect and push:
git remote add origin https://github.com/your-user/my-demo-app.git
git branch -M main
git push -u origin main
When prompted for credentials over HTTPS, use your GitHub username and a personal access token with repo scope, not your plain password. This makes your demo repository ready for Dokploy.
Step 8: Connect GitHub to the Dokploy Git Providers
In the Dokploy UI, go to Git → Git Providers.
- Click the GitHub button under Available Providers.
- Follow the prompts to create or authorize the Dokploy GitHub App.
- When asked, allow Dokploy to access either all repositories or specifically my-demo-app.
- Ensure the created GitHub provider entry is enabled and not showing Action Required.

This step lets Dokploy list and pull your GitHub repos on the server where you install Dokploy on a Linux VPS.
Step 9: Create a Project and Docker Compose Service
Now you can create the project that will host your Docker Compose app. In the Dokploy dashboard, go to Projects.
Click New Project and name it something like Demo Compose.

Open the project and click New Service → Compose.

Fill in the form:
- Name: Demo Frontend, this is just a display name.
- App Name: a slug like democompose-frontend.
- Compose Type: Docker Compose.
- Click Create.

This service will control deployments of your docker-compose.yml file on the server where you install Dokploy on a Linux VPS.
Step 10: Link the Compose Service to the GitHub Repo
Open your new Demo Frontend service and stay on the General tab.
- In the Provider section, choose GitHub.
- Select your account and repo your-user/my-demo-app.
- Choose branch main.
- Set Compose Path to:
./docker-compose.yml
Save the settings.

Now Dokploy knows where to get your compose file and which branch to watch for changes.y.
Step 11: Configure a Domain for the Docker Compose App
With DNS already pointing the domain to your VPS, go to the Domains tab inside your Demo Frontend service.
Follow the typical flow:
- Click to create a new domain entry.
- Host: app.yourdomain.com.
- Path: /.
- Container port: 80, the internal port of the web service in the compose file.
- Enable HTTPS and choose Let’s Encrypt as the certificate provider.
- Create.

Dokploy will now route that domain to your Nginx container.
Step 12: Deploy the Docker Compose App
Back on the General tab of the service, you are ready to use the panel instead of the Docker commands. Make sure Autodeploy is enabled if you want new pushes to trigger deployments automatically.
Click Deploy and watch the logs:
- Dokploy pulls my-demo-app from GitHub.
- It applies docker-compose.yml to your Swarm.
- Traefik config is updated.
Once the deployment finishes and certificates are ready, open:
http://app.yourdomain.com
You should see Hello from Dokploy! from the Nginx container.
What Dokploy Automates and What You Still Manage
When you install Dokploy on a Linux VPS, Dokploy automates:
- Container scheduling on Docker Swarm.
- Image pulling, builds, and restarts.
- Traefik routing and HTTPS certificates via Let’s Encrypt.
You still manually manage:
- Volumes and data backup strategy.
- Environment variables and secrets.
- Firewall rules, SSH security, and OS updates on the VPS.
If you want to compare Dokploy with other self‑hosted PaaS platforms after you install Dokploy on a Linux VPS, you can read this guide that explains multiple options and how they differ:
Compare self‑hosted PaaS platforms.
How to Update Dokploy
Over time, you will need to update your platform. You can use these typical upgrades:
- Re‑run the official install or update script with the recommended options.
- Pull new images and restart the stack through Docker or the panel.
- Check release notes when upgrading major versions of Docker, Traefik, or Dokploy.
Conclusion
Now you have seen how to install Dokploy on a Linux VPS from a fresh Ubuntu server, secure it with a basic firewall, connect a domain, and deploy a simple Docker Compose app using a Git repository. Dokploy takes care of Docker Swarm, Traefik, and HTTPS for you, while you still control volumes, environment variables, and firewall rules for safe and predictable deployments.
FAQs
Can I run multiple apps inside Dokploy?
Yes, you can create multiple projects and Compose services, each with its own repo, domain, and configuration.
Does the Dokploy script have Docker included?
Yes, the official script installs Docker and sets up Docker Swarm if they are not already installed.
Do I need a domain to install Dokploy on a Linux VPS?
You can install Dokploy on a Linux VPS and use it by IP only, but adding a domain makes HTTPS and access much easier, especially for production apps.