惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

J
Java Code Geeks
博客园 - 聂微东
人人都是产品经理
人人都是产品经理
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
博客园_首页
量子位
阮一峰的网络日志
阮一峰的网络日志
酷 壳 – CoolShell
酷 壳 – CoolShell
H
Hackread – Cybersecurity News, Data Breaches, AI and More
云风的 BLOG
云风的 BLOG
D
DataBreaches.Net
B
Blog
L
LangChain Blog
Apple Machine Learning Research
Apple Machine Learning Research
Vercel News
Vercel News
博客园 - 三生石上(FineUI控件)
爱范儿
爱范儿
Microsoft Azure Blog
Microsoft Azure Blog
IT之家
IT之家
aimingoo的专栏
aimingoo的专栏
B
Blog RSS Feed
H
Help Net Security
The Cloudflare Blog
U
Unit 42

DEV Community

Authentication Security Deep Dive: From Brute Force to Salted Hashing (With Java Examples) Why AI Systems Don’t Fail — They Drift Spilling beans for how i learn for exam😁"Reinforcement Learning Cheat Sheet" I Replaced Chrome with Safari for AI Browser Automation. Here's What Broke (and What Finally Worked) How Python Borrows Other People's Work The $40 Architecture: Processing 1 Billion API Requests with 99.99% Uptime Vibe Coding: A Workflow Guide (From Zero to SaaS) Most webhook security guides protect the wrong side. The scary part is delivery. Headless CMS for TanStack Start: Build a Blog with Cosmic EU Age Verification App "Hacked in 2 Minutes" — What Actually Happened Comfy Cloud’s delete function does not actually remove files Running AI Models on GPU Cloud Servers: A Beginner Guide Event-driven media intelligence with AWS Step Functions and Bedrock I scored 500 AI prompts across 8 quality dimensions — here's what broke How to Call Google Gemini API from Next.js (Free Tier, No Backend Needed) The Portal Protocol: Reclaiming Human Connection in the Age of AI How to Fix Your Team's Scattered Knowledge Problem With a Self-Hosted Forum Intro to tc Cloud Functors: A Graph-First Mental Model for the Modern Cloud Designing Multi-Tenant Backends With Both Ownership and Team Access I Built a Neumorphic CSS Library with 77+ Components — Here's What I Learned PostgreSQL Performance Optimization: Why Connection Pooling Is Critical at Scale Cómo construí un SaaS multi-rubro para gestionar expensas en Argentina con FastAPI + Vue 3 🚀 I Built an Ethical Hacking Scanner Tool – Open Source Project I Replaced /usage and /context in Claude Code With a Single Statusline A Pythonic Way to Handle Emails (IMAP/SMTP) with Auto-Discovery and AI-Ready Design I Collected 8.9 Million Polymarket Price Points — Here's What I Found About How Markets Really Move EcoTrack AI — Carbon Footprint Tracker & Dashboard Everyone's Using AI. No One Agrees How. 5 self-hosted ebook managers worth trying in 2026 Building Your First AI Agent with LangChain: From Chatbot to Autonomous Assistant
Dokploy Setup Guide
Subham · 2026-06-25 · via DEV Community

Dokploy Setup Guide — Ubuntu

What is Dokploy?
Dokploy is a free, self-hosted PaaS — your own Vercel/Heroku that runs on your VPS. It bundles Docker Swarm, Traefik (for SSL + routing), PostgreSQL, and Redis into one web dashboard. You deploy apps, manage databases, and handle domains all from a single UI — no manual Docker config needed.


✅ Tested Ubuntu Versions

  • Ubuntu 24.04 LTS
  • Ubuntu 22.04 LTS
  • Ubuntu 20.04 LTS

✅ Minimum Server Requirements

Resource Minimum
RAM 2 GB (4 GB recommended)
CPU 2 vCPU
Disk 30 GB (50 GB recommended)

✅ Required Ports — Ensure These Are Free Before Installing

Port Purpose
80 HTTP traffic (Traefik)
443 HTTPS traffic (Traefik)
3000 Dokploy web UI

1️⃣ First Step — Connect to Your VPS

✅ 1. Get Your Credentials
You'll need these three things from your hosting provider:

  • IP address: 568.82.48.166
  • Username: root
  • Password: Subham@Xam_08

✅ 2. Connect via Terminal

ssh root@568.82.48.166

✅ 3. Verify the Connection
You'll see a host authenticity prompt:

The authenticity of host '568.82.48.166' can't be established.
Are you sure you want to continue connecting (yes/no/[fingerprint])?

Type yes and press Enter.

✅ 4. Enter Your Password

root@568.82.48.166's password:

