Self Hosting 19 min read

DokPloy Tutorial 2026: The Ultimate Self-Hosted PaaS for Docker & Apps

Suresh S Suresh S
DokPloy Tutorial 2026: The Ultimate Self-Hosted PaaS for Docker & Apps

If you have spent any time deploying modern full-stack web applications, you already know the dilemma: managed cloud platforms like Heroku, Vercel, and Render provide an amazingly smooth “push-to-deploy” developer experience, but their pricing scales aggressively as your traffic, database sizes, and background jobs grow. Before you know it, what started as a simple side project costs hundreds of dollars a month in hosting fees.

For developers seeking complete infrastructure ownership without sacrificing convenience, self-hosted Platform-as-a-Service (PaaS) tools have become essential. While we have previously covered solutions like our Coolify self-hosting guide and our Portainer Docker management guide, there is a newer, exceptionally fast player in the self-hosting ecosystem that has captured developer attention: DokPloy.

Built from the ground up with TypeScript, Next.js, and Docker Swarm, DokPloy turns any bare-metal server or cheap virtual machine into a self-contained, multi-tenant cloud application manager. In this ultimate tutorial, I will walk you through everything you need to know about setting up, securing, and scaling DokPloy in production.

Whether you want to host Node.js microservices, deploy complex Docker Compose stacks, manage self-hosted databases, or automate HTTPS routing with zero hassle, this guide covers it all from a hands-on, practical developer perspective.


What is DokPloy? Architecture & Core Concepts

DokPloy is a free, open-source, self-hosted PaaS designed to simplify application deployment and server management. Instead of forcing you to manually configure web servers, write complex deployment scripts, or manage raw container orchestration primitives, DokPloy provides an intuitive graphical interface that handles the entire application lifecycle.

Underneath its polished user interface, DokPloy integrates several industry-standard open-source technologies:

  • Docker & Docker Swarm Mode: Unlike traditional container managers that run stand-alone containers, DokPloy initializes your host as a Docker Swarm manager. This unlocks native zero-downtime rolling deployments, health checking, container restart policies, and multi-node cluster scaling.
  • Traefik Proxy: DokPloy embeds Traefik as its primary ingress controller and reverse proxy. Traefik automatically discovers containers, routes incoming HTTP/HTTPS traffic to the correct container ports, and handles automatic SSL certificate issuance.
  • Nixpacks & Dockerfile Builders: To convert source code into runnable container images without requiring you to write custom Dockerfiles, DokPloy utilizes Nixpacks (created by Railway). Nixpacks analyzes your code directory, detects whether you are using Node.js, Python, Go, Rust, or PHP, installs required system packages, and compiles an optimized OCI container image automatically.

By uniting these components into a single management pane, DokPloy offers the developer ergonomics of a premium cloud PaaS while running directly on your own infrastructure. When configuring microservices or analyzing API payloads, developer utilities like our interactive JSON Formatter, JSON Validator, YAML to JSON Converter, and JSON to YAML Converter make inspecting data structures fast and error-free. If you understand what cloud computing is, you can think of DokPloy as building your own mini AWS or Render cluster in under five minutes.


DokPloy vs. Coolify vs. CapRover vs. Heroku: A Detailed Comparison

Before installing a new PaaS on your servers, it helps to understand how DokPloy compares to other popular choices in the deployment landscape. If you have evaluated platforms in our AWS vs Azure vs Google Cloud comparison, you know that choosing the right management abstraction saves hundreds of operational hours.

Feature / MetricHeroku (Managed)CoolifyCapRoverDokPloy (Self-Hosted)
Base InfrastructureProprietary DynosRaw Docker EngineDocker SwarmDocker Swarm Mode
Monthly Software Cost$50 - $1,000+ / moFree (Open Source)Free (Open Source)Free (100% Open Source)
Server Hardware CostHigh Cloud MarkupYour VPS CostYour VPS CostYour VPS Cost ($5 - $20/mo)
Reverse Proxy RouterInternal RouterTraefik / CaddyNginxTraefik (Automated)
Build EngineHeroku BuildpacksNixpacks / DockerCaptain DefinitionNixpacks + Dockerfile + Compose
Database ManagementPaid Managed Add-onsOne-Click ServicesOne-Click AppsBuilt-in Postgres, MySQL, Mongo, Redis
Multi-Server ClusteringEnterprise TierSupportedSupportedNative Swarm Node Joining
Resource OverheadManagedModerate (~1.5GB RAM)Low (~500MB RAM)Ultra-Low (~300MB RAM)

