Skip to main content

Self-Host Dokploy: Deploy Without Vercel or Netlify

·OSSAlt Team
dokployvercelnetlifyself-hostpaasdockerdeploymentopen-source2026

Self-Host Dokploy: Deploy Without Vercel or Netlify

TL;DR

Dokploy is a free, open-source PaaS that uses Docker Swarm and Traefik to deploy web applications, databases, and Docker Compose stacks — without paying Vercel or Netlify. It launched in 2024 and has grown to 26,000+ GitHub stars. Install takes 2 minutes with a single curl command. The UI is consistently praised as cleaner and more intuitive than older alternatives like CapRover, and the built-in monitoring (CPU, memory, network) is better than Coolify's out of the box.

Key Takeaways

  • Dokploy: 26K+ GitHub stars, Apache 2.0, launched 2024 — fastest-growing self-hosted PaaS
  • Single-command install: curl -sSL https://dokploy.com/install.sh | sh
  • Built on Docker Swarm: multi-node support without Kubernetes complexity
  • Traefik integration: automatic HTTPS, routing, load balancing
  • Deploy anything: Node.js, Next.js, Go, PHP, Python, static sites, Docker Compose stacks
  • Built-in monitoring: real-time CPU, memory, storage, network per service
  • OpenAPI/Swagger documented: REST API with JWT authentication
  • Requirements: Ubuntu 20.04+, 2GB RAM minimum (4GB recommended), 1 vCPU

Dokploy vs. Coolify vs. CapRover

FeatureDokployCoolify v4CapRover
GitHub Stars26K+50K+14K+
Year launched20242021 (v4: 2024)2018
UI quality⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐
Container techDocker SwarmDockerDocker
Traefik routing❌ (Caddy)❌ (nginx)
Multi-node✅ Swarm✅ Multi-server
Nixpacks
One-click templates100+280+100+
Built-in monitoring✅ Best⚠️ Basic⚠️ Via Netdata
API documentation✅ SwaggerLimited
RAM idle~300MB~400MB~200MB
Buildpacks
Preview deployments

Dokploy's main advantage over Coolify: cleaner UI and better built-in monitoring. Coolify's advantage: 280+ one-click templates and Nixpacks support. CapRover is the most resource-efficient if RAM is tight.


Installation

One-Line Install

# Run on Ubuntu 20.04+ / Debian 12
# Requires root (sudo)
curl -sSL https://dokploy.com/install.sh | sh

The script:

  1. Installs Docker if not present
  2. Configures Docker Swarm mode (single-node to start)
  3. Deploys Dokploy as a Docker stack
  4. Opens the web UI on port 3000

Access http://your-server-ip:3000 to complete initial setup.

Manual Install via Docker

# If you prefer manual control:

# 1. Initialize Docker Swarm
docker swarm init --advertise-addr $(hostname -I | awk '{print $1}')

# 2. Create the Dokploy overlay network
docker network create --driver overlay dokploy-network

# 3. Deploy the Dokploy stack
docker stack deploy -c <(curl -fsSL https://dokploy.com/docker-compose.yml) dokploy

# 4. Check deployment status
docker service ls
# Should show: dokploy_traefik, dokploy_dokploy running

Firewall Configuration

# Open required ports
ufw allow 22    # SSH (keep this!)
ufw allow 80    # HTTP
ufw allow 443   # HTTPS
ufw allow 3000  # Dokploy dashboard (restrict after domain setup)
ufw allow 2377  # Docker Swarm manager (if adding worker nodes)
ufw allow 7946  # Docker Swarm node communication
ufw allow 4789  # Docker Swarm overlay network
ufw enable

Deploying Applications

Deploying a Node.js/Next.js App

1. Dashboard → Projects → New Project
2. New Service → Application
3. Select: GitHub / GitLab / Bitbucket
4. Choose your repository and branch
5. Configure:
   Build Command: npm run build
   Start Command: npm run start
   Port: 3000
6. Click Deploy

Dokploy detects common frameworks automatically. For Next.js apps, the default settings usually work without modification.

Deploying with Docker Compose

For multi-container apps, paste your docker-compose.yml directly:

# Example: Next.js + PostgreSQL + Redis
version: "3.8"
services:
  app:
    build: .
    environment:
      DATABASE_URL: postgresql://user:pass@db:5432/myapp
      REDIS_URL: redis://redis:6379
    ports:
      - "3000:3000"
    depends_on:
      - db
      - redis

  db:
    image: postgres:15
    environment:
      POSTGRES_USER: user
      POSTGRES_PASSWORD: pass
      POSTGRES_DB: myapp
    volumes:
      - pg_data:/var/lib/postgresql/data

  redis:
    image: redis:7-alpine

volumes:
  pg_data:

Dokploy converts this to a Docker Swarm stack automatically — volumes, networks, and rolling deploys are handled for you.

Environment Variables

# Via UI: Application → Environment → Add Variable
# Or via API:

curl -X POST "https://your-dokploy.domain/api/application.env.create" \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "applicationId": "your-app-id",
    "env": "DATABASE_URL=postgresql://...\nREDIS_URL=redis://..."
  }'