Paste your password and press Enter. The terminal won't show characters while typing — that's normal.

✅ 5. Success!
You'll see the Ubuntu welcome screen and land in the shell:

root@your-hostname:~#


2️⃣ Second Step — Prepare the System

✅ 1. Clear the Terminal

clear

✅ 2. Verify Your OS

lsb_release -a

Expected output:

Distributor ID: Ubuntu
Description:    Ubuntu 22.04.x LTS
Release:        22.04

✅ 3. Update the Package List

sudo apt update

✅ 4. Upgrade Installed Packages

sudo apt upgrade -y

If you see configuration prompts during upgrade, press Tab to highlight OK and press Enter.

✅ 5. Install Essential Tools

sudo apt install -y curl wget ca-certificates

✅ 6. Reboot if Prompted
If the upgrade mentions a kernel update:

sudo reboot

Then SSH back in.


3️⃣ Third Step — Install Docker

On Ubuntu, Dokploy's installer can auto-install Docker. However, it's best practice to install Docker yourself first so you have full control over the version and configuration.

✅ 1. Remove Any Old Docker Versions

sudo apt remove -y docker docker-engine docker.io containerd runc

(It's fine if these aren't installed — the command will just say "not installed".)

✅ 2. Add Docker's Official GPG Key and Repository

sudo install -m 0755 -d /etc/apt/keyrings

curl -fsSL https://download.docker.com/linux/ubuntu/gpg | \
  sudo gpg --dearmor -o /etc/apt/keyrings/docker.gpg

sudo chmod a+r /etc/apt/keyrings/docker.gpg

echo \
  "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.gpg] \
  https://download.docker.com/linux/ubuntu \
  $(. /etc/os-release && echo "$VERSION_CODENAME") stable" | \
  sudo tee /etc/apt/sources.list.d/docker.list > /dev/null

✅ 3. Install Docker Engine + Compose

sudo apt update
sudo apt install -y docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin

✅ 4. Enable and Start Docker

sudo systemctl enable --now docker

✅ 5. Verify Docker Installation

docker --version
docker compose version

Expected output:

Docker version 29.x.x, build ...
Docker Compose version v5.x.x

✅ 6. Test Docker Works

docker run hello-world

You should see Hello from Docker! in the output.


4️⃣ Fourth Step — Open Firewall Ports

✅ 1. Check Firewall Status

sudo ufw status

✅ 2. Open Required Ports

# SSH (important — don't lock yourself out)
sudo ufw allow 22/tcp

# HTTP
sudo ufw allow 80/tcp

# HTTPS
sudo ufw allow 443/tcp

# Dokploy Web UI
sudo ufw allow 3000/tcp

# Enable the firewall
sudo ufw enable

✅ 3. Verify Rules

sudo ufw status numbered

Expected output:

Status: active

     To                         Action      From
     --                         ------      ----
[ 1] 22/tcp                     ALLOW IN    Anywhere
[ 2] 80/tcp                     ALLOW IN    Anywhere
[ 3] 443/tcp                    ALLOW IN    Anywhere
[ 4] 3000/tcp                   ALLOW IN    Anywhere


5️⃣ Fifth Step — Install Dokploy

✅ 1. Run the Dokploy Installer

curl -sSL https://dokploy.com/install.sh | sh

The installer will automatically:

  • Initialize Docker Swarm
  • Create a dokploy-network overlay network
  • Deploy the Dokploy panel container
  • Deploy dokploy-postgres (PostgreSQL 16) — Dokploy's own internal DB
  • Deploy dokploy-redis (Redis 7) — Dokploy's own deployment queue
  • Deploy dokploy-traefik — reverse proxy for routing + SSL

✅ 2. Wait for the Installer to Finish
You'll see:

Congratulations, Dokploy is installed!
Wait 15 seconds for the server to start
Please go to http://568.82.48.166:3000

Wait the full 15 seconds before opening the browser.

✅ 3. Verify All Platform Services Are Running

docker service ls

Expected output — all services should show 1/1 under REPLICAS:

NAME               MODE         REPLICAS   IMAGE
dokploy            replicated   1/1        dokploy/dokploy:latest
dokploy-postgres   replicated   1/1        postgres:16
dokploy-redis      replicated   1/1        redis:7
dokploy-traefik    replicated   1/1        traefik:v3.x

Also confirm running containers:

docker ps --format '{{.Names}}\t{{.Image}}\t{{.Status}}'

✅ 4. Confirm the Panel is Responding

curl -I http://127.0.0.1:3000/

Expected:

HTTP/1.1 302 Found
Location: /register


6️⃣ Sixth Step — Initial Dashboard Setup

