Getting Started with Dokploy¶
This guide will help you get started with Dokploy, from installation to deploying your first application.
What is Dokploy?¶
Dokploy is a self-hosted Platform-as-a-Service (PaaS) that simplifies application deployment and management using Docker Swarm. It provides:
- Easy Deployment - Deploy from Git, Docker images, or Docker Compose
- Database Management - Built-in support for PostgreSQL, MySQL, MongoDB, Redis
- SSL Certificates - Automatic Let's Encrypt integration via Traefik
- Team Management - RBAC with teams and permissions
- Monitoring - Built-in metrics and logging
Prerequisites¶
Before installing Dokploy, ensure your system meets these requirements:
Operating System¶
- Supported: Ubuntu 20.04+, Debian 11+, CentOS 8+, RHEL 8+
- Not Supported: macOS, Windows (use Linux VM or WSL2)
Hardware Requirements¶
- RAM: 2GB minimum (4GB+ recommended)
- CPU: 2 cores minimum (4+ recommended)
- Disk: 10GB+ available space
- Network: Stable internet connection
Network Requirements¶
Open the following ports: - Port 80 - HTTP traffic (Traefik) - Port 443 - HTTPS traffic (Traefik) - Port 3000 - Dokploy web UI - Port 2377 - Docker Swarm management (if multi-node)
Access Requirements¶
- Root or sudo access - Required for Docker installation
- Domain name (optional) - For SSL certificates and custom domains
Installation Steps¶
Step 1: Install Dokploy¶
Run the installation script on your Linux server:
This script will: 1. Install Docker 28.5.0 2. Initialize Docker Swarm 3. Deploy PostgreSQL 16 database 4. Deploy Redis 7 cache 5. Deploy Traefik 3.6.1 reverse proxy 6. Deploy Dokploy application
Installation takes approximately 5-10 minutes.
Step 2: Access Dokploy¶
Once installation completes:
-
Open your browser and navigate to:
-
Create your admin account:
- Email address
- Strong password (12+ characters)
-
Confirm password
-
You'll be redirected to the Dokploy dashboard
Step 3: Configure Your First Project¶
- Create a Project
- Click "Create Project"
- Enter project name (e.g., "My First App")
- Add description (optional)
-
Click "Create"
-
Add an Application
- Inside your project, click "Add Application"
- Choose deployment method:
- Git - Deploy from GitHub/GitLab
- Docker - Deploy from Docker image
- Docker Compose - Deploy multi-container app
Step 4: Deploy Your First Application¶
Option A: Deploy from Git¶
# Example: Deploy a Node.js application
Repository: https://github.com/your-username/your-app
Branch: main
Build Command: npm install && npm run build
Start Command: npm start
Port: 3000
Option B: Deploy from Docker Image¶
Option C: Deploy with Docker Compose¶
version: "3.8"
services:
web:
image: nginx:latest
ports:
- "80:80"
networks:
- dokploy-network
networks:
dokploy-network:
external: true
Step 5: Configure Domain and SSL (Optional)¶
- Add Domain
- Go to your application settings
- Click "Domains"
- Add your domain:
app.example.com -
Point your DNS A record to your server IP
-
Configure SSL
- Dokploy automatically requests Let's Encrypt certificates
- Wait 1-2 minutes for certificate provisioning
- Your app will be available at
https://app.example.com
Next Steps¶
Configure Advanced Features¶
- Traefik OVH DNS Setup - Wildcard SSL certificates
- Database Management - Backup and restore databases
- Team Management - Add team members with RBAC
- Monitoring - Set up metrics and alerts
Explore Documentation¶
- Architecture - Understand Dokploy architecture
- Deployment Patterns - Advanced deployment options
- API Reference - Integrate with Dokploy API
- Security Best Practices - Secure your installation
Join the Community¶
- GitHub - Star the repository and open issues
- Documentation - Browse comprehensive guides
- Examples - Check out deployment examples
Common First-Time Setup Tasks¶
1. Change Default PostgreSQL Password¶
# Connect to the PostgreSQL container
docker exec -it dokploy-postgres psql -U postgres
# Change password
ALTER USER postgres WITH PASSWORD 'your_strong_password';
\q
2. Configure Firewall¶
# Using UFW (Ubuntu)
sudo ufw allow 80/tcp
sudo ufw allow 443/tcp
sudo ufw allow 3000/tcp
sudo ufw enable
# Using firewalld (CentOS/RHEL)
sudo firewall-cmd --permanent --add-port=80/tcp
sudo firewall-cmd --permanent --add-port=443/tcp
sudo firewall-cmd --permanent --add-port=3000/tcp
sudo firewall-cmd --reload
3. Set Up Backups¶
# Create backup directory
mkdir -p /backup/dokploy
# Backup PostgreSQL
docker exec dokploy-postgres pg_dump -U postgres dokploy > /backup/dokploy/db-$(date +%Y%m%d).sql
# Backup Traefik certificates
cp /etc/dokploy/traefik/dynamic/acme.json /backup/dokploy/acme-$(date +%Y%m%d).json
4. Configure System Monitoring¶
# Check Docker service status
sudo systemctl status docker
# Check Dokploy services
docker service ls
# View logs
docker service logs dokploy
docker logs dokploy-traefik
Troubleshooting¶
Installation Issues¶
Problem: Installation script fails
# Check system requirements
cat /etc/os-release
free -h
df -h
# Check Docker installation
docker --version
docker ps
Problem: Cannot access Dokploy UI
# Check if Dokploy is running
docker service ls | grep dokploy
# Check Dokploy logs
docker service logs dokploy
# Check firewall
sudo ufw status
Deployment Issues¶
Problem: Application fails to deploy
# Check application logs
docker service logs <service_name>
# Check Docker Swarm status
docker node ls
docker service ps <service_name>
Problem: SSL certificate not generated
# Check Traefik logs
docker logs dokploy-traefik | grep -i acme
docker logs dokploy-traefik | grep -i certificate
# Verify DNS resolution
dig app.example.com
For more detailed troubleshooting, see the Troubleshooting Guide.
Quick Reference¶
Useful Commands¶
# Check Dokploy version
docker exec $(docker ps -q -f name=dokploy) cat package.json | grep version
# Restart Dokploy
docker service update --force dokploy
# View all services
docker service ls
# Scale application
docker service scale app_name=3
# Update Dokploy
curl -sSL https://dokploy.com/install.sh | sh -s update
Default Credentials¶
- Dokploy UI: Set during first access
- PostgreSQL:
postgres/ Check Docker Swarm secrets - Redis: No password by default (change recommended)
Important Paths¶
- Dokploy Config:
/etc/dokploy/ - Traefik Config:
/etc/dokploy/traefik/ - SSL Certificates:
/etc/dokploy/traefik/dynamic/acme.json - Docker Volumes:
/var/lib/docker/volumes/
Getting Help¶
If you encounter issues:
- Check the Troubleshooting Guide
- Review Dokploy logs
- Search GitHub Issues
- Ask in GitHub Discussions
What's Next?¶
Now that you have Dokploy running:
- Deploy More Applications - Try different deployment methods
- Configure Monitoring - Set up metrics and alerting
- Add Team Members - Invite collaborators
- Set Up Backups - Protect your data
- Explore Advanced Features - Custom domains, databases, etc.
Continue with: - Quick Start Guide - Rapid deployment examples - Architecture Overview - Understand the system - Deployment Patterns - Advanced configurations
Next: Quick Start Guide →