Custom Domain + Automatic HTTPS

Dokploy uses Traefik to handle routing and Let's Encrypt certificates:

1. DNS: Point your domain A record to your server IP
   app.yourdomain.com → YOUR_SERVER_IP

2. In Dokploy: Application → Domains → Add Domain
   Domain: app.yourdomain.com
   HTTPS: Enable (auto Let's Encrypt)

3. Traefik requests the certificate automatically
   - Certificate issued in ~30 seconds
   - Auto-renewed before expiry

Wildcard Certificates

# For *.yourdomain.com wildcard cert (requires DNS challenge):
# Configure in Dokploy: Settings → Traefik → Certificates

# With Cloudflare DNS:
CLOUDFLARE_DNS_API_TOKEN=your-token

# Add to Traefik configuration in Dokploy settings:
# certificatesResolvers.cloudflare.acme.dnsChallenge.provider=cloudflare

Managed Databases

Dokploy provisions databases as Swarm services with persistent volumes:

Available databases:
  PostgreSQL (12, 14, 15, 16)
  MySQL (5.7, 8.0)
  MariaDB
  MongoDB (5, 6, 7)
  Redis
  Redis Sentinel (HA)

Provisioning:
  Dashboard → New Service → Database → Select type
  → Generates connection string
  → Mounts persistent volume automatically
  → Backups to S3 (configure in settings)
# Connect to a provisioned PostgreSQL instance:
# Dokploy shows the internal connection string for your services:
# postgresql://user:generated-pass@postgres.yourdomain.internal:5432/db

# External access (if needed):
# Dashboard → Database → Enable External Port
# Warning: restrict by IP if exposing externally

Adding Worker Nodes (Multi-Server)

Docker Swarm makes horizontal scaling straightforward:

# On your primary Dokploy server, get the join token:
docker swarm join-token worker

# Output:
# docker swarm join --token SWMTKN-1-xxxxx YOUR_MANAGER_IP:2377

# On each new worker server:
# 1. Install Docker
curl -fsSL https://get.docker.com | sh

# 2. Join the swarm (paste the command from above)
docker swarm join --token SWMTKN-1-xxxxx MANAGER_IP:2377

# 3. In Dokploy dashboard → Servers → the new node appears
# 4. Assign services to specific nodes or let Swarm schedule automatically

Monitoring

Dokploy's built-in monitoring shows real-time metrics per service:

Dashboard → Application → Monitoring tab:
  CPU usage (%)       — line chart, 1-hour history
  Memory usage (MB)   — with container limit shown
  Disk I/O (MB/s)     — read/write
  Network I/O (MB/s)  — inbound/outbound

For full observability stack, add Grafana + Prometheus via template:
  Dashboard → Templates → Monitoring → Grafana + Prometheus
  → Deploys both services, auto-connects to Dokploy metrics

Backup Configuration

# Configure S3-compatible backups for databases
# Dokploy → Settings → S3 Backup

# Compatible with:
#   AWS S3
#   Cloudflare R2 (cheapest at $0/egress)
#   MinIO (self-hosted)
#   Backblaze B2

# Example with Cloudflare R2:
BUCKET_NAME=dokploy-backups
ENDPOINT=https://ACCOUNT_ID.r2.cloudflarestorage.com
ACCESS_KEY_ID=your-r2-access-key
SECRET_ACCESS_KEY=your-r2-secret-key
REGION=auto

# Set backup schedule: daily at 2am
# Retention: 7 days (or custom)

Cost Comparison

Monthly costs for a typical startup (5-10 apps, 1-3 databases):

Vercel Pro + Netlify (hybrid):  $40-150/month + overages
Railway:                        $20-80/month
Render:                         $25-100/month

Dokploy on Hetzner CPX21:       €3.79/month (~$4)
Dokploy on Hetzner CPX31:       €7.49/month (~$8)
Dokploy on Hetzner CCX23:       €15.59/month (~$17, dedicated CPU)

Annual savings vs. Vercel Pro:  $480-1,740/year

Compare all self-hosted deployment options at OSSAlt.

Related: Coolify vs Dokploy vs CapRover 2026 · Self-Host Coolify

Comments