✅ 1. Open Dokploy in Your Browser

http://568.82.48.166:3000

You'll be redirected to the registration page.

✅ 2. Create Your Admin Account
Fill in:

  • Email address
  • Password (use a strong one — this is your master admin)

Click Create Account.

✅ 3. You're In the Dashboard!
The main sections you'll use:

  • Projects — create and manage apps and databases
  • Settings → Server — configure domain and SSL
  • Settings → Destinations — set up S3 backup targets

7️⃣ Seventh Step — Point Your Domain to Dokploy

✅ 1. Buy a Domain

Purchase from GoDaddy, Namecheap, Cloudflare, etc.

✅ 2. Add DNS Records

In your domain provider's DNS management, add:

Type Name Points To TTL
A @ 568.82.48.166 1 hour
A www 568.82.48.166 1 hour

For a panel subdomain (e.g., panel.xyz.com):

Type Name Points To TTL
A panel 568.82.48.166 1 hour

✅ 3. Verify DNS Propagation

nslookup yourdomain.com

Expected:

Name:    yourdomain.com
Address: 568.82.48.166

DNS can take up to 24 hours to propagate globally. Usually 5–30 minutes.

✅ 4. Configure the Domain in Dokploy

  1. Go to Settings → Server
  2. Under Dokploy Panel Domain, enter yourdomain.com
  3. Select Let's Encrypt as the certificate provider
  4. Enter your email for SSL notifications
  5. Click Save

Dokploy's built-in Traefik will automatically issue and renew the SSL certificate.

✅ 5. Verify HTTPS is Working

https://yourdomain.com

You should see the Dokploy login page with a padlock in the browser.

✅ 6. (Optional) Disable Direct IP:Port Access

Once your domain + HTTPS is confirmed working, remove port 3000 exposure:

docker service update --publish-rm "published=3000,target=3000,mode=host" dokploy

⚠️ Only run this AFTER verifying your domain works. Otherwise you'll lose access.


8️⃣ Eighth Step — Set Up PostgreSQL for Your App

Note: Dokploy already has its own internal PostgreSQL running for its own data. The one you create here is a separate database for your application.

✅ 1. Create a Project

  1. Click Projects → New Project
  2. Enter a name (e.g., my-app)
  3. Click Create

✅ 2. Add a PostgreSQL Database Service

  1. Inside the project, click Create New Service
  2. Select Database
  3. Choose PostgreSQL
  4. Fill in the form:
Field Example
Service Name my-app-db
Database Name myapp
Database User myapp_user
Database Password StrongPass@2025
PostgreSQL Version 16
  1. Click Create

✅ 3. Deploy the Database

  1. Go to the General tab of your PostgreSQL service
  2. Click Deploy
  3. Wait for the status badge to turn green — Running

✅ 4. Get Your Connection Strings

For app containers in the same project, use the service name as hostname:

DB_HOST=my-app-db
DB_PORT=5432
DB_NAME=myapp
DB_USER=myapp_user
DB_PASSWORD=StrongPass@2025
DATABASE_URL=postgresql://myapp_user:StrongPass@2025@my-app-db:5432/myapp

⚠️ Use my-app-db (the service name) as the host — NOT localhost or the server IP. Containers in the same project communicate by service name over the internal Docker network.

✅ 5. (Optional) Expose PostgreSQL Externally

To connect from your local machine using pgAdmin or TablePlus:

  1. Go to your PostgreSQL service → General tab
  2. Under External Credentials, set External Port to 5433
  3. Click Save
  4. Open the port:
   sudo ufw allow 5433/tcp

  1. Connect from your local machine:
   Host:     568.82.48.166
   Port:     5433
   Database: myapp
   User:     myapp_user
   Password: StrongPass@2025

✅ 6. Monitor and View Logs

  • Monitoring tab — real-time CPU, memory, disk, and network graphs
  • Logs tab — view container logs to check for errors

✅ 7. Set Up Automated Backups (Optional)

  1. Go to Settings → Destinations and add an S3 bucket (AWS S3, Cloudflare R2, MinIO, etc.)
  2. In your PostgreSQL service, go to the Backups tab
  3. Select your S3 destination, set a schedule, and click Save

9️⃣ Ninth Step — Set Up Redis for Your App

Note: Dokploy has its own internal Redis for deployment queuing. The one you create here is a separate Redis for your application (caching, sessions, queues).

✅ 1. Add a Redis Service to Your Project

  1. Inside your project, click Create New Service
  2. Select Database
  3. Choose Redis
  4. Fill in the form:
Field Example
Service Name my-app-cache
Redis Password RedisPass@2025
Redis Version 7
  1. Click Create