Key Differences to Note:

  1. DokPloy vs. Coolify: Coolify is a feature-rich, mature PaaS that supports complex server topologies. However, DokPloy’s architecture feels notably lighter and faster. DokPloy relies strictly on Docker Swarm for all container deployments, giving it superior native load-balancing and zero-downtime rolling updates out of the box.
  2. DokPloy vs. CapRover: CapRover pioneered Docker Swarm PaaS management, but its UI and build toolchain feel dated. DokPloy brings a modern React/Tailwind user experience, instant realtime build logs, and integrated Nixpacks auto-detection.
  3. DokPloy vs. Dokku: Dokku is a fantastic CLI-driven PaaS. However, if your team requires a multi-user visual web dashboard, role-based controls, and graphical database management, DokPloy is much easier to operate.

Server Sizing & System Prerequisites

Because DokPloy runs directly on top of Linux, you can install it on almost any server provider. For high price-to-performance ratio, we recommend deploying on a VPS from Hetzner Cloud, DigitalOcean, Linode, or Vultr. If you are experimenting in a homelab environment, DokPloy runs exceptionally well inside an Ubuntu virtual machine hosted on a Proxmox VE cluster.

  • Operating System: Ubuntu 22.04 LTS or 24.04 LTS (64-bit recommended).
  • CPU: 1 vCPU (2 vCPUs recommended for faster container builds).
  • RAM: 2 GB minimum (4 GB+ recommended if building heavy Node.js or Rust applications).
  • Disk Space: 20 GB SSD/NVMe storage.
  • Architecture: x86_64 or ARM64 (Raspberry Pi 4/5 and Ampere ARM instances are fully supported).

Before starting, ensure your server has a static public IP address. Before pushing your application code, prepare your repository structure cleanly by generating an optimized setup using our interactive .gitignore Generator. If you need a refresher on server hosting fundamentals, consult our guide on what is a VPS and check out our list of the best Linux distros for beginners.


Step-by-Step: Installing DokPloy on Ubuntu Server

Let me guide you through the process of taking a fresh Ubuntu 24.04 server and converting it into a DokPloy deployment cluster.

Step 1: Connect to Your Server & Update Packages

Open your local terminal and connect to your remote server via SSH. If you haven’t hardened your SSH access yet, follow our recommendations on how to secure SSH on Ubuntu.

ssh root@YOUR_SERVER_IP

Once logged in, refresh your system package repository indexes and upgrade existing packages to their latest stable releases:

sudo apt update && sudo apt upgrade -y

Step 2: Configure System Firewall Rules

To allow web traffic and management dashboard access, you must open HTTP (80), HTTPS (443), and the default DokPloy setup port (3000). If you are using Ubuntu’s built-in UFW firewall, check our detailed UFW firewall guide or execute:

sudo ufw allow 22/tcp
sudo ufw allow 80/tcp
sudo ufw allow 443/tcp
sudo ufw allow 3000/tcp
sudo ufw enable

Security Tip: Tools like Fail2ban and CrowdSec can be installed alongside UFW to automatically ban brute-force SSH attempts on your DokPloy server host.

Step 3: Run the Automated DokPloy Installer Script

DokPloy provides an official automated installation script that checks system dependencies, installs Docker Engine if missing, initializes Docker Swarm mode, sets up Traefik network bridges, and pulls the DokPloy container image.

Run the following command in your terminal:

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

During execution, the installer displays clear progress indicators in your terminal:

[INFO] Checking OS compatibility...
[INFO] Installing Docker Engine & Docker Compose plugin...
[INFO] Initializing Docker Swarm Mode on host...
[INFO] Creating Traefik overlay networks...
[INFO] Launching DokPloy Management Container...
[SUCCESS] DokPloy successfully installed!

DokPloy Login Page

If you ever need to lookup terminal syntax while preparing your host OS, check our interactive Linux Command Explorer. For configuring proper file permissions across configuration directories, use our Linux Permission Calculator and File Permission Converter. Furthermore, if you need to create custom background service definitions for host utilities outside Docker, try our Systemd Service Generator. If you need to inspect system service startup processes, our guide on systemd service management explains how Linux manages background daemons. Additionally, check out our technical benchmark on Docker vs Podman.


Initial Setup & Navigating the DokPloy Interface

Once the script finishes, open your browser and navigate to http://YOUR_SERVER_IP:3000.

Creating Your Administrator Account

On your initial visit, DokPloy presents an admin registration screen. Fill in your email address and a strong master password. Because this first account is assigned full super-user privileges across the platform, ensure you generate a cryptographically strong master password using our interactive Password Generator and test its strength using our Password Strength Checker alongside recommendations from our guide to the best password managers. If you are building authentication into your deployed web apps, you can also inspect JWT authorization headers on the fly with our interactive JWT Decoder.

Dashboard Overview

Setting Up Remote Servers & Docker Swarm Nodes

While DokPloy installs locally on your primary server (the Manager Node), it can control multiple worker nodes from a single dashboard.

Navigate to Settings > Servers inside the UI. Here, you can add additional remote VPS servers by providing their SSH connection details or Docker Swarm join tokens.

Server Connection/Setup Page

By leveraging Docker Swarm under the hood, DokPloy allows you to manage distributed microservices across multiple cloud hosts without installing complex cluster management setups like Kubernetes. If you are curious how Kubernetes operates at scale, read our plain-English breakdown of Kubernetes container orchestration explained.


Deploying Applications on DokPloy

DokPloy makes deploying application source code remarkably flexible. You can deploy code directly from GitHub or GitLab repositories, build from custom Dockerfiles, or upload pre-compiled container images.

Let me demonstrate how to deploy a standard application step by step.

Step 1: Create a New Project

  1. Click on Projects in the left sidebar and select Create Project.
  2. Name your project (e.g., production-api or my-saas-frontend).
  3. Inside the project view, click Create Application.

Step 2: Configure the Source Code Provider

Select your deployment provider:

  • GitHub / GitLab: Authenticate your repository. You can select public or private repositories by adding a GitHub Personal Access Token or installing the DokPloy GitHub App.
  • Git Branch: Select the branch you wish to track (e.g., main or production).
  • Build Type:
    • Nixpacks (Automated): Recommended for standard frameworks (Next.js, Express, Django, Laravel, FastAPI, Nuxt, Go). Nixpacks automatically inspects your repository, installs build tools, and compiles your application.
    • Dockerfile: Best when your repository already contains a custom Dockerfile.
    • Docker Image: Select this if you wish to pull a pre-built image directly from Docker Hub or GitHub Container Registry (GHCR).

If you are developing web services, check out our guides on building REST APIs with Node.js and Express, how to deploy a Node.js app on Linux VPS, and mastering the Git and GitHub workflow.

Application Deployment Process

Step 3: Configure Environment Variables & Port Mapping