✅ 2. Deploy Redis

  1. Go to the General tab
  2. Click Deploy
  3. Wait for the status to show Running (green)

✅ 3. Get Your Connection Strings

REDIS_HOST=my-app-cache
REDIS_PORT=6379
REDIS_PASSWORD=RedisPass@2025
REDIS_URL=redis://:RedisPass@2025@my-app-cache:6379

For multiple use cases using Redis database numbers (0–15):

# Caching (DB 0)
CACHE_URL=redis://:RedisPass@2025@my-app-cache:6379/0

# Sessions (DB 1)
SESSION_URL=redis://:RedisPass@2025@my-app-cache:6379/1

# Job Queues (DB 2)
QUEUE_URL=redis://:RedisPass@2025@my-app-cache:6379/2

✅ 4. (Optional) Expose Redis Externally for RedisInsight

To manage Redis from your local RedisInsight:

  1. Go to your Redis service → General tab
  2. Under External Credentials, set External Port to 6379
  3. Click Save
  4. Open the port:
   sudo ufw allow 6379/tcp

  1. In RedisInsight, add a new database:
    • Host: 568.82.48.166
    • Port: 6379
    • Username: default
    • Password: RedisPass@2025

🔟 Tenth Step — Deploy Your Application

✅ 1. Add an Application Service

  1. Inside your project, click Create New Service
  2. Select Application
  3. Choose your source type:
    • GitHub / GitLab — connect your repo for auto CI/CD
    • Docker Compose — upload a docker-compose.yml
    • Docker Image — pull from any registry

✅ 2. Set Environment Variables

Go to the Environment tab and add your variables:

DATABASE_URL=postgresql://myapp_user:StrongPass@2025@my-app-db:5432/myapp
REDIS_URL=redis://:RedisPass@2025@my-app-cache:6379
PORT=3333
NODE_ENV=production

Click Save.

✅ 3. Configure a Domain for Your App

  1. Go to the Domains tab
  2. Click Add Domain
  3. Enter your app's subdomain (e.g., app.yourdomain.com)
  4. Set the Container Port your app listens on (e.g., 3333)
  5. Select Let's Encrypt for SSL
  6. Click Save

Make sure app.yourdomain.com has an A record pointing to your server IP in your DNS settings.

✅ 4. Deploy and Verify

  1. Go to the General tab
  2. Click Deploy
  3. Watch the live deployment logs
  4. Once status shows Running, visit https://app.yourdomain.com

⚙️ Managing Dokploy

Useful Docker Swarm Commands

# View all Dokploy platform services
docker service ls

# View all running containers
docker ps

# Check Dokploy panel logs
docker logs $(docker ps -q -f name=dokploy_dokploy)

# Check Traefik logs (for SSL/routing issues)
docker logs $(docker ps -q -f name=dokploy_dokploy-traefik)

# Restart the Dokploy panel
docker service update --force dokploy_dokploy

# Check system resources
docker stats
df -h
free -h

Update Dokploy to Latest Version

curl -sSL https://dokploy.com/install.sh | sh -s update


📝 Troubleshooting

⭐ Port 3000 Not Accessible

# Check firewall rules
sudo ufw status

# Open port if missing
sudo ufw allow 3000/tcp

# Verify Dokploy is running
docker service ls
docker ps | grep dokploy

⭐ SSL Certificate Not Issued

# Check Traefik logs for ACME errors
docker logs $(docker ps -q -f name=dokploy_dokploy-traefik) 2>&1 | tail -50

# Ensure ports 80 and 443 are open
sudo ufw allow 80/tcp
sudo ufw allow 443/tcp

# Verify DNS resolves correctly
nslookup yourdomain.com

⭐ App Cannot Connect to PostgreSQL or Redis

Use the service name (not localhost) as the hostname:

# WRONG
DATABASE_URL=postgresql://user:pass@localhost:5432/mydb

# CORRECT
DATABASE_URL=postgresql://user:pass@my-app-db:5432/mydb

Verify all services are on the same network:

docker network inspect dokploy-network

⭐ Services Not Auto-Restarting After Reboot

# Make sure Docker starts on boot
sudo systemctl enable docker
sudo systemctl status docker

=========================================================

Dokploy Setup Guide — AlmaLinux

What is Dokploy?
Dokploy is a free, self-hosted PaaS — your own Vercel/Heroku that runs on your VPS. It bundles Docker Swarm, Traefik (for SSL + routing), PostgreSQL, and Redis into one web dashboard. You deploy apps, manage databases, and handle domains all from a single UI — no manual Docker config needed.

⚠️ AlmaLinux Critical Warning: Dokploy's default installer falls back to Docker's convenience script which does NOT support AlmaLinux and fails with Unsupported distribution 'almalinux'. You must install Docker manually first from Docker's official CentOS repository before running the Dokploy installer. Step 3 covers this in full.


✅ Tested AlmaLinux Versions

  • AlmaLinux 9.x (Seafoam Ocelot) ✅
  • AlmaLinux 10.x (Midnight Oncilla) ✅

✅ Minimum Server Requirements

Resource Minimum
RAM 2 GB (4 GB recommended)
CPU 2 vCPU
Disk 30 GB (50 GB recommended)

✅ Required Ports — Ensure These Are Free Before Installing

Port Purpose
80 HTTP traffic (Traefik)
443 HTTPS traffic (Traefik)
3000 Dokploy web UI

1️⃣ First Step — Connect to Your VPS

✅ 1. Get Your Credentials
You'll need these three things from your hosting provider:

  • IP address: 568.82.48.166
  • Username: root
  • Password: Subham@Xam_08

✅ 2. Connect via Terminal

ssh root@568.82.48.166

✅ 3. Verify the Connection
You'll see a host authenticity prompt:

The authenticity of host '568.82.48.166' can't be established.
Are you sure you want to continue connecting (yes/no/[fingerprint])?

Type yes and press Enter.

✅ 4. Enter Your Password

root@568.82.48.166's password:

Paste your password and press Enter. The terminal won't show characters while typing — that's normal.

✅ 5. Success!
You'll land in the AlmaLinux shell:

[root@your-hostname ~]#


2️⃣ Second Step — Prepare the System

✅ 1. Clear the Terminal

clear

✅ 2. Verify Your OS
Confirm you're running AlmaLinux:

cat /etc/os-release

Expected output:

NAME="AlmaLinux"
VERSION="9.x (Seafoam Ocelot)"
ID="almalinux"
ID_LIKE="rhel centos fedora"
...

✅ 3. Enable EPEL Repository
EPEL (Extra Packages for Enterprise Linux) is required for many packages on AlmaLinux:

sudo dnf install -y epel-release

✅ 4. Update the Package List

sudo dnf check-update

(Exit code 100 is normal — it just means updates are available.)

✅ 5. Upgrade Installed Packages

sudo dnf upgrade -y

✅ 6. Install Essential Tools

sudo dnf install -y curl wget ca-certificates dnf-plugins-core

✅ 7. Reboot if Prompted
If the upgrade includes a kernel update:

sudo reboot

Then SSH back in.


3️⃣ Third Step — Install Docker (Mandatory on AlmaLinux)

⚠️ This step is required and unique to AlmaLinux.

Dokploy's built-in Docker installer does NOT support AlmaLinux. When it tries, it uses Docker's convenience script which returns:

ERROR: Unsupported distribution 'almalinux'

and the entire Dokploy installation fails. The fix is to install Docker yourself first from Docker's official CentOS repository — which AlmaLinux is fully binary-compatible with.

Do not skip this step.

✅ 1. Remove Any Old or Conflicting Docker Packages

sudo dnf remove -y docker docker-client docker-client-latest docker-common \
  docker-latest docker-latest-logrotate docker-logrotate docker-engine

(It's fine if these aren't installed — the command will just skip them.)

✅ 2. Add Docker's Official Repository for CentOS/RHEL
AlmaLinux is binary-compatible with RHEL/CentOS, so use Docker's CentOS repo:

sudo dnf config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo

✅ 3. Install Docker Engine + Compose Plugin

sudo dnf install -y docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin

When prompted to accept the GPG key, type y and press Enter.

✅ 4. Enable and Start Docker
On AlmaLinux, services don't auto-start — you must enable them explicitly:

sudo systemctl enable --now docker

✅ 5. Verify Docker Installation

docker --version
docker compose version

Expected output:

Docker version 29.x.x, build ...
Docker Compose version v5.x.x

✅ 6. Test Docker Works

docker run hello-world

You should see Hello from Docker! in the output.

✅ Docker is now installed. The Dokploy installer will detect it and skip its own Docker installation step — allowing it to run successfully on AlmaLinux.


4️⃣ Fourth Step — Open Firewall Ports

AlmaLinux uses firewalld — not ufw or raw iptables. All firewall management is done with firewall-cmd.

✅ 1. Check Firewall Status

sudo firewall-cmd --state

✅ 2. Open Required Ports

# SSH (ensure you don't lose access)
sudo firewall-cmd --permanent --add-port=22/tcp

# HTTP
sudo firewall-cmd --permanent --add-port=80/tcp

# HTTPS
sudo firewall-cmd --permanent --add-port=443/tcp