Inside the application settings tab:

  1. Navigate to Environment Variables. Paste your raw .env contents (e.g., PORT=3000, DATABASE_URL=postgres://..., JWT_SECRET=...). DokPloy encrypts these variables securely on your server host. If you need to generate clean environment files, use our .env Generator. For generating unique application secrets, database salt keys, or API tokens, use our interactive UUID Generator.
  2. Under Network, specify your container’s internal listening port (e.g., 3000 for Next.js or Node apps, 8080 for Go apps). Additionally, if you are setting up complex Traefik path routing or domain redirections, test your matching patterns using our Regex Tester.

Click Deploy. DokPloy streams real-time build logs directly to your dashboard as Nixpacks builds your image and launches the Docker Swarm service.


Managing Databases in DokPloy (One-Click Deployments)

Stateful databases require special persistence considerations. Running databases manually in raw containers without volumes risks data loss. DokPloy solves this by featuring dedicated one-click database management for four major database engines:

  1. PostgreSQL: Ideal for relational data storage and complex query workloads. Read our comparison of PostgreSQL vs MySQL to choose the right database for your stack.
  2. MySQL / MariaDB: Great for traditional CMS platforms, PHP applications, and e-commerce setups.
  3. MongoDB: Perfect for document-based NoSQL application data models.
  4. Redis: High-performance in-memory caching, pub/sub messaging, and session management.

Deploying a Managed PostgreSQL Database Instance

To spin up a database:

  1. Open your DokPloy Project dashboard and select Create Database > PostgreSQL.
  2. Enter a service name (e.g., app-db) and define your database name, user, and password. When setting up production database credentials, generate secure password hashes using our interactive Hash Generator.
  3. DokPloy automatically configures persistent Docker volume mounts on your host filesystem. After exporting database dumps or container volume snapshots, verify file integrity against original checksums using our Hash Checker.

Because your applications and databases run on the same internal Docker Swarm network, your web apps can connect to the database using its internal service name (e.g., postgres://user:pass@app-db:5432/dbname) without exposing database ports to the open internet.

If you ever need to move data into your self-hosted database, use standard file transfer protocols explained in our guide on FTP and SFTP file transfer on Linux.


Deploying Complex Multi-Container Stacks with Docker Compose

One of DokPloy’s strongest features is its native support for Docker Compose. If your infrastructure consists of multiple intertwined services—such as a web frontend, backend API, database, background worker, and cache—you can deploy them all using a single docker-compose.yml file. If you want to quickly build and preview a multi-container stack definition before pasting it into DokPloy, use our interactive Docker Compose Generator.

For example, you can deploy self-hosted open-source software like our guides on deploying n8n with Docker Compose, hosting a private Vaultwarden password manager, setting up an Immich photo management server, running Nextcloud personal cloud storage, or managing documents with Paperless-ngx.

Example: Deploying a Full-Stack Supabase Alternative Stack via Compose

In DokPloy, click Create Compose, select your repository or raw Compose editor, and paste your YAML definition:

version: '3.8'

services:
  web:
    image: node:20-alpine
    command: npm start
    environment:
      - DATABASE_URL=postgres://postgres:secretpassword@db:5432/production
      - REDIS_URL=redis://cache:6379
    labels:
      - "traefik.enable=true"
      - "traefik.http.routers.web.rule=Host(`app.yourdomain.com`)"
      - "traefik.http.routers.web.entrypoints=websecure"
      - "traefik.http.routers.web.tls.certresolver=letsencrypt"

  db:
    image: postgres:16-alpine
    environment:
      POSTGRES_PASSWORD: secretpassword
      POSTGRES_DB: production
    volumes:
      - postgres_data:/var/lib/postgresql/data

  cache:
    image: redis:7-alpine
    volumes:
      - redis_data:/data

volumes:
  postgres_data:
  redis_data:

When you click Deploy Compose, DokPloy translates the YAML structure into a Docker Swarm stack deployment, ensuring all volumes, networks, and services start in proper dependency order.

If you enjoy hosting your own applications, browse our tutorials on setting up Pi-hole DNS ad-blocking, running a Jellyfin media server, setting up Syncthing private file synchronization, hosting Stirling-PDF tools, or deploying local AI using our OpenWebUI setup guide and Ollama Linux installation guide.


Advanced Routing, Custom Domains, and Traefik Setup

Running applications in production requires routing domain names (e.g., api.yourdomain.com) to specific containers while securing all connections with HTTPS.

DokPloy makes domain attachment completely effortless by using Traefik Proxy behind the scenes. Unlike manual proxy configurations using Nginx Proxy Manager, DokPloy automates Traefik label creation dynamically whenever you update domain settings in the UI. If you are transitioning existing sites from Nginx to Traefik, you can generate and compare Nginx reverse proxy directives using our Nginx Config Generator.

Step 1: Configure Your DNS Records

Log in to your DNS provider (such as Cloudflare or your domain registrar). If you need an overview of how domain routing resolves, check out our article on how DNS domain resolution works and what happens when you type a URL.

Add an A record pointing your domain or subdomain to your DokPloy server’s public IP address:

TypeName / HostTarget / ValueTTLProxy Status
Aapp192.0.2.45 (Your Server IP)AutoDNS Only (or Cloudflare Proxied)
A*192.0.2.45 (Wildcard option)AutoDNS Only

Step 2: Attach the Domain in DokPloy

  1. Open your deployed Application dashboard in DokPloy.
  2. Select the Domains tab.
  3. Click Add Domain. Enter your domain name (e.g., app.yourdomain.com).
  4. Set the internal container port (e.g., 3000).
  5. Enable the HTTPS / SSL toggle.

Click Save. DokPloy automatically contacts Let’s Encrypt, completes the HTTP-01 challenge, issues an SSL certificate, and configures Traefik to serve your site securely over HTTPS. For more background on transport security, read our complete guide on how to enable free HTTPS with Let’s Encrypt and understand HTTP protocol basics.

Once your site is live with HTTPS, optimize your search visibility by testing your meta tags with our Meta Tag Preview Tool, generating search engine rules using our Robots.txt Generator, and validating your XML search index with our Sitemap Validator.


Automated Database & Volume Backups via S3

Never run production infrastructure without automated off-site backups! If hardware fails or a container volume becomes corrupted, off-site backups are your only recovery line. We cover this extensively in our guide on backup strategies for self-hosted servers.

DokPloy includes built-in S3-compatible automated backup scheduling for all hosted databases and persistent storage volumes.

Configuring an S3 Backup Destination

  1. In the DokPloy sidebar, go to Settings > Backups.
  2. Click Add Backup Provider.
  3. Select your preferred S3-compatible cloud storage provider:
    • AWS S3
    • Cloudflare R2
    • DigitalOcean Spaces
    • MinIO (Self-Hosted Object Storage)
  4. Enter your S3 Endpoint URL, Access Key, Secret Key, and Target Bucket Name.

Scheduling Automated Database Backups

Navigate to your database instance in DokPloy (e.g., PostgreSQL or MySQL), click on Backups, and create an automated backup rule:

  • Cron Schedule: 0 2 * * * (Runs daily at 2:00 AM). If you need help building custom cron schedule syntax for specific backup intervals, use our interactive Cron Expression Generator.
  • Retention Policy: Keep last 14 backups.
  • Destination: Select your configured S3 provider.

DokPloy will automatically run pg_dump or mysqldump, compress the output, and upload the archive directly to your remote S3 bucket.


Monitoring, Logs, and Scaling

Once your applications are running in production, you need visibility into their performance and status.

Running Application Management Page

Realtime Log Streaming & Diagnostics

DokPloy captures stdout and stderr from all running containers. By opening the Logs tab of any application or database, you can view streaming real-time output. If you are investigating system issues, our guide on reading and analyzing Linux logs explains log levels and diagnostic patterns.

Resource Monitoring & External Tools

From the main dashboard, DokPloy tracks real-time CPU, RAM, and Disk utilization across all host servers.

For comprehensive uptime tracking, we recommend pairing DokPloy with an external monitoring tool like Uptime Kuma. Point Uptime Kuma at your DokPloy applications’ HTTP endpoints to receive instant alerts via Telegram, Discord, or Slack if a service ever stops responding.

If you manage container fleets, you can also run Portainer alongside DokPloy for low-level container inspection, or use automated image update utilities like Watchtower.


Security Hardening & Best Practices for Production

Running your own PaaS means taking security responsibility into your own hands. Review our comprehensive secure home server checklist and implement these critical hardening steps on your DokPloy host:

  1. Disable Root Password SSH Login: Force SSH key-based authentication and disable root password access. Follow our step-by-step instructions to secure SSH on Ubuntu.
  2. Restrict Port 3000 to VPN or Localhost: Once your custom domain and SSL are configured for DokPloy’s admin dashboard (e.g., dokploy.yourdomain.com), block external direct public IP access to port 3000 using your firewall. Connect to your admin panel securely over a VPN or WireGuard tunnel.
  3. Enforce Two-Factor Authentication (2FA): Enable 2FA on your DokPloy admin account and configure single sign-on (SSO) if your team uses centralized identity providers.
  4. Harden Container Security: Ensure containers do not run with unnecessary privileged permissions. Read our guide on securing Docker containers to understand container isolation, user namespaces, and security contexts.
  5. Set Up Automated OS Security Updates: Keep host Linux kernel packages updated automatically using unattended-upgrades. For file system integrity, review our guides on understanding Linux file permissions and firewall security best practices.

Troubleshooting Common DokPloy Deployment Issues

Even with an intuitive PaaS, you may occasionally run into deployment snags. Here are practical solutions to the most common issues developers face when using DokPloy.

1. Build Fails during Nixpacks Compilation

  • Symptom: The build log displays Nixpacks build failed: unable to detect environment.
  • Fix: Ensure your repository root directory contains standard package definition files (e.g., package.json for Node.js, requirements.txt or pyproject.toml for Python, Go.mod for Go). If Nixpacks cannot auto-detect your stack, add a nixpacks.toml file to your repo root or switch the build type to Dockerfile.

2. Domain Shows “404 Not Found” or Traefik Router Error

  • Symptom: Navigating to your custom domain returns a Traefik 404 error page.
  • Fix:
    1. Confirm your domain’s DNS A record correctly resolves to your server IP using dig yourdomain.com.
    2. Verify that the internal container port configured in DokPloy’s Domain tab matches the port your web application listens on internally (e.g., port 3000).
    3. Ensure Traefik is running properly by checking docker service ls on your host.

3. Out of Memory (OOM) Container Kills

  • Symptom: Heavy builds crash abruptly without error logs, or database containers stop unexpectedly.
  • Fix: Compiling modern frameworks like Next.js can spike memory usage. If your VPS has 2GB RAM or less, create a Linux swap file to prevent the OS Out-Of-Memory killer from terminating your build processes:
sudo fallocate -l 4G /swapfile
sudo chmod 600 /swapfile
sudo mkswap /swapfile
sudo swapon /swapfile
echo '/swapfile none swap sw 0 0' | sudo tee -a /etc/fstab

Official Documentation & Community Resources

To stay updated with the latest features, releases, and documentation for DokPloy, refer to the official project links:


Frequently Asked Questions (FAQ)

What hardware requirements are needed to run DokPloy?

DokPloy is extremely lightweight! You can run it on a budget VPS with 1 vCPU and 2GB RAM. However, 2 vCPUs and 4GB RAM are recommended for smoother multi-container application builds and database hosting.

Is DokPloy completely free and open-source?

Yes, DokPloy is 100% open-source software published under the MIT license. You can host it on your own servers without subscription fees, usage limits, or vendor lock-in.

How does DokPloy handle reverse proxying and SSL certificates?

DokPloy includes Traefik as its built-in reverse proxy controller. When you add a domain to an app or database, DokPloy automatically creates Traefik routing rules and provisions free HTTPS certificates using Let’s Encrypt.

Can I deploy multi-container Docker Compose applications in DokPloy?

Yes! DokPloy features native support for Docker Compose YAML definitions. You can paste your compose syntax directly into the dashboard or link your deployment to a docker-compose.yml file stored in your Git repository.

How does DokPloy compare to Coolify or Heroku?

Unlike Heroku, DokPloy runs on your own infrastructure for a fraction of the cost. Compared to Coolify, DokPloy uses Docker Swarm mode for robust native clustering, features an ultra-responsive React dashboard, and has a lower RAM footprint.


Suresh S

Written by Suresh S

Systems Engineer & Tech Educator with 8+ years of experience in Linux Administration, Cloud Computing, and Cybersecurity. Founder of FreeTechLearner, dedicated to creating practical tutorials that help students and professionals build real-world skills.

Share this post:

Discussion

Loading comments...