# Dokploy Web UI
sudo firewall-cmd --permanent --add-port=3000/tcp

# Apply all changes
sudo firewall-cmd --reload

✅ 3. Verify Open Ports

sudo firewall-cmd --list-ports

Expected output:

22/tcp 80/tcp 443/tcp 3000/tcp

✅ 4. Fix SELinux for Network Proxying (AlmaLinux Specific)
AlmaLinux enables SELinux by default, which can block containers from making network connections. Allow it:

sudo setsebool -P httpd_can_network_connect 1

Why firewall-cmd? Unlike Ubuntu's ufw, AlmaLinux uses firewalld. The --permanent flag makes rules survive reboots automatically — no extra package like netfilter-persistent is needed.


5️⃣ Fifth Step — Install Dokploy

✅ 1. Set Your Server's Public IP as the Advertise Address
The Dokploy installer sometimes cannot auto-detect the IP on AlmaLinux. Always set it manually:

export ADVERTISE_ADDR="568.82.48.166"

Replace 568.82.48.166 with your actual VPS IP address.

✅ 2. Run the Dokploy Installer

curl -sSL https://dokploy.com/install.sh | sh

Because Docker is already installed (Step 3), the installer will skip Docker setup and go straight to deploying Dokploy's services:

  • dokploy — the main web panel
  • dokploy-postgres — PostgreSQL 16 (Dokploy's own internal DB)
  • dokploy-redis — Redis 7 (Dokploy's own deployment queue)
  • dokploy-traefik — reverse proxy for routing + SSL

✅ 3. Wait for Services to Start
You'll see:

Congratulations, Dokploy is installed!
Wait 15 seconds for the server to start
Please go to http://568.82.48.166:3000

Wait the full 15 seconds before opening the browser.

✅ 4. Verify All Platform Services Are Running

docker service ls

Expected output — all services should show 1/1 under REPLICAS:

NAME               MODE         REPLICAS   IMAGE
dokploy            replicated   1/1        dokploy/dokploy:latest
dokploy-postgres   replicated   1/1        postgres:16
dokploy-redis      replicated   1/1        redis:7
dokploy-traefik    replicated   1/1        traefik:v3.x

Also confirm containers are running:

docker ps --format '{{.Names}}\t{{.Image}}\t{{.Status}}'

✅ 5. Confirm the Panel is Responding

curl -I http://127.0.0.1:3000/

Expected:

HTTP/1.1 302 Found
Location: /register


6️⃣ Sixth Step — Initial Dashboard Setup

✅ 1. Open Dokploy in Your Browser

http://568.82.48.166:3000

You'll be redirected to the registration page.

✅ 2. Create Your Admin Account
Fill in:

  • Email address
  • Password (use a strong one — this is your master admin)

Click Create Account.

✅ 3. You're In the Dashboard!
The main sections you'll use:

  • Projects — create and manage apps and databases
  • Settings → Server — configure domain and SSL
  • Settings → Destinations — set up S3 backup targets

7️⃣ Seventh Step — Point Your Domain to Dokploy

✅ 1. Buy a Domain

Purchase from GoDaddy, Namecheap, Cloudflare, etc.

✅ 2. Add DNS Records

In your domain provider's DNS management, add:

Type Name Points To TTL
A @ 568.82.48.166 1 hour
A www 568.82.48.166 1 hour

For a panel subdomain (e.g., panel.xyz.com):

Type Name Points To TTL
A panel 568.82.48.166 1 hour

✅ 3. Verify DNS Propagation

nslookup yourdomain.com

Expected:

Name:    yourdomain.com
Address: 568.82.48.166

DNS can take up to 24 hours to propagate globally. Usually 5–30 minutes.

✅ 4. Configure the Domain in Dokploy

  1. Go to Settings → Server
  2. Under Dokploy Panel Domain, enter yourdomain.com
  3. Select Let's Encrypt as the certificate provider
  4. Enter your email for SSL notifications
  5. Click Save

Dokploy's built-in Traefik automatically issues and renews the SSL certificate via Let's Encrypt.

✅ 5. Verify HTTPS is Working

https://yourdomain.com

You should see the Dokploy login page with a padlock icon in the browser.

✅ 6. (Optional) Disable Direct IP:Port Access

Once your domain + HTTPS is confirmed working, remove port 3000 exposure:

docker service update --publish-rm "published=3000,target=3000,mode=host" dokploy

⚠️ Only run this AFTER verifying your domain works. Otherwise you'll lose access to the panel.


8️⃣ Eighth Step — Set Up PostgreSQL for Your App

Note: Dokploy already has its own internal PostgreSQL running for its own data. The database you create here is a separate, isolated PostgreSQL instance for your application.

✅ 1. Create a Project

  1. Click Projects → New Project
  2. Enter a name (e.g., my-app)
  3. Click Create

✅ 2. Add a PostgreSQL Database Service

  1. Inside the project, click Create New Service
  2. Select Database
  3. Choose PostgreSQL
  4. Fill in the form:
Field Example
Service Name my-app-db
Database Name myapp
Database User myapp_user
Database Password StrongPass@2025
PostgreSQL Version 16
  1. Click Create

✅ 3. Deploy the Database

  1. Go to the General tab of your PostgreSQL service
  2. Click Deploy
  3. Wait for the status badge to turn green — Running

✅ 4. Get Your Connection Strings

For app containers in the same project, use the service name as the hostname:

DB_HOST=my-app-db
DB_PORT=5432
DB_NAME=myapp
DB_USER=myapp_user
DB_PASSWORD=StrongPass@2025
DATABASE_URL=postgresql://myapp_user:StrongPass@2025@my-app-db:5432/myapp

⚠️ Use my-app-db (the service name you set) as the host — NOT localhost or the server IP. Containers in the same Dokploy project communicate with each other by service name over the internal Docker network.

✅ 5. (Optional) Expose PostgreSQL Externally

To connect from your local machine using pgAdmin or TablePlus:

  1. Go to your PostgreSQL service → General tab
  2. Under External Credentials, set External Port to 5433
  3. Click Save
  4. Open the port in the firewall:
   sudo firewall-cmd --permanent --add-port=5433/tcp
   sudo firewall-cmd --reload

  1. Connect from your local machine:
   Host:     568.82.48.166
   Port:     5433
   Database: myapp
   User:     myapp_user
   Password: StrongPass@2025

✅ 6. Monitor and View Logs

  • Monitoring tab — real-time CPU, memory, disk, and network graphs
  • Logs tab — view container logs to diagnose errors

✅ 7. Set Up Automated Backups (Optional)

  1. Go to Settings → Destinations and add an S3 bucket (AWS S3, Cloudflare R2, MinIO, etc.)
  2. In your PostgreSQL service, go to the Backups tab
  3. Select your S3 destination, set a schedule (e.g., daily at 2 AM), and click Save

9️⃣ Ninth Step — Set Up Redis for Your App

Note: Dokploy has its own internal Redis for managing deployment queues. The one you create here is a separate Redis instance for your application — caching, sessions, job queues, etc.

✅ 1. Add a Redis Service to Your Project

  1. Inside your project, click Create New Service
  2. Select Database
  3. Choose Redis
  4. Fill in the form:
Field Example
Service Name my-app-cache
Redis Password RedisPass@2025
Redis Version 7
  1. Click Create

✅ 2. Deploy Redis

  1. Go to the General tab
  2. Click Deploy
  3. Wait for the status to show Running (green)

✅ 3. Get Your Connection Strings

REDIS_HOST=my-app-cache
REDIS_PORT=6379
REDIS_PASSWORD=RedisPass@2025
REDIS_URL=redis://:RedisPass@2025@my-app-cache:6379

For multiple use cases using Redis database numbers (0–15):

# Caching (DB 0)
CACHE_URL=redis://:RedisPass@2025@my-app-cache:6379/0

# Sessions (DB 1)
SESSION_URL=redis://:RedisPass@2025@my-app-cache:6379/1

# Job Queues (DB 2)
QUEUE_URL=redis://:RedisPass@2025@my-app-cache:6379/2

✅ 4. (Optional) Expose Redis Externally for RedisInsight

To manage Redis from your local RedisInsight:

  1. Go to your Redis service → General tab
  2. Under External Credentials, set External Port to 6379
  3. Click Save
  4. Open the port in the firewall:
   sudo firewall-cmd --permanent --add-port=6379/tcp
   sudo firewall-cmd --reload

  1. In RedisInsight, add a new database:
    • Host: 568.82.48.166
    • Port: 6379
    • Username: default
    • Password: RedisPass@2025

🔟 Tenth Step — Deploy Your Application

✅ 1. Add an Application Service

  1. Inside your project, click Create New Service
  2. Select Application
  3. Choose your source type:
    • GitHub / GitLab — connect your repo for auto CI/CD
    • Docker Compose — upload a docker-compose.yml
    • Docker Image — pull from any registry

✅ 2. Set Environment Variables

Go to the Environment tab and add your variables:

DATABASE_URL=postgresql://myapp_user:StrongPass@2025@my-app-db:5432/myapp
REDIS_URL=redis://:RedisPass@2025@my-app-cache:6379
PORT=3333
NODE_ENV=production

Click Save.

✅ 3. Configure a Domain for Your App

  1. Go to the Domains tab
  2. Click Add Domain
  3. Enter your app's subdomain (e.g., app.yourdomain.com)
  4. Set the Container Port your app listens on (e.g., 3333)
  5. Select Let's Encrypt for SSL
  6. Click Save

Make sure app.yourdomain.com also has an A record pointing to your server IP.

✅ 4. Deploy and Verify

  1. Go to the General tab
  2. Click Deploy
  3. Watch the live deployment logs
  4. Once status shows Running, visit https://app.yourdomain.com

⚙️ Managing Dokploy

Useful Docker Swarm Commands

# View all Dokploy platform services
docker service ls

# View all running containers
docker ps

# Check Dokploy panel logs
docker logs $(docker ps -q -f name=dokploy_dokploy)

# Check Traefik logs (for SSL/routing issues)
docker logs $(docker ps -q -f name=dokploy_dokploy-traefik)

# Restart the Dokploy panel
docker service update --force dokploy_dokploy

# Check system resources
docker stats
df -h
free -h

Update Dokploy to Latest Version

curl -sSL https://dokploy.com/install.sh | sh -s update


📝 Troubleshooting

⭐ Dokploy Installer Fails with "Unsupported distribution"

This means Docker was not pre-installed. Go back to Step 3 and install Docker manually first:

sudo dnf config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo
sudo dnf install -y docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin
sudo systemctl enable --now docker

# Then re-run Dokploy installer with your IP
export ADVERTISE_ADDR="568.82.48.166"
curl -sSL https://dokploy.com/install.sh | sh

⭐ Docker Swarm Init Fails / "Could not find IP"

Always export ADVERTISE_ADDR before the installer on AlmaLinux:

export ADVERTISE_ADDR="YOUR_PUBLIC_IP"
curl -sSL https://dokploy.com/install.sh | sh

⭐ Port 3000 Not Accessible

# Check open ports
sudo firewall-cmd --list-ports

# Add port if missing
sudo firewall-cmd --permanent --add-port=3000/tcp
sudo firewall-cmd --reload

# Verify Dokploy is actually running
docker service ls
docker ps | grep dokploy

⭐ SSL Certificate Not Being Issued

# Check Traefik logs for ACME/Let's Encrypt errors
docker logs $(docker ps -q -f name=dokploy_dokploy-traefik) 2>&1 | tail -50

# Ensure HTTP and HTTPS ports are open
sudo firewall-cmd --permanent --add-service=http
sudo firewall-cmd --permanent --add-service=https
sudo firewall-cmd --reload

# Verify domain points to your server
nslookup yourdomain.com

⭐ App Cannot Connect to PostgreSQL or Redis

Use the service name (not localhost) as the hostname in your env vars:

# WRONG
DATABASE_URL=postgresql://user:pass@localhost:5432/mydb

# CORRECT (use your Dokploy service name)
DATABASE_URL=postgresql://user:pass@my-app-db:5432/mydb

Verify services are on the same Docker network:

docker network inspect dokploy-network

⭐ SELinux Blocking Connections (AlmaLinux Specific)

# Allow proxy network connections
sudo setsebool -P httpd_can_network_connect 1

# Check recent SELinux denials
sudo ausearch -m avc -ts recent

⭐ Services Not Auto-Restarting After Reboot

# Ensure Docker starts on boot (required on AlmaLinux)
sudo systemctl enable docker
sudo systemctl status docker


🔑 Quick Reference

Task Command
View all Dokploy services docker service ls
View running containers docker ps
Check Dokploy panel logs docker logs $(docker ps -q -f name=dokploy_dokploy)
Update Dokploy `curl -sSL https://dokploy.com/install.sh \
Open firewall port {% raw %}sudo firewall-cmd --permanent --add-port=PORT/tcp && sudo firewall-cmd --reload
Check open ports sudo firewall-cmd --list-ports
SELinux proxy fix sudo setsebool -P httpd_can_network_connect 1
Restart a Dokploy service docker service update --force SERVICE_NAME

🔑 Ubuntu vs AlmaLinux Key Differences in This Guide

Area Ubuntu AlmaLinux
Docker installation Auto-handled by Dokploy installer Must be done manually first (Step 3)
Docker repo download.docker.com/linux/ubuntu download.docker.com/linux/centos
Package manager apt dnf
Firewall tool ufw firewall-cmd (firewalld)
Firewall persistence ufw enable Built-in with --permanent flag
SELinux Not active by default Active — need setsebool -P httpd_can_network_connect 1
Service boot enable Usually automatic Must run systemctl enable manually
EPEL repo Not needed Required (dnf install epel-release)