# Table of Contents - [Welcome to Dokploy | Dokploy](#welcome-to-dokploy-dokploy) - [Installation | Dokploy](#installation-dokploy) - [Uninstall | Dokploy](#uninstall-dokploy) - [Architecture of Dokploy | Dokploy](#architecture-of-dokploy-dokploy) - [Manual Installation | Dokploy](#manual-installation-dokploy) - [Reset Password | Dokploy](#reset-password-dokploy) - [Comparison | Dokploy](#comparison-dokploy) - [Videos | Dokploy](#videos-dokploy) - [Features | Dokploy](#features-dokploy) - [Goodies | Dokploy](#goodies-dokploy) - [Troubleshooting | Dokploy](#troubleshooting-dokploy) - [Dokploy Cloud | Dokploy](#dokploy-cloud-dokploy) - [SSH Keys | Dokploy](#ssh-keys-dokploy) - [Domains | Dokploy](#domains-dokploy) - [Databases | Dokploy](#databases-dokploy) - [Certificates | Dokploy](#certificates-dokploy) - [Registry | Dokploy](#registry-dokploy) - [Open Source Templates | Dokploy](#open-source-templates-dokploy) - [Applications | Dokploy](#applications-dokploy) - [Providers | Dokploy](#providers-dokploy) - [Docker Compose | Dokploy](#docker-compose-dokploy) - [Cluster | Dokploy](#cluster-dokploy) - [Auto Deploy | Dokploy](#auto-deploy-dokploy) - [Multi Server | Dokploy](#multi-server-dokploy) - [Actions | Dokploy](#actions-dokploy) - [Backups | Dokploy](#backups-dokploy) - [Gitlab | Dokploy](#gitlab-dokploy) - [Connection | Dokploy](#connection-dokploy) - [Redis | Dokploy](#redis-dokploy) - [Astro | Dokploy](#astro-dokploy) - [Digital Ocean | Dokploy](#digital-ocean-dokploy) - [Bitbucket | Dokploy](#bitbucket-dokploy) - [Docker Hub | Dokploy](#docker-hub-dokploy) - [Example | Dokploy](#example-dokploy) - [Cloudflare | Dokploy](#cloudflare-dokploy) - [AWS S3 | Dokploy](#aws-s3-dokploy) - [GitHub | Dokploy](#github-dokploy) - [Generated | Dokploy](#generated-dokploy) - [GHCR | Dokploy](#ghcr-dokploy) - [Backblaze B2 | Dokploy](#backblaze-b2-dokploy) - [Advanced | Dokploy](#advanced-dokploy) - [Others | Dokploy](#others-dokploy) - [Cloudflare R2 | Dokploy](#cloudflare-r2-dokploy) - [Build Type | Dokploy](#build-type-dokploy) - [Vue.js | Dokploy](#vue-js-dokploy) - [Zero Downtime | Dokploy](#zero-downtime-dokploy) - [Astro SSR | Dokploy](#astro-ssr-dokploy) - [MySQL | Dokploy](#mysql-dokploy) - [Rollbacks | Dokploy](#rollbacks-dokploy) - [Domains | Dokploy](#domains-dokploy) - [PG Admin | Dokploy](#pg-admin-dokploy) - [Telegram | Dokploy](#telegram-dokploy) - [Going Production | Dokploy](#going-production-dokploy) - [Nest.js | Dokploy](#nest-js-dokploy) - [Mongo Compass | Dokploy](#mongo-compass-dokploy) - [Next.js | Dokploy](#next-js-dokploy) - [Permissions | Dokploy](#permissions-dokploy) - [Instructions | Dokploy](#instructions-dokploy) - [Preact | Dokploy](#preact-dokploy) - [MariaDB | Dokploy](#mariadb-dokploy) - [Lit | Dokploy](#lit-dokploy) - [Qwik | Dokploy](#qwik-dokploy) --- # Welcome to Dokploy | Dokploy On this page Welcome to Dokploy ================== Dokploy is a open source alternative to Heroku, Vercel, and Netlify. Dokploy is a stable, easy-to-use deployment solution designed to simplify the application management process. Think of Dokploy as your free self hostable alternative to platforms like Heroku, Vercel, and Netlify, leveraging the robustness of [Docker](https://www.docker.com/) and the flexibility of [Traefik](https://traefik.io/) . ![Logo](/_next/image?url=%2F_next%2Fstatic%2Fmedia%2Flogo.7cfd81d9.png&w=3840&q=75) [Why Choose Dokploy?](#why-choose-dokploy) ------------------------------------------- * **Simplicity:** Easy setup and management of deployments. * **Flexibility:** Supports a wide range of applications and databases. * **Open Source:** Free and open-source software, available for anyone to use. [Setting up Dokploy](#setting-up-dokploy) ------------------------------------------ Getting started with Dokploy is straightforward. Follow our guides to install and configure your applications and databases effectively. [Setting up](#setting-up) -------------------------- Please go to get started. [### Installation\ \ Learn how to install Dokploy.](/docs/core/installation) [### Applications\ \ Learn how to deploy applications.](/docs/core/applications) [### Databases\ \ Learn how to deploy databases.](/docs/core/databases) [### Traefik\ \ Learn how to deploy Traefik.](/docs/core/traefik/overview) [Next\ \ Architecture of Dokploy](/docs/core/architecture) ### On this page [Why Choose Dokploy?](#why-choose-dokploy) [Setting up Dokploy](#setting-up-dokploy) [Setting up](#setting-up) --- # Installation | Dokploy On this page Installation ============ Get Dokploy up and running on your server within minutes with this easy-to-follow installation guide. Follow these steps in order to set up Dokploy locally and deploy it to your server, effectively managing Docker containers and applications: You need to follow this steps in the same order: 1. [Virtual Private Server (VPS)](#virtual-private-server-vps) [Virtual Private Server (VPS)](#virtual-private-server-vps) ------------------------------------------------------------ There are multiple VPS providers to choose from: We have tested on the following Linux Distros: * Ubuntu 24.04 LTS * Ubuntu 23.10 * Ubuntu 22.04 LTS * Ubuntu 20.04 LTS * Ubuntu 18.04 LTS * Debian 12 * Debian 11 * Debian 10 * Fedora 40 * Centos 9 * Centos 8 ### [Providers](#providers) * [Hostinger](https://www.hostinger.com/vps-hosting?ref=dokploy) Get 20% Discount using this referral link: [Referral Link](https://www.hostinger.com/vps-hosting?REFERRALCODE=1SIUMAURICI97) * [DigitalOcean](https://www.digitalocean.com/pricing/droplets#basic-droplets) Get 200$ credits for free with this referral link: [Referral Link](https://m.do.co/c/db24efd43f35) * [Hetzner](https://www.hetzner.com/cloud/) Get 20€ credits for free with this referral link: [Referral Link](https://hetzner.cloud/?ref=vou4fhxJ1W2D) * [Vultr](https://www.vultr.com/pricing/#cloud-compute) Referral Link: [Referral Link](https://www.vultr.com/?ref=9679828) * [Linode](https://www.linode.com/es/pricing/#compute-shared) * [Scaleway](https://www.scaleway.com/en/pricing/?tags=baremetal,available) * [Google Cloud](https://cloud.google.com/) * [AWS](https://aws.amazon.com/ec2/pricing/) ### [Requirements](#requirements) To ensure a smooth experience with Dokploy, your server should have at least 2GB of RAM and 30GB of disk space. This specification helps to handle the resources consumed by Docker during builds and prevents system freezes. **Suggestion:** For cost efficiency with reliable service, we recommend Hetzner as the best value-for-money VPS provider. ### [Docker](#docker) Dokploy utilizes Docker, so it is essential to have Docker installed on your server. If Docker is not already installed, use the following command to install it automatically: Dokploy Cloud: Use Dokploy directly without worrying about maintenance or updates. Enjoy a hassle-free experience with Dokploy Cloud. [Sign up](https://app.dokploy.com/register) curl -sSL https://dokploy.com/install.sh | sh [Completing the Setup](#completing-the-setup) ---------------------------------------------- After running the installation script, Dokploy and its dependencies will be set up on your server. Here's how to finalize the setup and start using Dokploy: ### [Accessing Dokploy](#accessing-dokploy) Open your web browser and navigate to `http://your-ip-from-your-vps:3000`. You will be directed to the initial setup page where you can configure the administrative account for Dokploy. ### [Initial Configuration](#initial-configuration) 1. **Create an Admin Account:** Fill in the necessary details to set up your administrator account. This account will be the admin account for Dokploy. ![home og image](/_next/image?url=%2Fassets%2Fimages%2Fsetup.png&w=3840&q=75) [Previous\ \ Features](/docs/core/features) [Next\ \ Manual Installation](/docs/core/manual-installation) ### On this page [Virtual Private Server (VPS)](#virtual-private-server-vps) [Providers](#providers) [Requirements](#requirements) [Docker](#docker) [Completing the Setup](#completing-the-setup) [Accessing Dokploy](#accessing-dokploy) [Initial Configuration](#initial-configuration) --- # Uninstall | Dokploy On this page Uninstall ========= Learn how to uninstall Dokploy on your server Follow these steps to completely remove Dokploy and its components from your server. Remove the docker swarm services created by Dokploy: docker service rm dokploy dokploy-traefik dokploy-postgres dokploy-redis Remove the docker volumes created by Dokploy: docker volume rm -f dokploy-postgres-database redis-data-volume Remove the docker network created by Dokploy: docker network rm -f dokploy-network Remove the dokploy files and directories from your server: sudo rm -rf /etc/dokploy [Previous\ \ Reset Password](/docs/core/reset-password) [Next\ \ Videos](/docs/core/videos) ### On this page No Headings --- # Architecture of Dokploy | Dokploy On this page Architecture of Dokploy ======================= Overview of the core architecture components of Dokploy. Understanding the architecture of Dokploy is crucial for both deploying and scaling applications. Below is a diagram illustrating the core components: ![Architecture Diagram](/_next/image?url=%2Fassets%2Farchitecture.png&w=3840&q=75) [Installation Process](#installation-process) ---------------------------------------------- When Dokploy is installed, it automatically sets up the following components: 1. **Next.js Application**: Serves as the frontend interface. Utilizing Next.js allows for an integrated server-side rendering experience, streamlining the UI and backend into a single cohesive application. 2. **PostgreSQL Database**: Acts as the primary database for Dokploy, chosen for its robustness and widespread adoption. It stores all the configuration and operational data. 3. **Redis Database**: Employed for managing deployment queues. This ensures that multiple deployments do not trigger simultaneously, which could lead to high server load and potential freezing. 4. **Traefik**: Used as a reverse proxy and load balancer. Traefik facilitates dynamic routing and service discovery which simplifies the configuration process by allowing declarative setup through the UI. [Purpose and Functionality](#purpose-and-functionality) -------------------------------------------------------- Each component in the Dokploy architecture plays a vital role: * **Next.js**: Provides a scalable and easy-to-manage frontend framework, encapsulating both server and client-side logic in one platform. This simplifies deployment and development workflows. * **PostgreSQL**: Delivers reliable and secure data storage capabilities. Its use within Dokploy ensures consistency and high performance for all database operations. * **Redis**: Handles concurrency and job scheduling. By using Redis, Dokploy can efficiently manage deployment tasks, avoiding collisions and server overload during simultaneous operations. * **Traefik**: Enhances Docker integration. Its ability to read from and write to Docker configurations declaratively allows Dokploy to automate and streamline network traffic management and service discovery. This structure ensures that Dokploy is not only efficient in deploying applications but also robust in handling traffic and data at scale. [Previous\ \ Welcome to Dokploy](/docs/core) [Next\ \ Features](/docs/core/features) ### On this page [Installation Process](#installation-process) [Purpose and Functionality](#purpose-and-functionality) --- # Manual Installation | Dokploy On this page Manual Installation =================== Learn how to manually install Dokploy on your server. If you wish to customize the Dokploy installation on your server, you can modify several enviroment variables: 1. **PORT** - Ideal for avoiding conflicts with other services. 2. **TRAEFIK\_SSL\_PORT** - Set to another port if you want to use a different port for SSL. 3. **TRAEFIK\_PORT** - Set to another port if you want to use a different port for Traefik. 4. **ADVERTISE\_ADDR** - Set to another IP address if you want to use a different IP address for Swarm. 5. **RELEASE\_TAG** - Set to a dokploy docker hub tag(latest, canary, feature, etc) [Installation Script](#installation-script) -------------------------------------------- Here is a Bash script for installing Dokploy on a Linux server. Make sure you run this as root on a Linux environment that is not a container, and ensure ports 80 and 443 are free. #!/bin/bash # Ensure the script is run as root if [ "$(id -u)" != "0" ]; then echo "This script must be run as root" >&2 exit 1 fi # Check for Linux OS (not macOS or inside a Docker container) if [ "$(uname)" = "Darwin" ]; then echo "This script must be run on Linux" >&2 exit 1 fi if [ -f /.dockerenv ]; then echo "This script must be run on a native Linux host" >&2 exit 1 fi # Check for occupied ports if ss -tulnp | grep ':80 ' >/dev/null; then echo "Error: Port 80 is already in use" >&2 exit 1 fi if ss -tulnp | grep ':443 ' >/dev/null; then echo "Error: Port 443 is already in use" >&2 exit 1 fi # Function to check if a command exists command_exists() { command -v "$@" > /dev/null 2>&1 } # Install Docker if it is not installed if command_exists docker; then echo "Docker already installed" else curl -sSL https://get.docker.com | sh fi # Initialize Docker Swarm docker swarm leave --force 2>/dev/null get_ip() { # Try to get IPv4 local ipv4=$(curl -4s https://ifconfig.io 2>/dev/null) if [ -n "$ipv4" ]; then echo "$ipv4" else # Try to get IPv6 local ipv6=$(curl -6s https://ifconfig.io 2>/dev/null) if [ -n "$ipv6" ]; then echo "$ipv6" fi fi } advertise_addr="${ADVERTISE_ADDR:-$(get_ip)}" docker swarm init --advertise-addr $advertise_addr if [ $? -ne 0 ]; then echo "Error: Failed to initialize Docker Swarm" >&2 exit 1 fi docker network rm -f dokploy-network 2>/dev/null docker network create --driver overlay --attachable dokploy-network echo "Network created" mkdir -p /etc/dokploy chmod 777 /etc/dokploy # Pull and deploy Dokploy docker pull dokploy/dokploy:latest docker service create \ --name dokploy \ --replicas 1 \ --network dokploy-network \ --mount type=bind,source=/var/run/docker.sock,target=/var/run/docker.sock \ --mount type=bind,source=/etc/dokploy,target=/etc/dokploy \ --publish published=3000,target=3000,mode=host \ --update-parallelism 1 \ --update-order stop-first \ -e PORT= \ -e TRAEFIK_SSL_PORT= \ -e TRAEFIK_PORT= \ -e ADVERTISE_ADDR=$advertise_addr \ dokploy/dokploy:latest # Output success message GREEN="\033[0;32m"\ YELLOW="\033[1;33m"\ BLUE="\033[0;34m"\ NC="\033[0m" # No Color\ printf "${GREEN}Congratulations, Dokploy is installed!${NC}\n"\ printf "${BLUE}Wait 15 seconds for the server to start${NC}\n"\ printf "${YELLOW}Please go to http://${advertise_addr}:3000${NC}\n\n"\ \ This script includes checks for common pitfalls, installs Docker if it’s not already installed, initializes a Docker Swarm, creates a network, and then pulls and deploys Dokploy. After the script runs, it provides a success message and instructions for accessing Dokploy.\ \ This structured format clearly lays out the prerequisites, steps, and post-installation information, making it user-friendly and accessible for those performing manual installations.\ \ [Customize install](#customize-install)\ \ ----------------------------------------\ \ #### [Customize swarm advertise address](#customize-swarm-advertise-address)\ \ The --advertise-addr parameter in the docker swarm init command specifies the IP address or interface that the Docker Swarm manager node should advertise to other nodes in the Swarm. This address is used by other nodes to communicate with the manager.\ \ By default, this script uses the external IP address of the server, obtained using the `curl -s ifconfig.me` command. However, you might need to customize this address based on your network configuration, especially if your server has multiple network interfaces or if you're setting up Swarm in a private network.\ \ To customize the --advertise-addr parameter, replace the line: `advertise_addr=$(curl -s ifconfig.me)` with your desired IP address or interface, for example: `advertise_addr="192.168.1.100"`\ \ :warning: This IP address should be accessible to all nodes that will join the Swarm.\ \ [Existing Docker swarm](#existing-docker-swarm)\ \ ------------------------------------------------\ \ If you already have a Docker swarm running on your server and you want to use dokploy, you can use the following command to join it:\ \ docker network create --driver overlay --attachable dokploy-network\ \ mkdir -p /etc/dokploy\ \ chmod -R 777 /etc/dokploy\ \ docker pull dokploy/dokploy:latest\ \ # Installation\ docker service create \\ --name dokploy \\ --replicas 1 \\ --network dokploy-network \\ --mount type=bind,source=/var/run/docker.sock,target=/var/run/docker.sock \\ --mount type=bind,source=/etc/dokploy,target=/etc/dokploy \\ --publish published=3000,target=3000,mode=host \\ --update-parallelism 1 \\ --update-order stop-first \\ dokploy/dokploy:latest\ \ [Previous\ \ Installation](/docs/core/installation)\ [Next\ \ Reset Password](/docs/core/reset-password)\ \ ### On this page\ \ [Installation Script](#installation-script)\ [Customize install](#customize-install)\ [Customize swarm advertise address](#customize-swarm-advertise-address)\ [Existing Docker swarm](#existing-docker-swarm) --- # Reset Password | Dokploy On this page Reset Password ============== Reset your password to access your Dokploy account. To reset your password, follow these steps: Log in to your VPS. Run the command below to get the container ID of the dokploy container. docker ps Run command below to open a shell in the dokploy container. docker exec -it bash -c "pnpm run reset-password" It will display a random password. Copy it and use it to access again to the dashboard. [Previous\ \ Manual Installation](/docs/core/manual-installation) [Next\ \ Uninstall](/docs/core/uninstall) ### On this page No Headings --- # Comparison | Dokploy On this page Comparison ========== A comparison of Dokploy, CapRover, Dokku, and Coolify Comparison of the following deployment tools: | Feature | Dokploy | CapRover | Dokku | Coolify | | --- | --- | --- | --- | --- | | **User Interface** | ✅ | ✅ | ❌ | ✅ | | **Docker compose support** | ✅ | ❌ | ❌ | ✅ | | **API/CLI** | ✅ | ✅ | ✅ | ✅ | | **Multi node support** | ✅ | ✅ | ❌ | ✅ | | **Traefik Integration** | ✅ | ✅ | Available via Plugins | ✅ | | **User Permission Management** | ✅ | ❌ | ❌ | ✅ | | **Bitbucket Integration** | ✅ | ❌ | ❌ | ❌ | | **Gitlab Integration** | ✅ | ❌ | ❌ | ❌ | | **Advanced User Permission Management** | ✅ | ❌ | ❌ | ❌ | | **Terminal Access Built In** | ✅ | ❌ | ❌ | ✅ | | **Database Support** | ✅ | ✅ | ❌ | ✅ | | **Monitoring** | ✅ | ✅ | ❌ | ❌ | | **Backups** | ✅ | Available via Plugins | Available via Plugins | ✅ | | **Open Source** | ✅ | ✅ | ✅ | ✅ | | **Notifications** | ✅ | ❌ | ❌ | ✅ | | **Multi Server Support** | ✅ | ❌ | ❌ | ✅ | | **Open Source Templates** | ✅ | ✅ | ❌ | ✅ | | **Shared Enviroment Variables** | ✅ | ❌ | ❌ | ✅ | | **Schedules Jobs** | ❌ | ❌ | ❌ | ✅ | | **Cloudflare Tunnels** | ❌ | ❌ | ❌ | ✅ | | **Preview Deployments** | ✅ | ❌ | ❌ | ✅ | | **Teams** | ❌ | ❌ | ❌ | ✅ | | **Cloud/Paid Version** | ✅ | ✅ | ✅ | ✅ | [Previous\ \ Videos](/docs/core/videos) [Next\ \ Goodies](/docs/core/goodies) ### On this page No Headings --- # Videos | Dokploy On this page Videos ====== Videos about how to install and use Dokploy. [Dokploy Cloud - Introduction](#dokploy-cloud---introduction) -------------------------------------------------------------- [My Favorite Way to deploy Applications](#my-favorite-way-to-deploy-applications) ---------------------------------------------------------------------------------- [Introduction to Dokploy](#introduction-to-dokploy) ---------------------------------------------------- [Deploy docker compose on a VPS \[Dokploy\]](#deploy-docker-compose-on-a-vps-dokploy) -------------------------------------------------------------------------------------- [How to Setup Dokploy Self-Hosting on A Hetzner Server | BEST Coolify Alternative](#how-to-setup-dokploy-self-hosting-on-a-hetzner-server--best-coolify-alternative) --------------------------------------------------------------------------------------------------------------------------------------------------------------------- [FREE: Dokploy Self-Hosted 🐳 CANCEL VERCEL! 🚨 Coolify, Caprover, Alternative - Open Source](#free-dokploy-self-hosted--cancel-vercel--coolify-caprover-alternative---open-source) ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ [Say Goodbye to Vercel and Heroku with Dokploy Install](#say-goodbye-to-vercel-and-heroku-with-dokploy-install) ---------------------------------------------------------------------------------------------------------------- [Previous\ \ Uninstall](/docs/core/uninstall) [Next\ \ Comparison](/docs/core/comparison) ### On this page [Dokploy Cloud - Introduction](#dokploy-cloud---introduction) [My Favorite Way to deploy Applications](#my-favorite-way-to-deploy-applications) [Introduction to Dokploy](#introduction-to-dokploy) [Deploy docker compose on a VPS \[Dokploy\]](#deploy-docker-compose-on-a-vps-dokploy) [How to Setup Dokploy Self-Hosting on A Hetzner Server | BEST Coolify Alternative](#how-to-setup-dokploy-self-hosting-on-a-hetzner-server--best-coolify-alternative) [FREE: Dokploy Self-Hosted 🐳 CANCEL VERCEL! 🚨 Coolify, Caprover, Alternative - Open Source](#free-dokploy-self-hosted--cancel-vercel--coolify-caprover-alternative---open-source) [Say Goodbye to Vercel and Heroku with Dokploy Install](#say-goodbye-to-vercel-and-heroku-with-dokploy-install) --- # Features | Dokploy On this page Features ======== Explore the comprehensive suite of features available in Dokploy for optimized application deployment and management. Dokploy provides a comprehensive suite of features designed to simplify and enhance the application deployment process. [Application Deployment](#application-deployment) -------------------------------------------------- Dokploy supports two primary methods for deploying applications: 1. **Applications**: This straightforward method allows for effortless deployment. Ideal for single applications, it offers a near plug-and-play experience. 2. **Docker Compose**: A more advanced option, requiring the creation of Dockerfiles and `docker-compose.yml`. This method provides greater control over deployment settings and full utilization of Docker Compose capabilities. ### [Applications Management](#applications-management) Manage your applications through a range of features: **Basic Operations**: 1. Deploy, stop, and delete applications. 2. Open a terminal directly in the application container. **Source and Build Configuration**: 1. Choose source providers (GitHub, Git, Docker). 2. Select build types (Docker, Nixpacks, Heroku Buildpacks, Paketo Buildpacks). **Environment Management**: 1. Add and manage environment variables. **Monitoring Tools**: 1. Monitor CPU, memory, disk, and network usage. **Logs**: 1. Access real-time logs. **Deployments**: 1. View and manage deployments, you can see the logs of the building application. 2. Cancel queued deployments in case you have a lot of deployments in the queue, the most common is when you push alot of times in your repository, you can cancel the incoming queues, not the deployments that are already running. **Domain Management**: 1. Add, delete, and generate domains. **Advanced Settings**: 1. Customize initial commands and cluster settings. 2. Set resource limits and manage volumes for data persistence. 3. Configure redirects, security headers, and port settings. 4. Detailed Traefik configuration for specific needs. ### [Docker Compose Management](#docker-compose-management) Enhance your Docker Compose experience with these advanced functionalities: **Lifecycle Management**: 1. Deploy, stop, and delete Docker Compose setups. 2. Open a terminal with service selection capability. **Source Configuration**: 1. Choose source providers (GitHub, Git, Raw). **Environment Management**: 1. Add and manage environment variables. **Monitoring Tools**: 1. Monitor CPU, memory, disk, and network usage of each service. **Logs**: 1. View real-time logs of each service. **Deployments**: 1. View and manage deployments, you can see the logs of the building application. 2. Cancel queued deployments in case you have a lot of deployments in the queue, the most common is when you push alot of times in your repository, you can cancel the incoming queues, not the deployments that are already running. **Advanced Settings**: 1. Append command, by default we use a internal command to build the docker compose however, you can append a command to the existing one. 2. Manage volumes and mounts. [Database Deployment](#database-deployment) -------------------------------------------- Deploy and manage a variety of databases: **Supported Databases**: 1. MySQL, PostgreSQL, MongoDB, Redis, MariaDB. **General Management**: 1. Deploy, stop, and delete databases. 2. Open a terminal within the database container. **Environment and Monitoring**: 1. Manage environment variables. 2. Monitor CPU, memory, disk, and network usage. **Backups and Logs**: 1. Configure manual and scheduled backups. 2. View real-time logs. **Advanced Configuration**: 1. Use custom Docker images and initial commands. 2. Configure volumes and resource limits. These features are designed to offer flexibility and control over your deployment environments, ensuring that Dokploy meets the diverse needs of modern application deployment and management. [Previous\ \ Architecture of Dokploy](/docs/core/architecture) [Next\ \ Installation](/docs/core/installation) ### On this page [Application Deployment](#application-deployment) [Applications Management](#applications-management) [Docker Compose Management](#docker-compose-management) [Database Deployment](#database-deployment) --- # Goodies | Dokploy On this page Goodies ======= Dokploy has certain goodies that are external that can be used with Dokploy. 1. **Ansible Dokploy**: Ansible role to deploy Dokploy [Ansible Role](https://github.com/jacobtipp/ansible-dokploy) 2. **Dokploy Oracle infrastructure**: Deploy Dokploy on Oracle infrastructure [Github](https://github.com/statickidz/dokploy-oci-free) 3. **Dokploy Deploy Action 1**: Automatic Dokploy deploments on Github [Github](https://github.com/benbristow/dokploy-deploy-action) 4. **Dokploy Deploy Action 2**: Automatic Dokploy deploments on Github [Github](https://github.com/jmischler72/dokploy-deploy-action) 5. **Dokploy JS Sdk**: Dokploy JS SDK [Github](https://github.com/quiint/dokploy.js) 6. **Templates Collection** : Docker compose collection for Dokploy [Github](https://github.com/benbristow/dokploy-compose-templates) 7. **Dokploy Port Updater**: Dokploy Port Updater [Github](https://github.com/clockradios/dokploy-port-updater) 8. **Dokli TUI**: Dokli TUI [Github](https://github.com/jonykalavera/dokli) Want to submit your own? [Submit a PR](https://github.com/Dokploy/website/blob/main/README.md) [Previous\ \ Comparison](/docs/core/comparison) [Next\ \ Troubleshooting](/docs/core/troubleshooting) ### On this page No Headings --- # Troubleshooting | Dokploy On this page Troubleshooting =============== Solve the most common problems that occur when using Dokploy. [Applications Domain Not Working?](#applications-domain-not-working) --------------------------------------------------------------------- You see the deployment succeeded, and logs are running, but the domain isn't working? Here's what to check: 1. **Correct Port Mapping**: Ensure the domain is using the correct port for your application. For example, if you're using Next.js, the port should be `3000`, or for Laravel, it should be `8000`. If you change the app port, update the domain to reflect that. 2. **Avoid Using `Ports` in Advanced Settings**: Generally, there's no need to use the `Ports` feature unless you want to access your app via `IP:port`. Leaving this feature enabled may interfere with your domain. 3. **Let's Encrypt Certificates**: It's crucial to point the domain to your server’s IP **before** adding it in Dokploy. If the domain is added first, the certificate won’t be generated, and you may need to recreate the domain or restart Traefik. 4. **Listen on 0.0.0.0, Not 127.0.0.1**: If your app is bound to `127.0.0.1` (which is common in Vite apps), switch it to `0.0.0.0` to allow external access. [Logs and Monitoring Not Working After Changing Application Placement?](#logs-and-monitoring-not-working-after-changing-application-placement) ----------------------------------------------------------------------------------------------------------------------------------------------- This is expected behavior. If the application is running on a different node (worker), the UI won’t have access to logs or monitoring, as they're not on the same node. [Mounts Are Causing My Application Not to Run?](#mounts-are-causing-my-application-not-to-run) ----------------------------------------------------------------------------------------------- Docker Swarm won't run your application if there are invalid mounts, even if the deployment shows as successful. Double-check your mounts to ensure they are valid. [Volumes in Docker Compose Not Working?](#volumes-in-docker-compose-not-working) --------------------------------------------------------------------------------- For Docker Compose, all file mounts defined in the `volumes` section will be stored in the `files` folder. This is the default directory structure: [I added a volume to my docker compose, but is not finding the volume?](#i-added-a-volume-to-my-docker-compose-but-is-not-finding-the-volume) ---------------------------------------------------------------------------------------------------------------------------------------------- For docker compose all the file mounts you've created in the volumes section will be stored to files folder, this is the default structure of the docker compose. /application-name /code /files So instead of using this invalid way to mount a volume: volumes: - "/folder:/path/in/container" ❌ You should use this format: volumes: - "../files/my-database:/var/lib/mysql" ✅ - "../files/my-configs:/etc/my-app/config" ✅ [Logs Not Loading When Deploying to a Remote Server?](#logs-not-loading-when-deploying-to-a-remote-server) ----------------------------------------------------------------------------------------------------------- There are a few potential reasons for this: 1. **Slow Server:**: If the server is too slow, it may struggle to handle concurrent requests, leading to SSL handshake errors. 2. **Insufficient Disk Space:** If the server doesn't have enough disk space, the logs may not load. [Docker Compose Domain Not Working?](#docker-compose-domain-not-working) ------------------------------------------------------------------------- When adding a domain in your Docker Compose file, it’s not necessary to expose the ports directly. Simply specify the port where your app is running. Exposing the ports can lead to conflicts with other applications or ports. Example of what not to do: services: app: image: dokploy/dokploy:latest ports: - 3000:3000 Recommended approach: services: app: image: dokploy/dokploy:latest ports: - 3000 - 80 This is only valid for Docker Compose not for Docker Stack. When using Docker Stack, the ports are exposed automatically, so you don't need to specify them explicitly. Example of what not to do: services: app: image: dokploy/dokploy:latest ports: - 3000 Recommended approach: services: app: image: dokploy/dokploy:latest expose: - 3000 Then, when creating the domain in Dokploy, specify the service name and port, like this: domain: my-app.com serviceName: app port: 3000 [Previous\ \ Goodies](/docs/core/goodies) [Next\ \ Dokploy Cloud](/docs/core/cloud) ### On this page [Applications Domain Not Working?](#applications-domain-not-working) [Logs and Monitoring Not Working After Changing Application Placement?](#logs-and-monitoring-not-working-after-changing-application-placement) [Mounts Are Causing My Application Not to Run?](#mounts-are-causing-my-application-not-to-run) [Volumes in Docker Compose Not Working?](#volumes-in-docker-compose-not-working) [I added a volume to my docker compose, but is not finding the volume?](#i-added-a-volume-to-my-docker-compose-but-is-not-finding-the-volume) [Logs Not Loading When Deploying to a Remote Server?](#logs-not-loading-when-deploying-to-a-remote-server) [Docker Compose Domain Not Working?](#docker-compose-domain-not-working) --- # Dokploy Cloud | Dokploy On this page Dokploy Cloud ============= Deploy your apps to multiple servers remotely without worrying about the underlying infrastructure. Dokploy Cloud allows you to deploy your apps to a cloud provider of your choice. This means that you can deploy your apps to any cloud provider, such as AWS, GCP, Azure, or DigitalOcean, without having to worry about the underlying infrastructure. By default when you install Dokploy in a Self Hosted version, if you deploy all your applications by default they will be deployed on the same server where Dokploy UI is installed. This means that you will need to build and run your applications where Dokploy UI is installed, which can be a challenge if you don't have the resources to do so, also self hosted support for remote instances. Dokploy cloud starts from $4.50 per month per server, the next is 3.50$, and you can deploy as many applications you want to your remote server connected to a dokploy cloud, multi server feature is recommended for HA and scalability projects. You can start by registering on the [Dokploy Cloud](https://app.dokploy.com) website and follow the steps to deploy your apps, see the [Pricing](https://dokploy.com#pricing) page for more information. [Previous\ \ Troubleshooting](/docs/core/troubleshooting) [Next\ \ Actions](/docs/core/actions) ### On this page No Headings --- # SSH Keys | Dokploy On this page SSH Keys ======== Configure your SSH keys to access your servers or clone Private Repositories. Dokploy provides a section exclusively for SSH keys, allowing you to manage your SSH keys in a centralized location. SSH Keys can be used for two purposes: * **Private Repositories**: You can use SSH Keys, to access to private repositories, this is only for `Git` provider in your application or docker compose. * **Multi Server**: You can use SSH Keys, to access remotely to your servers via SSH. To create a SSH Key, is a very easy process, just click on `Create SSH Key` We offer two SSH Keys Generation types: 1. **RSA Key**: This is the most commonly used key type, and generates a 2048-bit RSA key. 2. **Ed25519 Key**: This is a newer key type that generates a 256-bit Ed25519 key. You can also create or paste your own SSH Key, you can edit the `Private Key` and `Public Key` fields without restrictions, make sure to use the correct format for the key type you are using. Once you create a SSH Key you will not be able to read the `Private Key` anymore. [Previous\ \ GHCR](/docs/core/registry/ghcr) [Next\ \ Certificates](/docs/core/certificates) ### On this page No Headings --- # Domains | Dokploy On this page Domains ======= This section outlines how to configure domains for your applications in Dokploy, ensuring that your applications are accessible via custom URLs. Dokploy Provide 2 ways to add a domain to your service: 1. **Free Domains** from Traefik.me 2. **Buy a domain** from one of the providers above If you don't have a domain, you can use our integrated free domains from Traefik.me in the Dokploy panel, without doing any configuration however is only for HTTP, if you want to have a HTTPS domain you need to buy a domain from one of the providers above. Domains are supported for: * **Applications** * **Docker Compose** [Requirements (Optional)](#requirements-optional) -------------------------------------------------- We recommend this if you want to have a HTTPS domain, you need to buy a domain from one of the providers above. * [Cloudflare](https://www.cloudflare.com/) * [Porkbun](https://porkbun.com/) * [Namecheap](https://www.namecheap.com/domains/) * [Name.com](https://www.name.com/) * [GoDaddy](https://www.godaddy.com/) * [Domain.com](https://www.domain.com/) ### [Add Domain](#add-domain) Associate custom domains with your application to make it accessible over the internet. * **Host**: The domain name that you want to link to your application (e.g., `api.dokploy.com`). * **Path**: The specific path within the domain where the application should be accessible. * **Container Port**: The port on the container that the domain should route to. * **HTTPS**: Toggle this on to enable HTTPS for your domain, providing secure, encrypted connections. * **Certificate**: Select (letsencrypt) or (None) ### [Note](#note) Proper domain configuration is crucial for the accessibility and security of your application. Always verify domain settings and ensure that DNS configurations are properly set up to point to the correct IP addresses. Enable HTTPS to enhance security and trust, especially for production environments. ### [Important Clarification on Container Ports](#important-clarification-on-container-ports) The "Container Port" specified in the domain settings is exclusively for routing traffic to the correct application container through Traefik, and does not expose the port directly to the internet. This is fundamentally different from the port settings in the "Advanced -> Ports" section, which are used to directly expose application ports. The container port in the domain settings ensures that Traefik can internally direct traffic to the specified port within the container based on the domain configuration. [Previous\ \ Certificates](/docs/core/certificates) [Next\ \ Cloudflare](/docs/core/domains/cloudflare) ### On this page [Requirements (Optional)](#requirements-optional) [Add Domain](#add-domain) [Note](#note) [Important Clarification on Container Ports](#important-clarification-on-container-ports) --- # Databases | Dokploy On this page Databases ========= Discover how to create and backup databases easily with Dokploy, supporting a variety of database systems. Dokploy simplifies the process of creating and managing databases, offering robust options for both setup and backups. [Database Support](#database-support) -------------------------------------- Dokploy currently supports a range of popular database systems, ensuring compatibility and flexibility for your projects: * **Postgres**: Robust, SQL-compliant and highly reliable. * **MySQL**: Widely used relational database known for its performance and flexibility. * **MariaDB**: A fork of MySQL with additional features and improved performance. * **MongoDB**: A NoSQL database known for its high scalability and flexibility. * **Redis**: An in-memory key-value store often used as a database, cache, and message broker. We offer multiple functionalities that you can use to manage your databases, such as: [General](#general) -------------------- Actions like deploying, updating, and deleting your database, and stopping it. [Environment](#environment) ---------------------------- If you need to assign environment variables to your application, you can do so here. In case you need to use a multiline variable, you can wrap it in double quotes just like this `'"here_is_my_private_key"'`. [Monitoring](#monitoring) -------------------------- Four graphs will be displayed for the use of memory, CPU, disk, and network. Note that the information is only updated if you are viewing the current page, otherwise it will not be updated. [Backups](#backups) -------------------- We offer automated backups for your databases, ensuring that you can recover your data quickly and easily in case of any issues, you can setup a S3 Destinations in settings to store your backups. [Logs](#logs) -------------- If you want to see any important logs from your application that is running, you can do so here and determine if your application is displaying any errors or not. [Advanced](#advanced) ---------------------- This section provides advanced configuration options for experienced users. It includes tools for custom commands within the container, managing Docker Swarm settings, and adjusting cluster settings such as replicas and registry selection. These tools are typically not required for standard application deployment and are intended for complex management and troubleshooting tasks. * **Custom Docker Image**: You can change the Docker image used to run your database. * **Run Command**: Execute custom commands directly in the container for advanced management or troubleshooting. * **Volumes**: To ensure data persistence across deployments, configure storage volumes for your application. * **Resources**: Adjust the CPU and memory allocation for your application. [Previous\ \ Example](/docs/core/docker-compose/example) [Next\ \ Backups](/docs/core/databases/backups) ### On this page [Database Support](#database-support) [General](#general) [Environment](#environment) [Monitoring](#monitoring) [Backups](#backups) [Logs](#logs) [Advanced](#advanced) --- # Certificates | Dokploy On this page Certificates ============ Configure your certificates to secure your applications. Dokploy offers a UI to manage your certificates. We expose a UI to create and delete the certificates, we ask two fields: 1. **Name**: Enter a name for the certificate (this can be anything you choose). 2. **Certificate Data**: Provide the certificate details. 3. **Private Key**: Enter the private key. 4. **(Optional) Server**: If you want to create a certificate for a server, you can select it here. This action will create the files, but that doesn't mean it will work automatically. You need to adjust the Traefik configuration to use it, this configuration will make to traefik can recognize the certificate. [Previous\ \ SSH Keys](/docs/core/ssh-keys) [Next\ \ Domains](/docs/core/domains) ### On this page No Headings --- # Registry | Dokploy On this page Registry ======== Configure your registry settings to store your images and artifacts. Dokploy offers a UI to connect to any Docker Registry. [Registry Settings](#registry-settings) ---------------------------------------- You need to fill the form with the following details: * **Registry Name**: Enter a name for your registry eg. `My Registry`. * **Username**: Enter the username you want to use to connect to your registry. * **Password**: Enter the password you want to use to connect to your registry. * **Image Prefix(Optional)**: Useful when using Cluster feature, to tag your images with a prefix eg. `dokploy` will convert to `dokploy/my-app:latest`. * **Registry URL**: Enter the URL of your registry eg. `https://index.docker.io/v1`. This approach allows you to authenticate and store your credentials on the machine, making it convenient when using multiple applications. You won't need to provide credentials for each one individually. It also enables seamless login to remote servers. If no server is selected, Dokploy will default to using its own server. [Previous\ \ Telegram](/docs/core/telegram) [Next\ \ Digital Ocean](/docs/core/registry/digital-ocean) ### On this page [Registry Settings](#registry-settings) --- # Open Source Templates | Dokploy On this page Open Source Templates ===================== Deploy open source templates with Dokploy By default we include a set of templates, that you can use to spin up templates quickly. You can also create your own templates. [Templates](#templates) ------------------------ The following templates are available: * **Supabase**: The open-source Firebase alternative with a dedicated Postgres database for web, mobile, and AI applications. * **Pocketbase**: Open-source backend for your next SaaS and Mobile app in 1 file. * **Plausible**: Open-source, privacy-focused, self-hosted web analytics platform to track website traffic. * **Calcom**: Open-source alternative to Calendly for creating scheduling and booking services. * **Grafana**: Open-source platform for data visualization and monitoring. * **Directus**: API-first, open-source headless CMS for building custom backends. * **Baserow**: Open-source database management tool for creating and managing databases. * **Ghost**: Professional publishing platform built on a modern Node.js technology stack. * **Uptime Kuma**: Free and open-source monitoring tool for websites and applications. * **n8n**: Open-source low-code platform for automating workflows and integrations. * **Wordpress**: Free and open-source CMS for publishing and managing websites. * **Odoo**: Free and open-source business management software for company operations. * **Appsmith**: Open-source platform for building internal tools and applications. * **Excalidraw**: Open-source online diagramming tool for creating and sharing diagrams. * **Documenso**: Open-source alternative to DocuSign for digital document signing. * **NocoDB**: Airtable alternative turning databases like MySQL, PostgreSQL, and more into smart spreadsheets. * **Meilisearch**: Free and open-source search engine for web applications. * **Phpmyadmin**: Free and open-source web interface for MySQL and MariaDB management. * **Rocketchat**: Open-source web chat platform for building chat applications. * **Minio**: Open-source object storage server compatible with Amazon S3. * **Metabase**: Open-source business intelligence tool for visualizing and querying data. * **Glitchtip**: Simple, open-source error tracking for applications. * **Open WebUI**: Open-source alternative to ChatGPT, self-hosted and offline-capable WebUI. * **Listmonk**: High-performance, self-hosted newsletter and mailing list manager. * **Double Zero**: Self-hostable SES dashboard for sending and monitoring emails with AWS. * **Umami**: Simple, fast, privacy-focused alternative to Google Analytics. * **Jellyfin**: Free software media system for managing and streaming personal media. * **Teable**: No-code, real-time database platform built on Postgres with a spreadsheet-like interface. * **Zipline**: ShareX/file upload server with an easy-to-use, feature-packed setup. * **Soketi**: Simple, fast, and resilient open-source WebSockets server. * **Aptabase**: Self-hosted web analytics platform for tracking website traffic. * **Typebot**: Open-source chatbot builder platform for creating conversational bots. * **Gitea**: Painless, self-hosted, all-in-one software development service. * **Roundcube**: Free and open-source webmail software written in PHP. * **File Browser**: Standalone file manager with multiple user support and directory-specific access. * **Tolgee**: Developer-friendly, web-based localization platform. * **Portainer**: Container management tool for deploying and troubleshooting applications. * **InfluxDB**: Open-source platform for collecting, storing, and visualizing time-series data. * **Infisical**: Securely manage application configuration and secrets across teams. * **Docmost**: Open-source collaborative wiki and documentation software. * **Vaultwarden**: Bitwarden-compatible server for managing secrets and passwords. * **Hi.events**: Self-hosted platform for event management and ticket sales. * **Windows (dockerized)**: Run Windows inside a Docker container. * **MacOS (dockerized)**: Run MacOS inside a Docker container. * **Coder**: Open-source cloud development environment (CDE) for hosting in the cloud or on-premises. * **Stirling PDF**: Locally hosted one-stop shop for all your PDF needs. * **Lobe Chat**: Open-source, modern-design AI chat framework. [Create your own template](#create-your-own-template) ------------------------------------------------------ We accept contributions to upload new templates to the dokploy repository. Make sure to follow the guidelines for creating a template: [Steps to create your own template](https://github.com/Dokploy/dokploy/blob/canary/CONTRIBUTING.md#templates) [Previous\ \ Redis](/docs/core/databases/connection/redis) [Next\ \ Astro](/docs/core/astro) ### On this page [Templates](#templates) [Create your own template](#create-your-own-template) --- # Applications | Dokploy On this page Applications ============ Explore the multiple deployment methods available in Dokploy, including GitHub, Git, Docker, and automated deployments via webhooks. Applications in Dokploy are treated as a single service, entity or container, making it easy and intuitive for users to work with each application in its own workspace. We offer multiple functionalities that you can use to manage your applications, such as: [General](#general) -------------------- Configure the source of your code, the way your application is built, and also manage actions like deploying, updating, and deleting your application, and stopping it. [Environment](#environment) ---------------------------- If you need to assign environment variables to your application, you can do so here. In case you need to use a multiline variable, you can wrap it in double quotes just like this `'"here_is_my_private_key"'`. [Monitoring](#monitoring) -------------------------- Four graphs will be displayed for the use of memory, CPU, disk, and network. Note that the information is only updated if you are viewing the current page, otherwise it will not be updated. [Logs](#logs) -------------- If you want to see any important logs from your application that is running, you can do so here and determine if your application is displaying any errors or not. [Deployments](#deployments) ---------------------------- You can view the last 10 deployments of your application. When you deploy your application in real time, a new deployment record will be created and it will gradually show you how your application is being built. We also offer a button to cancel deployments that are in queue. Note that those in progress cannot be canceled. We provide a webhook so that you can trigger your own deployments by pushing to your GitHub, Gitea, GitLab, Bitbucket, DockerHub repository. [Domains](#domains) -------------------- This is where you will assign your domain so that your application can be accessed from the internet. There are two ways to assign a domain: 1. Create a custom domain. 2. Use a generated domain, we use traefik.me to generate free domains. [Advanced Settings](#advanced-settings) ---------------------------------------- This section provides advanced configuration options for experienced users. It includes tools for custom commands within the container, managing Docker Swarm settings, and adjusting cluster settings such as replicas and registry selection. These tools are typically not required for standard application deployment and are intended for complex management and troubleshooting tasks. * **Run Command**: Execute custom commands directly in the container, after the application has been build & running. * **Cluster Settings**: Configure the number of replicas and select the Docker registry for your deployment to manage how your application scales and where it pulls images from. * **Swarm Settings**: Access additional Docker Swarm configurations for detailed orchestration and scaling across multiple nodes. * **Resources**: Adjust the CPU and memory allocation for your application. * **Volumes**: To ensure data persistence across deployments, configure storage volumes for your application, you can create Volumes, Binds, File Mounts. * **Ports**: Expose your application to the internet by configuring network ports. * **Traefik**: Modify Traefik settings to manage HTTP request handling for your application. ### [Note](#note) Adjust these settings carefully as incorrect configurations can significantly impact your application’s functionality and availability. [Previous\ \ Others](/docs/core/domains/others) [Next\ \ Advanced](/docs/core/applications/advanced) ### On this page [General](#general) [Environment](#environment) [Monitoring](#monitoring) [Logs](#logs) [Deployments](#deployments) [Domains](#domains) [Advanced Settings](#advanced-settings) [Note](#note) --- # Providers | Dokploy On this page Providers ========= Learn how to use providers in your application or docker compose. Dokploy offers several deployment methods, streamlining the process whether you're utilizing GitHub, any Git provider, Docker, or automated deployments. 1. GitHub 2. Gitlab 3. Bitbucket 4. Git 5. Docker (Only Applications) 6. Drag and Drop .zip (Only Applications) 7. Raw (Only Docker Compose) [GitHub, Gitlab, Bitbucket](#github-gitlab-bitbucket) ------------------------------------------------------ 1. [Github](/docs/core/github) Guide. 2. [Gitlab](/docs/core/gitlab) guide. 3. [Bitbucket](/docs/core/bitbucket) guide. [Git](#git) ------------ For deployments from any Git repository, whether public or private, you can use either SSH or HTTPS: ### [Public Repositories (HTTPS)](#public-repositories-https) 1. Enter the repository URL in `HTTPS URL`. 2. Type the branch name. 3. Click on `Save`. ### [Private Repositories](#private-repositories) For private repositories, is required to first create an SSH Key The Steps are almost similar for all providers. 1. Go to [SSH Keys Section](/docs/core/ssh-keys) and click on `Create SSH Key`. 2. Click on `Generate RSA SSH Key` and copy the `Public Key`. 3. Go to your Git Provider, either Github, Gitlab, Bitbucket, Gitea or any other. 4. Go to `Settings` and search for `SSH Keys`. 5. Click on `Add SSH Key`. 6. Paste the SSH Key and click on `Add Key`. You can then copy the SSH key and paste it into the settings of your account. This is for Github, but the same applies for Gitlab, Bitbucket, Gitea, etc. ![](/_next/image?url=%2Fassets%2Fprivate-repository.png&w=3840&q=75) This enables you to pull repositories from your private repository, a method consistent across nearly all providers, remember to use the SSH URL `[[email protected]](/cdn-cgi/l/email-protection) :user/repo.git` and not the HTTPS URL `https://github.com/user/repo.git`. [Docker (Applications)](#docker-applications) ---------------------------------------------- For Docker deployments you have two options: 1. Login to your registry using the [Registry Section](/docs/core/registry) and it automatically will pull the image from the registry in the case of a private registry. 2. Provide the username and password directly in the application settings. [Drag and Drop .zip (Applications)](#drag-and-drop-zip-applications) --------------------------------------------------------------------- You can upload a zip file directly from your computer and trigger a deployment. [Raw (Docker Compose)](#raw-docker-compose) -------------------------------------------- You specify a docker compose file directly in the code editor and trigger a deployment. [Previous\ \ Auto Deploy](/docs/core/auto-deploy) [Next\ \ Cluster](/docs/core/cluster) ### On this page [GitHub, Gitlab, Bitbucket](#github-gitlab-bitbucket) [Git](#git) [Public Repositories (HTTPS)](#public-repositories-https) [Private Repositories](#private-repositories) [Docker (Applications)](#docker-applications) [Drag and Drop .zip (Applications)](#drag-and-drop-zip-applications) [Raw (Docker Compose)](#raw-docker-compose) --- # Docker Compose | Dokploy On this page Docker Compose ============== Learn how to use Docker Compose with Dokploy Dokploy integrates with Docker Compose and Docker Stack to provide flexible deployment solutions. Whether you are developing locally or deploying at scale, Dokploy facilitates application management through these powerful Docker tools. ### [Configuration Methods](#configuration-methods) Dokploy provides two methods for creating Docker Compose configurations: * **Docker Compose**: Ideal for standard Docker Compose configurations. * **Stack**: Geared towards orchestrating applications using Docker Swarm. Note that some Docker Compose features, such as `build`, are not available in this mode. ### [General](#general) Configure the source of your code, the way your application is built, and also manage actions like deploying, updating, and deleting your application, and stopping it. ### [Enviroment](#enviroment) A code editor within Dokploy allows you to specify environment variables for your Docker Compose file. By default, Dokploy creates a `.env` file in the specified Docker Compose file path. ### [Monitoring](#monitoring) Monitor each service individually within Dokploy. If your application consists of multiple services, each can be monitored separately to ensure optimal performance. ### [Logs](#logs) Access detailed logs for each service through the Dokploy log viewer, which can help in troubleshooting and ensuring the stability of your services. ### [Deployments](#deployments) You can view the last 10 deployments of your application. When you deploy your application in real time, a new deployment record will be created and it will gradually show you how your application is being built. We also offer a button to cancel deployments that are in queue. Note that those in progress cannot be canceled. We provide a webhook so that you can trigger your own deployments by pushing to your GitHub, Gitea, GitLab, Bitbucket repository. ### [Advanced](#advanced) This section provides advanced configuration options for experienced users. It includes tools for custom commands within the container and volumes. * **Command**: Dokploy has a defined command to run the Docker Compose file, ensuring complete control through the UI. However, you can append flags or options to the command. * **Volumes**: To ensure data persistence across deployments, configure storage volumes for your application. ![home og image](/_next/image?url=%2Fassets%2Fimages%2Fcompose%2Foverview.png&w=3840&q=100) Volumes Docker volumes are a way to persist data generated and used by Docker containers. They are particularly useful for maintaining data between container restarts or for sharing data among different containers. To bind a volume to the host machine, you can use the following syntax in your docker-compose.yml file, but this way will clean up the volumes when a new deployment is made: volumes: - "/folder:/path/in/container" ❌ It's recommended to use the ../files folder to ensure your data persists between deployments. For example: volumes: - "../files/my-database:/var/lib/mysql" ✅ - "../files/my-configs:/etc/my-app/config" ✅ [Previous\ \ Zero Downtime](/docs/core/applications/zero-downtime) [Next\ \ Domains](/docs/core/docker-compose/domains) ### On this page [Configuration Methods](#configuration-methods) [General](#general) [Enviroment](#enviroment) [Monitoring](#monitoring) [Logs](#logs) [Deployments](#deployments) [Advanced](#advanced) --- # Cluster | Dokploy On this page Cluster ======= Manage server cluster settings. When you deploy applications in dokploy, all of them run on the same node. If you wish to run an application on a different server, you can use the cluster feature. The idea of using clusters is to allow each server to host a different application and, using Traefik along with the load balancer, redirect the traffic from the dokploy server to the servers you choose. [Server Scaling Methods](#server-scaling-methods) -------------------------------------------------- There are two primary ways to scale your server: 1. **Vertical Scaling**: This involves adding more resources to the same dokploy server, such as more CPU and RAM. 2. **Horizontal Scaling**: This method involves adding multiple servers. ### [Vertical Scaling](#vertical-scaling) We recommend using vertical scaling to increase the processing capacity of your applications since it's faster and requires less additional configuration. To perform vertical scaling, you need to add more resources to your dokploy server, that is, more CPU and RAM. This is done through your VPS provider. It's ideal to first check the vertical scaling limit you can handle. If you find it insufficient, you may consider horizontal scaling. ### [Horizontal Scaling](#horizontal-scaling) Horizontal scaling usually requires more additional configuration and involves adding more servers (VPS). If you choose the second option, we will proceed to configure the different servers. [Requirements for Cluster Setup](#requirements-for-cluster-setup) ------------------------------------------------------------------ 1. dokploy server running (Manager). 2. Have at least one extra server with the same architecture as the dokploy server. 3. Have a Docker registry. [Configuring the Docker Registry](#configuring-the-docker-registry) -------------------------------------------------------------------- To start, we need to configure a Docker registry, as when deploying an application, you need a registry to deploy and download the application image on the other servers. We offer two ways to configure a registry: 1. **External Registry**: Use any registry you want. 2. **Self-Hosted Registry**: We create and configure a self-hosted registry for you. ### [External Registry](#external-registry) You can use any registry, such as Docker Hub, DigitalOcean Spaces, ECR, or your choice. Make sure to enter the correct credentials and test the connection before adding the registry. ### [Self-Hosted Registry](#self-hosted-registry) We will ask you for three things: 1. A user. 2. A password. 3. A domain. Ensure this domain is pointing to the dokploy VPS. Once set up, the Cluster section will be unlocked. [Understanding Docker Swarm](#understanding-docker-swarm) ---------------------------------------------------------- We suggest you read this information to better understand how Docker Swarm works and its orchestration: [Docker Swarm documentation](https://docs.docker.com/engine/swarm/) and its architecture: [How Swarm mode works](https://docs.docker.com/engine/swarm/how-swarm-mode-works/nodes/) . [Managing Your Cluster](#managing-your-cluster) ------------------------------------------------ Now you can do two things: 1. Add workers. 2. Add managers. Managers have two functionalities: 1. Manage the cluster state. 2. Schedule the services. Workers have a single purpose, which is to run the containers, acting under the rules created or established by the manager. [Adding Nodes](#adding-nodes) ------------------------------ You can click the 'Add Node' button, which will display the instructions you need to follow to add your servers as nodes and join them to the dokploy manager node. ![](/_next/image?url=%2Fassets%2Fadd-node.png&w=3840&q=75) Once you follow the instructions, the workers or managers will appear in the table. ![](/_next/image?url=%2Fassets%2Fnodes.png&w=3840&q=75) [Previous\ \ Providers](/docs/core/providers) [Next\ \ Multi Server](/docs/core/multi-server) ### On this page [Server Scaling Methods](#server-scaling-methods) [Vertical Scaling](#vertical-scaling) [Horizontal Scaling](#horizontal-scaling) [Requirements for Cluster Setup](#requirements-for-cluster-setup) [Configuring the Docker Registry](#configuring-the-docker-registry) [External Registry](#external-registry) [Self-Hosted Registry](#self-hosted-registry) [Understanding Docker Swarm](#understanding-docker-swarm) [Managing Your Cluster](#managing-your-cluster) [Adding Nodes](#adding-nodes) --- # Auto Deploy | Dokploy On this page Auto Deploy =========== Automatically deploying your application to Dokploy can be achieved through two primary methods using Webhooks or the Dokploy API. Each method supports various platforms and provides a streamlined deployment process. [Supported Services:](#supported-services) ------------------------------------------- Auto deploy is only valid for the following services: * Applications * Docker Compose [Github](#github) ------------------ For Github, we provide autodeploy without any configuration. This will automatically deploy your application whenever you push to your repository. [Webhook URL](#webhook-url) ---------------------------- Webhooks allow you to automatically deploy your application whenever changes are made in your source repository. * GitHub * GitLab * Bitbucket * Gitea * DockerHub (Only for Applications) ### [Configuration Steps](#configuration-steps) 1. **Enable Auto Deploy**: Toggle the 'Auto Deploy' button found in the general tab of your application settings in Dokploy. 2. **Obtain Webhook URL**: Locate the Webhook URL from the deployment logs. ![Webhook URL](/_next/image?url=%2Fassets%2Fwebhook-url.png&w=3840&q=75) 3. **Configure Your Repository**: * Navigate to your repository settings on your chosen platform. * Add the webhook URL provided by Dokploy. * Ensure the settings match the configuration necessary for triggering the webhook. ![Webhook URL](/_next/image?url=%2Fassets%2Fwebhook-github.png&w=3840&q=75) #### [Important Notes](#important-notes) * **Branch Matching**: When using Git-based providers (GitHub, GitLab, etc.), ensure that the branch configured in Dokploy matches the branch you intend to push to. Misalignment will result in a "Branch Not Match" error. * **Docker Tags**: For deployments using DockerHub, ensure the tag pushed matches the one specified in Dokploy. * The steps are the same for all the providers. The steps are almost the same for all the Git providers, GitHub, GitLab, Bitbucket, Gitea. [Dockerhub (Only Applications)](#dockerhub-only-applications) -------------------------------------------------------------- To setup auto deploys for Dockerhub, follow the steps below: 1. Go to your application and select `Deployments` tab. 2. Copy the `Webhook URL`. 3. Go to your Dockerhub repository and select `Webhooks` tab. 4. Set a name for the webhook and paste the `Webhook URL` copied in step 2. 5. That's it, now every time you push to your repository, your application will trigger a deployment in dokploy. The deployment will trigger only if the `Tag` matches the one specified in Dokploy. [API Method](#api-method) -------------------------- Deploy your application programmatically using the Dokploy API from anywhere, this is useful when you want to trigger a deployment from a CI/CD pipeline or from a script. ### [Steps to Deploy Using API](#steps-to-deploy-using-api) Steps: 1. **Generate a Token**: Create an API token in your profile settings on Dokploy. 2. **Retrieve Application ID**: curl -X 'GET' \ 'https://your-domain/api/project.all' \ -H 'accept: application/json' -H 'Authorization: Bearer ' This command lists all projects and services. Identify the applicationId for the application you wish to deploy. 3. **Trigger Deployment**: curl -X 'POST' \ 'https://your-domain/api/application.deploy' \ -H 'accept: application/json' \ -H 'Content-Type: application/json' \ -H 'Authorization: Bearer ' \ -d '{ "applicationId": "string" }' This API method allows for flexible, scriptable deployment options, suitable for automated systems or situations where direct repository integration is not feasible. In this way you can deploy your application from anywhere, you can use the webhook URL or the API. [Previous\ \ Vue.js](/docs/core/vuejs) [Next\ \ Providers](/docs/core/providers) ### On this page [Supported Services:](#supported-services) [Github](#github) [Webhook URL](#webhook-url) [Configuration Steps](#configuration-steps) [Important Notes](#important-notes) [Dockerhub (Only Applications)](#dockerhub-only-applications) [API Method](#api-method) [Steps to Deploy Using API](#steps-to-deploy-using-api) --- # Multi Server | Dokploy On this page Multi Server ============ Deploy your apps to multiple servers remotely. Multi server allows you to deploy your apps remotely to different servers without needing to build and run them where the Dokploy UI is installed. To use the multi-server feature, you need to have Dokploy UI installed either locally or on a remote server. We recommend using a remote server for better connectivity, security, and isolation, for remote instances we install only a traefik instance. If you plan to only deploy apps to remote servers and use Dokploy UI for managing deployments, Dokploy will use around 250 MB of RAM and minimal CPU, so a low-resource server should be sufficient. All the features we have documented previously are supported by Dokploy Multi Server. The only feature not supported is remote server monitoring, due to performance reasons. However, all functionalities should work the same as when deploying on the same server where Dokploy UI is installed. [Features](#features) ---------------------- 1. **Enter the terminal**: Allows you to access the terminal of the remote server. 2. **Setup Server**: Allows you to configure the remote server. * **SSH Keys**: Steps to add SSH keys to the remote server. * **Deployments**: Steps to configure the remote server for deploying applications. 3. **Edit Server**: Allows you to modify the remote server's details, such as SSH key, name, description, IP, etc. 4. **View Actions**: Lets you perform actions like managing the Traefik instance, storage, and activating Docker cleanup. 5. **Show Traefik File System**: Displays the contents of the remote server's directory. 6. **Show Docker Containers**: Shows the Docker containers running on the remote server. Remote server monitoring is not supported due to performance reasons. [Previous\ \ Cluster](/docs/core/cluster) [Next\ \ Instructions](/docs/core/multi-server/instructions) ### On this page [Features](#features) --- # Actions | Dokploy On this page S3 Destinations Actions ======= Manage S3 destinations. The S3 Destinations section are essential for backing up your databases. [Actions:](#actions) --------------------- 1. **Create**: Create a new S3 destination. 2. **Delete**: Delete a S3 destination. 3. **Edit**: Edit a S3 destination. 4. **Test**: Test a S3 destination. ### [Create](#create) In order to create a new S3 Bucket, you need to fill the form. * **Name**: This could be anything you want, it will be the name. * **Access Key**: This is the access key that you will use to access your bucket. * **Secret Key**: This is the secret key that you will use to access your bucket. * **Bucket**: This is the bucket that you will use to access your bucket. * **Region**: This is the region that you will use to access your bucket. * **Endpoint**: This is the endpoint that you will use to access your bucket. There is a Button `Test` that will test the connection to your bucket, if it is correct it will show you a success message. [Previous\ \ Dokploy Cloud](/docs/core/cloud) [Next\ \ AWS S3](/docs/core/aws-s3) ### On this page [Actions:](#actions) [Create](#create) --- # Backups | Dokploy On this page [Databases](/docs/core/databases) Backups ======= Learn how to schedule and manage backups for your databases in Dokploy, with options for storage in S3 buckets. Dokploy provides an integrated solution for backing up your databases, ensuring data safety and recovery capabilities. [Backing Up Your Database](#backing-up-your-database) ------------------------------------------------------ To configure database backups, navigate to the `Backup` tab within your Dokploy dashboard. Here’s what you’ll need to set up: * **Select Destination S3 Bucket**: Specify where your backups will be stored. Buckets can be configured in the `/dashboard/settings/destinations` route. * **Database Name**: Enter the name of the database you want to backup. * **Schedule Cron**: Define the schedule for your backups using cron syntax. * **Prefix**: Choose a prefix under which backups will be stored in your bucket. * **Enabled**: Toggle whether backups are active. The default setting is enabled. ### [Testing Your Backup Configuration](#testing-your-backup-configuration) To ensure your backup settings are correctly configured: 1. Click the `Test` button. 2. This will initiate a test backup to the S3 bucket you selected. 3. Check the bucket to see the result of the test backup. This feature provides peace of mind by verifying that your backup process is set up correctly before relying on it for operational backups. [Previous\ \ Databases](/docs/core/databases) [Next\ \ Connection](/docs/core/databases/connection) ### On this page [Backing Up Your Database](#backing-up-your-database) [Testing Your Backup Configuration](#testing-your-backup-configuration) --- # Gitlab | Dokploy On this page Git Sources Gitlab ====== Configure Gitlab repositories for deployments. This includes setting up access tokens, repository names, and branches. Dokploy offer a way to connect your Gitlab Repository to your Dokploy panel, you can use Groups Names or personal accounts. Go to `Git` and select `Gitlab` as the source, then you can use the following options: * **Application ID**: Select the application ID that you want to connect to Dokploy. * **Personal Secret**: Select the secret that you want to connect to Dokploy. * **Group Name(Optional)**: Select the group name that you want to connect to Dokploy(Ideal for Gitlab Groups). Follow the steps to connect your Gitlab account to Dokploy. 1. Go to `https://gitlab.com/-/profile/applications` and click on `Add New Application`. 2. Set Application Name: eg. `Dokploy-Gitlab-App`. choose any name that you want. 3. Redirect URI: Copy the `Redirect URI` from Dokploy. eg. `https://dokploy.com/api/providers/gitlab/callback`. 4. Select Permissions: `api`, `read_user`, `read_repository`. 5. Click on `Save Application`. 6. Copy the `Application ID` and `Secret` from Gitlab and paste it in Dokploy `Gitlab` Modal section. 7. (Optional) If you want to use Groups, go to `https://gitlab.com/dashboard/groups` enter the group name you want to connect, and look at the URL in the address bar, it will be something like this `https://gitlab.com/dokploy-panel/frontend` you can use Nested Groups and SubGroups and copy the `dokploy-panel/frontend` from Gitlab and paste it in Dokploy `Gitlab` Modal section. 8. Click on `Continue`. 9. Go Back to Dokploy and click on `Install` button. 10. Click on `Authorize`. 11. You will be redirected to the `Git` section of Dokploy. 12. Now you can use the repositories from your Gitlab Account in `Applications` or `Docker Compose` services. Dokploy doesn't support Gitlab Automatic deployments on each push you make to your repository. [Setup Automatic Deployments](#setup-automatic-deployments) ------------------------------------------------------------ You can configure automatic deployments in Dokploy for the Following Services: 1. **Applications** 2. **Docker Compose** The steps are the same for both services. 1. Go to either `Applications` or `Docker Compose` and go to `Deployments` Tab. 2. Copy the `Webhook URL`. 3. Go to your Gitlab Account and select the repository. 4. In the left menu, select `Settings` and then `Webhooks`. 5. Click on `Add Webhook`. 6. Set the `URL` to the one you copied in the previous step. 7. In the Trigger section, select `Push Events`. 8. Click on `Add Webhook`. 9. Click on `Save`. 10. Now you have automatic deployments enabled for the selected repository. [Clarification on Automatic Deployments](#clarification-on-automatic-deployments) ---------------------------------------------------------------------------------- By default, Dokploy will automatically deploy your application on the Branch you have selected. eg. Let's suppose you have a `application` in this way: Repository: `my-app` Branch: `feature` If you try to make a push on another branch eg. `main`, Dokploy will not automatically deploy your application, because your application have selected `feature` as the Branch. In the case you want to have multiple applications in the same repository, eg. (development, staging, production), you can create 3 `Applications` in Dokploy and select the branch in each of them. This is very usefull if you want to have multiple environments for the same application. [Previous\ \ GitHub](/docs/core/github) [Next\ \ Permissions](/docs/core/permissions) ### On this page [Setup Automatic Deployments](#setup-automatic-deployments) [Clarification on Automatic Deployments](#clarification-on-automatic-deployments) --- # Connection | Dokploy On this page [Databases](/docs/core/databases) Connection ========== Learn how to connect to your database using Dokploy. This section explains how to configure database access for applications in Dokploy, including both internal connections within your network and external connections accessible over the internet. ### [Internal Credentials](#internal-credentials) Used for connecting to the database from within the same network, without exposing the database to the internet. * **User**: Username for the database access. * **Password**: Secure password for database access. * **Database Name**: The name of the database to connect to. * **Internal Host**: The hostname or internal identifier for the database within the network. * **Internal Port (Container)**: The port used within the container to connect to the database. * **Internal Connection URL**: The full connection string used internally to connect to the database. ### [External Credentials](#external-credentials) Enables the database to be reachable from the internet, necessary for remote management or external applications. * **External Port (Internet)**: Assign a port that is not currently used by another service to expose the database externally. #### [Steps to Configure External Access](#steps-to-configure-external-access) 1. Ensure the external port is available and not in conflict with other services. 2. Enter the external port you wish to use to expose your database. 3. The system will automatically generate an external connection URL, which can be used to access the database from any database management tool over the internet, like phpMyAdmin, MySQL Workbench, PgAdmin, etc. ### [Important Note](#important-note) For security reasons, internal credentials should be used for applications running within the same network or environment to prevent unauthorized access. External credentials should only be used when necessary and with proper security measures in place, such as VPNs or IP whitelisting. [Previous\ \ Backups](/docs/core/databases/backups) [Next\ \ MariaDB](/docs/core/databases/connection/mariadb) ### On this page [Internal Credentials](#internal-credentials) [External Credentials](#external-credentials) [Steps to Configure External Access](#steps-to-configure-external-access) [Important Note](#important-note) --- # Redis | Dokploy On this page [Databases](/docs/core/databases) [Connection](/docs/core/databases/connection) Redis ===== This guide will cover how to connect from RedisInsight to your redis databases in dokploy. 1. Download and install RedisInsight [RedisInsight](https://redis.io/insight/) . 2. Go to your `redis` databases. 3. In External Credentials, enter the `External Port (Internet)` make sure the port is not in use by another service eg. `6379` and click `Save`. 4. It will display the `External Connection URL` eg. `redis://user:[[email protected]](/cdn-cgi/l/email-protection) :6379/database`. Open RedisInsight and follow the steps: 1. Add Redis Database. 2. Enter the `Host` eg. `1.2.4.5`. 3. Enter the `Port` eg. `6379`. 4. Enter the username eg. `default`. 5. Enter the `Password` eg. `password`. 6. Click on `Save`. Done! now you can manage the database from RedisInsight. [Previous\ \ PG Admin](/docs/core/databases/connection/pg-admin) [Next\ \ Open Source Templates](/docs/core/templates) ### On this page No Headings --- # Astro | Dokploy On this page Examples Astro ===== Deploy a simple Astro application. This example will deploy a simple Astro application. 1. **Use Git Provider in Your Application**: * Repository: `https://github.com/Dokploy/examples.git` * Branch: `main` * Build path: `/astro` 2. **Add Environment Variables**: * Navigate to the "Environments" tab and add the following variable: NIXPACKS_START_CMD="pnpm run preview" 3. **Click on Deploy**: * Deploy your application by clicking the deploy button. 4. **Generate a Domain**: * Click on generate domain button. * A new domain will be generated for you. * You can use this domain to access your application. If you need further assistance, join our [Discord server](https://discord.com/invite/2tBnJ3jDJc) . [Previous\ \ Open Source Templates](/docs/core/templates) [Next\ \ Astro SSR](/docs/core/astro-ssr) ### On this page No Headings --- # Digital Ocean | Dokploy On this page [Registry](/docs/core/registry) Digital Ocean ============= Configure a Digital Ocean Container Registry to store your images and artifacts. To configure a Digital Ocean Container Registry, you need to fill the form with the following details: 1. Insert the Registry Name eg. `My Registry`. 2. Go to `https://cloud.digitalocean.com/registry/new` and click on `Create a Container Registry`. 3. Insert a lowercase name eg. `dokploy-username`. 4. Click on `Create Registry`. 5. Click on `Actions` and then `Download Docker Credentials`. 6. In Permissions select `Read` and `Write`. 7. Open the downloaded file and copy the auth value and type as `Password` in Dokploy Modal. 8. Go to `https://cloud.digitalocean.com/account/api/tokens` and click on `Generate New Token`. 9. In permissions select `Registry`. 10. Click on `Create`. 11. Copy the `access token` and paste it in Dokploy Modal as a `Username` field. 12. (Optional) If you pretend to use Cluster Feature, make sure to set a `Image Prefix`. 13. Registry URL: set `registry.digitalocean.com` 14. Click on `Test` to make sure everything is working. 15. Click on `Create` to save the registry. [Previous\ \ Registry](/docs/core/registry) [Next\ \ Docker Hub](/docs/core/registry/dockerhub) ### On this page No Headings --- # Bitbucket | Dokploy On this page Git Sources Bitbucket ========= Configure your Bitbucket repositories for deployments. This includes setting up access tokens, repository names, and branches. Dokploy offer a way to connect your Bitbucket Repository to your Dokploy panel, you can use Groups Names or personal accounts. Go to `Git` and select `Bitbucket` as the source, then you can use the following options: * **Bitbucket Username**: Set the username that you want to connect to Dokploy. * **App Password**: Set the app password you've created. * **Workspace(Optional)**: Assign a workspace name, this is useful if you want to connect to another workspace. Follow the steps to connect your Bitbucket account to Dokploy. 1. Go to `https://bitbucket.org/account/settings/app-passwords/new` . 2. Set Label: eg. `Dokploy-Bitbucket-App`. you can choose any name that you want. 3. In permissions make sure to select `Account: Read`, `Workspace membership: Read`, `Projects: Read` , `Repositories: Read` `Pull requests: Read` and `Webhooks: Read and write`. 4. Click on `Create`. 5. Copy the `App Password` and paste it in Dokploy `Bitbucket` Modal section. 6. Set your `Bitbucket Username`. 7. (Optional) If you want to use Workspaces, go to `https://bitbucket.org/account/workspaces/`, eg. If you have `dokploy-workspace` copy and paste it in Workspace Name. 8. Click on `Configure Bitbucket`. 9. If everything is correct, you can update enter to the Update Icon, and click on `Test Connection` to make sure everything is working. 10. Now you can use the repositories from your Gitlab Account in `Applications` or `Docker Compose` services. Dokploy doesn't support Bitbucket Automatic deployments on each push you make to your repository. [Setup Automatic Deployments](#setup-automatic-deployments) ------------------------------------------------------------ You can configure automatic deployments in Dokploy for the Following Services: 1. **Applications** 2. **Docker Compose** The steps are the same for both services. 1. Go to either `Applications` or `Docker Compose` and go to `Deployments` Tab. 2. Copy the `Webhook URL`. 3. Go to your Bitbucket Account and select the repository. 4. In the left menu, select `Repository Settings` and then `Webhooks`. 5. Click on `Add Webhook`. 6. Set any `Title` and the `URL` to the one you copied in the previous step. 7. In the Trigger section, select `Push Events`. 8. Click on `Add Webhook`. 9. Now you have automatic deployments enabled for the selected repository. [Clarification on Automatic Deployments](#clarification-on-automatic-deployments) ---------------------------------------------------------------------------------- By default, Dokploy will automatically deploy your application on the Branch you have selected. eg. Let's suppose you have a `application` in this way: Repository: `my-app` Branch: `feature` If you try to make a push on another branch eg. `main`, Dokploy will not automatically deploy your application, because your application have selected `feature` as the Branch. In the case you want to have multiple applications in the same repository, eg. (development, staging, production), you can create 3 `Applications` in Dokploy and select the branch in each of them. This is very usefull if you want to have multiple environments for the same application. [Previous\ \ Cloudflare R2](/docs/core/cloudflare-r2) [Next\ \ GitHub](/docs/core/github) ### On this page [Setup Automatic Deployments](#setup-automatic-deployments) [Clarification on Automatic Deployments](#clarification-on-automatic-deployments) --- # Docker Hub | Dokploy On this page [Registry](/docs/core/registry) Docker Hub ========== Configure Docker Hub to store your images and artifacts. To configure a Docker Hub registry, you need to fill the form with the following details: 1. Insert the Registry Name eg. `My Registry`. 2. Insert the Username eg. `dockerhub_username`. 3. Insert the Password, you can use your own dockerhub password or generate a token here `https://app.docker.com/settings/personal-access-tokens` 4. Click on Generate Token. 5. Insert the Token Description eg. `dockerhub_token`. 6. In permissions make sure to select `Read` and `Write`. 7. Click on `Create`. 8. Copy the `access token` and paste it in Dokploy `Docker Hub` Modal section. 9. (Optional) If you pretend to use Cluster Feature, make sure to set a `Image Prefix` and `Registry URL`. 10. Click on `Test` to make sure everything is working. 11. Click on `Create` to save the registry. [Previous\ \ Digital Ocean](/docs/core/registry/digital-ocean) [Next\ \ GHCR](/docs/core/registry/ghcr) ### On this page No Headings --- # Example | Dokploy On this page [Docker Compose](/docs/core/docker-compose) Example ======= Learn how to use Docker Compose with Dokploy [Tutorial](#tutorial) ---------------------- In this tutorial, we will create a simple application using Docker Compose and route the traffic to an accessible domain. ### [Steps](#steps) 1. Create a new project. 2. Create a new service `Compose` and select the Compose Type `Docker Compose`. 3. Fork this repository: [Repo](https://github.com/Dokploy/docker-compose-test) . 4. Select Provider type: GitHub or Git. 5. Select the repository: `Dokploy/docker-compose-test`. 6. Select the branch: `main`. 7. Set the Compose Path to `./docker-compose.yml` and save. ![Docker compose configuration](/_next/image?url=%2F_next%2Fstatic%2Fmedia%2Fsetup.88231f66.png&w=3840&q=75) ### [Updating Your `docker-compose.yml`](#updating-your-docker-composeyml) Add the following to your existing `docker-compose.yml` file: 1. Add the network `dokploy-network` to each service. 2. Add labels for Traefik to make the service accessible through the domain. Example: Let's modify the following compose file to make it work with Dokploy: version: "3" services: next-app: build: context: ./next-app dockerfile: prod.Dockerfile args: ENV_VARIABLE: ${ENV_VARIABLE} NEXT_PUBLIC_ENV_VARIABLE: ${NEXT_PUBLIC_ENV_VARIABLE} restart: always ports: - 3000:3000 networks: - my_network networks: my_network: external: true Updated version with dokploy-network and Traefik labels: Don't set container\_name property to the each service, it will cause issues with logs, metrics and other features version: "3" services: next-app: build: context: ./next-app dockerfile: prod.Dockerfile args: ENV_VARIABLE: ${ENV_VARIABLE} NEXT_PUBLIC_ENV_VARIABLE: ${NEXT_PUBLIC_ENV_VARIABLE} restart: always ports: - 3000 networks: - dokploy-network labels: - "traefik.enable=true" - "traefik.http.routers..rule=Host(`your-domain.com`)" - "traefik.http.routers..entrypoints=websecure" - "traefik.http.routers..tls.certResolver=letsencrypt" - "traefik.http.services..loadbalancer.server.port=3000" networks: dokploy-network: external: true Make sure to point the A record to the domain you want to use for your service. ![home og image](/_next/image?url=%2Fassets%2Fimages%2Fcompose%2Fdomain.png&w=3840&q=75) Deploy the application by clicking on "deploy" and wait for the deployment to complete. Then give Traefik about 10 seconds to generate the certificates. You can then access the application through the domain you have set. ![home og image](/_next/image?url=%2Fassets%2Fimages%2Fcompose%2Fapplication.png&w=3840&q=75) **Tips**: 1. Set unique names for each router: `traefik.http.routers.` 2. Set unique names for each service: `traefik.http.services.` 3. Ensure the network is linked to the `dokploy-network` 4. Set the entry point to websecure and the certificate resolver to letsencrypt to generate certificates. [Previous\ \ Domains](/docs/core/docker-compose/domains) [Next\ \ Databases](/docs/core/databases) ### On this page [Tutorial](#tutorial) [Steps](#steps) [Updating Your `docker-compose.yml`](#updating-your-docker-composeyml) --- # Cloudflare | Dokploy On this page [Domains](/docs/core/domains) Cloudflare ========== This guide will cover how to configure a Cloudflare domain for your applications in dokploy or panel. Cloudflare has multiple SSL's Modes: 1. **Strict (SSL-Only Origin Pull)**: Enforce encryption between Cloudflare and your origin. Use this mode to guarantee connections to your origin will always be encrypted, regardless of your visitor’s request. 2. **Full (Strict)**: Enable encryption end-to-end and enforce validation on origin certificates. Use Cloudflare’s Origin CA to generate certificates for your origin. 3. **Full**: Enable encryption end-to-end. Use this mode when your origin server supports SSL certification but does not use a valid, publicly trusted certificate. 4. **Flexible**: Enable encryption only between your visitors and Cloudflare. This will avoid browser security warnings, but all connections between Cloudflare and your origin are made through HTTP. 5. **Off (not secure)**: No encryption applied. Turning off SSL disables HTTPS and causes browsers to show a warning that your website is not secure. We will cover two of SSL modes in this guide: * **Full (Strict)** * **Flexible** [Switch Mode](#switch-mode) ---------------------------- To switch between modes, follow these steps: 1. Go to cloudflare dashboard and then click on `Account Home` -> Select the Domain you want to change. 2. On the left side, click `SSL/TLS`. 3. Click on `Overview`. 4. Click on Configure SSL/TLS Encryption. 5. Select the desired mode Full (Strict) or Flexible. 6. Click `Save`. [Assign a Domain Full (Strict)](#assign-a-domain-full-strict) -------------------------------------------------------------- Follow the steps in the same order to prevent any issues. We assume that you have enabled the `Full (Strict)` mode in the previous step, is super important to follow the steps in the same order to prevent any issues. 1. Go to cloudflare dashboard and then click on `Account Home` -> Select the Domain. 2. On the left side, click `DNS`. 3. Click on `Records`. 4. Click on `Add Record`. 5. Select `A` record type. 6. Enter the `Host` name, eg. `api` so it will be `api.dokploy.com`. 7. Enter the `IPv4 Address` from your server where the application is hosted eg. `1.2.3.4`. 8. Click `Save`. 9. Go to dokploy panel and now you can assign either for `Applications` or `Docker Compose`. 10. Go to `Domains` section. 11. Click `Create Domain`. 12. In the `Host` field, enter the domain name eg. `api.dokploy.com`. 13. In the `Path` field, enter the path eg. `/`. 14. In the `Container Port` field, enter the port where your application is running eg. `3000`. 15. In the `HTTPS` field enable `ON`. 16. In the `Certificate` field select `Let's Encrypt`. 17. Click `Create`. 18. A domain will be automatically assigned to your application. 19. Wait a few seconds and refresh the application. 20. You should see the application running on the domain you just created. [Assign a Domain Flexible](#assign-a-domain-flexible) ------------------------------------------------------ We assume that you have enabled the `Flexible` mode in the previous step, is super important to follow the steps in the same order to prevent any issues. 1. Go to cloudflare dashboard and then click on `Account Home` -> Select the Domain. 2. On the left side, click `DNS`. 3. Click on `Records`. 4. Click on `Add Record`. 5. Select `A` record type. 6. Enter the `Host` name, eg. `api` so it will be `api.dokploy.com`. 7. Enter the `IPv4 Address` from your server where the application is hosted eg. `1.2.3.4`. 8. Click `Save`. 9. Go to dokploy panel and now you can assign either for `Applications` or `Docker Compose`. 10. Go to `Domains` section. 11. Click `Create Domain`. 12. In the `Host` field, enter the domain name eg. `api.dokploy.com`. 13. In the `Path` field, enter the path eg. `/`. 14. In the `Container Port` field, enter the port where your application is running eg. `3000`. 15. In the `HTTPS` field enable `OFF`. 16. In the `Certificate` field select `None`. 17. Click `Create`. 18. A domain will be automatically assigned to your application. 19. Wait a few seconds and refresh the application. 20. You should see the application running on the domain you just created. ### [Important Clarification on Container Ports](#important-clarification-on-container-ports) The "Container Port" specified in the domain settings is exclusively for routing traffic to the correct application container through Traefik, and does not expose the port directly to the internet. This is fundamentally different from the port settings in the "Advanced -> Ports" section, which are used to directly expose application ports. The container port in the domain settings ensures that Traefik can internally direct traffic to the specified port within the container based on the domain configuration. [Previous\ \ Domains](/docs/core/domains) [Next\ \ Generated](/docs/core/domains/generated) ### On this page [Switch Mode](#switch-mode) [Assign a Domain Full (Strict)](#assign-a-domain-full-strict) [Assign a Domain Flexible](#assign-a-domain-flexible) [Important Clarification on Container Ports](#important-clarification-on-container-ports) --- # AWS S3 | Dokploy On this page S3 Destinations AWS S3 ====== Configure S3 buckets for backup storage. This includes setting up access keys, secret keys, bucket names, regions, and endpoints. AWS provides a simple and cost-effective way to store and retrieve data. It is a cloud-based service that allows you to store and retrieve data from anywhere in the world. This is a great option for storing backups, as it is easy to set up and manage. 1. Create a new bucket and set any name you want. 2. Search for `IAM` in the search bar. 3. Click on `Policies` in the left menu. 4. Click on `Create Policy`. 5. Select `JSON` and paste the following policy: Make sure to replace the bucket name with your bucket name. { "Version": "2012-10-17", "Statement": [\ {\ "Sid": "AllowListBucket",\ "Effect": "Allow",\ "Action": "s3:ListBucket",\ "Resource": "arn:aws:s3:::bucket-name"\ },\ {\ "Sid": "AllowBucketObjectActions",\ "Effect": "Allow",\ "Action": [\ "s3:GetObject",\ "s3:PutObject",\ "s3:DeleteObject"\ ],\ // Make sure to set the name of your bucket\ "Resource": "arn:aws:s3:::bucket-name/*"\ }\ ] } 6. Click on `Review Policy`. 7. Assign a name to the policy. 8. Click on `Create Policy`. 9. Click on User Group and assign a Name. 10. Click on `Add User to Group`. 11. Add the user you want to assign to the group. 12. In the `Attached Policies` section, filter by type `Customer Managed` and select the policy you created. 13. Click on `Attach Policy`. 14. Go to `Users` and select the user you've assigned to the group. 15. Go to Security Credentials. 16. Click on `Create Access Key`. 17. Select `Programmatic Access`. 18. Click on `Create New Access Key`. Now copy the following variables: * `Access Key` -> `Access Key (Dokploy)` = eg. `AK2AV244NFLS5JTUZ554` * `Secret Key` -> `Secret Key (Dokploy)` = eg. `I0GWCo9fSGOr7z6Lh+NvHmSsaE+62Vwk2ua2CEwR` * `Bucket` -> `Bucket (Dokploy)` = eg. `dokploy-backups` use the name of the bucket you created. * `Region` -> `Region (Dokploy)` = eg. `us-east-1, us-west-2, etc` it will depend on the region you are using. * `Endpoint` -> `Endpoint (Dokploy) (Optional)` = eg. `https://.s3..amazonaws.com` you will find this endpoint in the Bucket Card at the Home Page. Test the connection and you should see a success message. [Previous\ \ Actions](/docs/core/actions) [Next\ \ Backblaze B2](/docs/core/backblaze-b2) ### On this page No Headings --- # GitHub | Dokploy On this page Git Sources GitHub ====== Configure GitHub repositories for deployments. This includes setting up access tokens, repository names, and branches. Dokploy offer a way to connect your Github Repository to your Dokploy panel, you can use organizations or personal accounts. Go to `Git` and select `Github` as the source, then you can use the following options: * **Organization**: Select the organization that you want to connect to Dokploy. * **Personal Account(Default)**: Select the account that you want to connect to Dokploy. Follow the steps to connect your Github account to Dokploy. 1. Click on `Create Github App` to create a new Github App. 2. Set Github App Name: eg. `Dokploy-Github-App`. make sure this name is unique. 3. Click on `Create Github App`, then you will redirect to the `Git` section of Dokploy. 4. Now it will show a `Install` Button, click on it. 5. You can select the repositories that you want to dokploy be able to access, you can choose select all repositories or select specific repositories. 6. Click on `Install & Authorize` to install the Dokploy App. 7. You will be redirected to the `Git` section of Dokploy. 8. Now you can use the repositories from your Github Account in `Applications` or `Docker Compose` services. When you use this method, By default you will have Automatic deployments on each push you make to your repository. [Clarification on Automatic Deployments](#clarification-on-automatic-deployments) ---------------------------------------------------------------------------------- By default, Dokploy will automatically deploy your application on the Branch you have selected. eg. Let's suppose you have a `application` in this way: Repository: `my-app` Branch: `feature` If you try to make a push on another branch eg. `main`, Dokploy will not automatically deploy your application, because your application have selected `feature` as the Branch. In the case you want to have multiple applications in the same repository, eg. (development, staging, production), you can create 3 `Applications` in Dokploy and select the branch in each of them. This is very usefull if you want to have multiple environments for the same application. [Previous\ \ Bitbucket](/docs/core/bitbucket) [Next\ \ Gitlab](/docs/core/gitlab) ### On this page [Clarification on Automatic Deployments](#clarification-on-automatic-deployments) --- # Generated | Dokploy On this page [Domains](/docs/core/domains) Generated ========= This section outlines how to configure free HTTP domains for your applications in Dokploy, ensuring that your applications are accessible via custom URLs. Dokploy use [https://traefik.me](https://traefik.me) to generate free domains for you. Quickly set up a domain for development or testing purposes without needing to register a domain. #### [Steps to Generate a Domain](#steps-to-generate-a-domain) 1. Go to the `domains` section. 2. Click `Create Domain`. 3. Click on the `Dice` Icon next to `Host` field it will generate a free domain for you. 4. Path is `/`. 5. `Container Port`, set the port where your application is running, eg usually for Next.js it is `3000`, for Astro is `4321` 6. HTTPS is `OFF`. 7. Certificate is `None`. 8. Click `Create`. 9. A free domain will be automatically assigned to your application. ### [Important Clarification on Container Ports](#important-clarification-on-container-ports) The "Container Port" specified in the domain settings is exclusively for routing traffic to the correct application container through Traefik, and does not expose the port directly to the internet. This is fundamentally different from the port settings in the "Advanced -> Ports" section, which are used to directly expose application ports. The container port in the domain settings ensures that Traefik can internally direct traffic to the specified port within the container based on the domain configuration. [Previous\ \ Cloudflare](/docs/core/domains/cloudflare) [Next\ \ Others](/docs/core/domains/others) ### On this page [Steps to Generate a Domain](#steps-to-generate-a-domain) [Important Clarification on Container Ports](#important-clarification-on-container-ports) --- # GHCR | Dokploy On this page [Registry](/docs/core/registry) GHCR ==== Configure GitHub Container Registry to store your images and artifacts. To configure a GitHub Container Registry, you need to fill the form with the following details: 1. Insert the Registry Name eg. `My Registry`. 2. Insert the Username eg. `github_username`. 3. Insert the Password, you can use your own github password or generate a token here `https://github.com/settings/tokens` 4. Click on Generate Token (Classic). 5. Insert the Note Description eg. `github_token`. 6. In permissions make sure to select `write:packages`. 7. Click on `Create`. 8. Copy the `access token` and paste it in Dokploy Modal as a Password field. 9. (Optional) If you pretend to use Cluster Feature, make sure to set a `Image Prefix`. 10. Registry URL: set `https://ghcr.io` 11. Click on `Test` to make sure everything is working. 12. Click on `Create` to save the registry. [Previous\ \ Docker Hub](/docs/core/registry/dockerhub) [Next\ \ SSH Keys](/docs/core/ssh-keys) ### On this page No Headings --- # Backblaze B2 | Dokploy On this page S3 Destinations Backblaze B2 ============ Configure buckets from Backblaze B2 for backup storage. This includes setting up access keys, secret keys, bucket names, regions, and endpoints. Backblaze B2 is a cloud-based service that allows you to store and retrieve data from anywhere in the world. This is a great option for storing backups, as it is easy to set up and manage. [Backblaze B2 Example Bucket](#backblaze-b2-example-bucket) ------------------------------------------------------------ 1. Create a new bucket and set any name you want. 2. Go to `Application Keys` and create a new key. 3. Set a Key Name. 4. Set the Allow Access to Bucket(s) to `All Buckets` or `Specific Buckets`. 5. Set type of access `Read & Write` Permission. Now copy the following variables: * `Access Key` -> `Access Key (Dokploy)` = eg. `002s6acf2639910000d000005` * `Secret Key` -> `Secret Key (Dokploy)` = eg. `K00+rIsWqPMhmcgqcyOyb9bqby7pbpE` * `Region` -> `Region (Dokploy)` = eg. `eu-central-003, us-east-005, us-west-002, us-west-001, us-west-004, etc` it will depend on the region you are using. * `Endpoint` -> `Endpoint (Dokploy)` = eg. `https://s3.us-west-002.backblazeb2.com` you will find this endpoint in the Bucket Card at the Home Page. * `Bucket` -> `Bucket (Dokploy)` = eg. `dokploy-backups` use the name of the bucket you created. Test the connection and you should see a success message. [Previous\ \ AWS S3](/docs/core/aws-s3) [Next\ \ Cloudflare R2](/docs/core/cloudflare-r2) ### On this page [Backblaze B2 Example Bucket](#backblaze-b2-example-bucket) --- # Advanced | Dokploy On this page [Applications](/docs/core/applications) Advanced ======== Learn how to use advanced features in your application. This section is designed for experienced users who need to manage complex configurations and orchestration settings in Dokploy. Here, you can execute custom commands, manage cluster replicas, select Docker registries, and configure Docker Swarm settings. ### [Run Command](#run-command) * **Purpose**: Allows users to execute custom shell commands directly within the container. * **Usage**: Enter the command you need to run in the provided field and click 'Save' to execute it within the container environment. This tool is particularly useful for debugging or specific administrative tasks. ### [Cluster Settings](#cluster-settings) * **Purpose**: Manages the scaling and distribution of the application across multiple servers or nodes. * **Replicas**: Set the number of instances of your application that should be running. * **Registry Selection**: Choose the Docker registry from which your container images will be pulled. This is crucial for ensuring that the correct images are used during deployment. #### [Important Note](#important-note) Always click 'Redeploy' after modifying the cluster settings to apply the changes. ### [Swarm Settings](#swarm-settings) Swarm settings allow for detailed configuration of how containers are orchestrated within the Docker Swarm. #### [Health Check](#health-check) * **Purpose**: Ensures that containers are running smoothly and restarts them if they fail. * **Configuration**: Specify parameters like test commands, intervals, timeouts, start periods, and retries. #### [Restart Policy](#restart-policy) Defines how containers should be handled if they exit or fail, the configuration is as follows: * **Condition**: Specifies under what condition a restart should occur. * **Delay**: Sets the time delay between restarts. * **Max Attempts**: Limits the number of restart attempts. * **Window**: Defines the time window used to evaluate the restart policy. #### [Update Config](#update-config) Manages the deployment and update process of services in the swarm, the configuration is as follows: * **Parallelism**: Number of containers to update simultaneously. * **Delay**: Time between updates. * **Failure Action**: Action to take if an update fails. * **Monitor**: Duration to monitor a container after an update. * **Max Failure Ratio**: The fraction of containers that are allowed to fail before the update is considered a failure. * **Order**: The order in which containers are stopped and started during an update. #### [Placement](#placement) Controls where containers are placed within the swarm based on specific rules and preferences, the configuration is as follows: * **Constraints**: Conditions that must be met for a container to be placed on a node. * **Preferences**: Preferences for placing containers across nodes to spread load evenly. ### [Rollback Config](#rollback-config) Manages the rollback process for services when updates fail, the configuration is as follows: * **Parallelism**: Number of containers to rollback simultaneously. * **Delay**: Time between rollbacks. * **FailureAction**: Action to take if a rollback fails. * **Monitor**: Duration to monitor a container after a rollback. * **MaxFailureRatio**: The fraction of containers that are allowed to fail before the rollback is considered a failure. * **Order**: The order in which containers are stopped and restarted during a rollback. ### [Mode](#mode) Defines how services are replicated within the swarm, the configuration is as follows: * **Replicated**: Services are replicated across nodes as specified. * **Replicas**: Number of replicas per service. * **Global**: A single instance of the service runs on every node. * **ReplicatedJob**: Runs a job in a replicated manner. * **MaxConcurrent**: Maximum number of jobs running concurrently. * **TotalCompletions**: Total number of times the jobs need to complete. ### [Network](#network) Configures network settings for the services, the configuration is as follows: * **Target**: Specifies the network name. * **Aliases**: Provides aliases for the network. * **DriverOpts**: Network driver options like MTU size and host binding. ### [Labels](#labels) Assigns metadata to containers to help identify and organize them, the configuration is as follows: * **Labels**: Key-value pairs assigned to the service. For example: 1. `com.example.app.name`: "my-app" 2. `com.example.app.version`: "1.0.0" ### [Note](#note) Modifying Swarm Settings requires careful consideration as incorrect configurations can disrupt the entire container orchestration. Always ensure you understand the implications of the changes you are making. [Resources](#resources) ------------------------ Manage the memory and CPU resources allocated to your applications or databases. * **Memory Reservation**: The minimum amount of memory guaranteed to the application. * **Memory Limit**: The maximum amount of memory the application can use. * **CPU Limit**: The maximum number of CPU units that the application can utilize. * **CPU Reservation**: The minimum number of CPU units reserved for the application. ### [Volumes/Mounts](#volumesmounts) Configure persistent storage for your application to ensure data remains intact across container restarts and deployments. **Bind Mount**: Maps a host file or directory to a container file or directory. Typically used for specific configurations or databases. 1. **Host Path**: Path on the host. 2. **Mount Path**: Path in the container. **Volume Mount**: Uses Docker-managed volumes that are easier to back up and migrate than bind mounts. 1. **Volume Name**: Name of the Docker-managed volume. 2. **Mount Path**: Path in the container where the volume is mounted. **File Mount**: Specifically for single files, useful for configuration files. 1. **Content**: The content to store in the file. 2. **Mount Path**: Path in the container where the file is placed. File mounts are a dokploy features, this create a file in a folder called `files` inside your project, so it recreates every single time you deploy your project. ![](/_next/image?url=%2Fassets%2Ffile-mount-configuration.webp&w=3840&q=75) ![](/_next/image?url=%2Fassets%2Ffile-mount.png&w=3840&q=75) ### [Redirects](#redirects) Redirect requests to your application to another URL based on specified rules, enhancing navigational efficiency and SEO. * **Regex**: Enter a regular expression to match the URLs that need redirecting. * **Replacement**: Specify the target URL where traffic should be redirected. * **Permanent**: Toggle this option to apply a permanent (HTTP 301) redirection, indicating to browsers and search engines that the page has moved permanently. #### [Example](#example) To redirect all traffic from "[http://localhost](http://localhost) " to "[http://mydomain](http://mydomain) ", set the Regex as `http://localhost/(.*)` and the Replacement as `http://mydomain/$1`. ### [Security](#security) Add basic authentication to your application to restrict access. * **Username**: Enter a username. * **Password**: Enter a password. #### [Important Note](#important-note-1) Adding basic authentication will prompt users for a username and password before allowing access to the application. Use this for environments where an additional layer of security is required. ### [Ports](#ports) Expose your application to the internet by configuring network ports, allowing external access. * **Published Port**: The port number on the host that will route traffic to your application. * **Target Port**: The port number inside the container that the application uses. * **Protocol**: Choose between TCP and UDP based on your application's requirements. #### [Important Note](#important-note-2) Ensure that the published port does not conflict with other services on the host to avoid port binding errors, also this port is used mostly for accesing the application from the outside, eg your-ip:port, this is not for accessing the application trought a domain. ### [Traefik](#traefik) Provides a dynamic and robust method to manage HTTP traffic to your services, including load balancing and SSL termination. * **Rules**: Define complex routing, load balancing, and security configurations using Traefik's powerful rule-based configuration system. [Previous\ \ Applications](/docs/core/applications) [Next\ \ Build Type](/docs/core/applications/build-type) ### On this page [Run Command](#run-command) [Cluster Settings](#cluster-settings) [Important Note](#important-note) [Swarm Settings](#swarm-settings) [Health Check](#health-check) [Restart Policy](#restart-policy) [Update Config](#update-config) [Placement](#placement) [Rollback Config](#rollback-config) [Mode](#mode) [Network](#network) [Labels](#labels) [Note](#note) [Resources](#resources) [Volumes/Mounts](#volumesmounts) [Redirects](#redirects) [Example](#example) [Security](#security) [Important Note](#important-note-1) [Ports](#ports) [Important Note](#important-note-2) [Traefik](#traefik) --- # Others | Dokploy On this page [Domains](/docs/core/domains) Others ====== This guide will cover how to configure a domain from other providers for your applications in dokploy or panel. In the case you don't want to use Cloudflare, you can use any domain from any provider: 1. Go to your DNS Panel. 2. Go to `Records` section. 3. Click on `Add Record`. 4. Select `A` record type. 5. Enter the `Host` name, eg. `api` so it will be `api.dokploy.com`. 6. Enter the `IPv4 Address` from your server where the application is hosted eg. `1.2.3.4`. 7. Click `Save`. 8. Go to dokploy panel and now you can assign either for `Applications` or `Docker Compose`. 9. Go to `Domains` section. 10. Click `Create Domain`. 11. In the `Host` field, enter the domain name eg. `api.dokploy.com`. 12. In the `Path` field, enter the path eg. `/`. 13. In the `Container Port` field, enter the port where your application is running eg. `3000`. 14. In the `HTTPS` field enable `ON`. 15. In the `Certificate` field select `Let's Encrypt`. 16. Click `Create`. 17. A domain will be automatically assigned to your application. 18. Wait a few seconds and refresh the application. 19. You should see the application running on the domain you just created. ### [Important Clarification on Container Ports](#important-clarification-on-container-ports) The "Container Port" specified in the domain settings is exclusively for routing traffic to the correct application container through Traefik, and does not expose the port directly to the internet. This is fundamentally different from the port settings in the "Advanced -> Ports" section, which are used to directly expose application ports. The container port in the domain settings ensures that Traefik can internally direct traffic to the specified port within the container based on the domain configuration. [Previous\ \ Generated](/docs/core/domains/generated) [Next\ \ Applications](/docs/core/applications) ### On this page [Important Clarification on Container Ports](#important-clarification-on-container-ports) --- # Cloudflare R2 | Dokploy On this page S3 Destinations Cloudflare R2 ============= Configure R2 buckets for backup storage. This includes setting up access keys, secret keys, bucket names, regions, and endpoints. Cloudflare is a popular choice for hosting static assets, such as images, videos, and documents. It is a cloud-based service that allows you to store and retrieve data from anywhere in the world. This is a great option for storing backups, as it is easy to set up and manage. 1. Create a new bucket and any name you want. 2. Go to initial R2 Screen, and go to `Manager R2 API Tokens` and create a new token. 3. Set a Token Name 4. Set `Object Read & Write` Permission. 5. (Optional) Set Specify bucket, by default it will include all buckets. 6. Create the token. Now copy the following variables: * `Access Key` -> `Access Key (Dokploy)` = eg. `f3811c6d27415a9s6cv943b6743ad784` * `Secret Key` -> `Secret Key (Dokploy)` = eg. `aa55ee40b4049e93b7252bf698408cc22a3c2856d2530s7c1cb7670e318f15e58` * `Region` -> `Region (Dokploy)` = eg. `WNAM, ENAM, etc` it will depend on the region you are using. * `Endpoint` -> `Endpoint (Dokploy)` = eg. `https://8ah554705io7842d54c499fbee1156c1c.r2.cloudflarestorage.com` * `Bucket` -> `Bucket (Dokploy)` = eg. `dokploy-backups` use the name of the bucket you created. Test the connection and you should see a success message. [Previous\ \ Backblaze B2](/docs/core/backblaze-b2) [Next\ \ Bitbucket](/docs/core/bitbucket) ### On this page No Headings --- # Build Type | Dokploy On this page [Applications](/docs/core/applications) Build Type ========== Learn about the different build types available in Dokploy, including Nixpacks, Dockerfile, and Buildpack options. Dokploy offers three distinct build types for deploying applications, each suited to different development needs and preferences. ### [Nixpacks](#nixpacks) This is the default build type in Dokploy. When you select Nixpacks, Dokploy builds your application as a Nixpack, which is optimized for ease of use and efficiency. You can read more about Nixpacks [here](https://nixpacks.com/) . ### [Dockerfile](#dockerfile) If your project includes a Dockerfile, you can specify its path. Dokploy will use this Dockerfile to build your application directly, giving you full control over the build environment and dependencies. ### [Buildpack](#buildpack) Dokploy supports two types of buildpacks: * **Heroku**: Adapted from Heroku's popular cloud platform, these buildpacks are designed for compatibility and ease of migration. * **Paketo**: Provides cloud-native buildpacks that leverage modern standards and practices for building applications. **Tip:** We recommend using the `Nixpacks` build type as it is the most straightforward and commonly used option for most applications. By choosing the appropriate build type, you can tailor the deployment process to best fit your application's requirements and your operational preferences. [Previous\ \ Advanced](/docs/core/applications/advanced) [Next\ \ Going Production](/docs/core/applications/going-production) ### On this page [Nixpacks](#nixpacks) [Dockerfile](#dockerfile) [Buildpack](#buildpack) --- # Vue.js | Dokploy On this page Examples Vue.js ====== Deploy a simple Vue.js application. This example will deploy a simple Vue.js application. 1. **Use Git Provider in Your Application**: * Repository: `https://github.com/Dokploy/examples.git` * Branch: `main` * Build path: `/vuejs` 2. **Add Environment Variables**: * Navigate to the "Environments" tab and add the following variable: NIXPACKS_START_CMD="pnpm run preview" 3. **Click on Deploy**: * Deploy your application by clicking the deploy button. 4. **Generate a Domain**: * Click on generate domain button. * A new domain will be generated for you. * You can use this domain to access your application. If you need further assistance, join our [Discord server](https://discord.com/invite/2tBnJ3jDJc) . [Previous\ \ Vite React](/docs/core/vite-react) [Next\ \ Auto Deploy](/docs/core/auto-deploy) ### On this page No Headings --- # Zero Downtime | Dokploy On this page [Applications](/docs/core/applications) Zero Downtime ============= Learn how to configure zero downtime deployments in Dokploy. Dokploy allows you to configure zero downtime deployments, which means that you can deploy your application without any downtime. By default when you create a new deployment it will stop the latest running container and start the new one. This is the default behavior of Docker Swarm and this leads to Bad Gateway since the containers are initializing at the same time, but Dokploy allows you to configure zero downtime deployments. [Steps to configure Zero Downtime Deployments](#steps-to-configure-zero-downtime-deployments) ---------------------------------------------------------------------------------------------- Let's suppose we have a NodeJS application that has a health check route `/api/health` that returns a 200 status code and running in the port 3000. 1. In your application is necessary to have a `Path` or `Health Route` to be able to achieve zero downtime deployments eg. in the case of a NodeJS app you can have a route `/api/health` that returns a 200 status code. 2. Go to `Advanced` Tab and go to Cluster Settings and enter to `Swarm Settings` 3. There are a couple options that you can use, in this case we will focus on `Health Check`. 4. Paste this code in the health check field: Make sure the API Route exists in your application { "Test": [\ "CMD",\ "curl",\ "-f",\ "http://localhost:3000/api/health"\ ], "Interval": 30000000000, "Timeout": 10000000000, "StartPeriod": 30000000000, "Retries": 3 } [Example](#example) -------------------- 1. We will use this example [Github Repo](https://github.com/Dokploy/swarm-test) 2. It Have a endpoint called `health` [endpoint](https://github.com/Dokploy/swarm-test/blob/main/index.js#L20) which is the one that will tell us if our application is healthy. 3. For testing purpose I've added a sleep to simulate the delay between the deployments and you can see the bad gateway error. 4. **Use Git Provider in Your Application**: * Repository: `https://github.com/Dokploy/swarm-test` * Branch: `main` * Build path: `/` If you want to test that there is no zero downtime yet, you can simply deploy the application and then create another deployment and while doing the deployment reload the page in the path /health and you will see that a bad gateway will appear. Now go to the advanced section of our application, and go to the Swarm Settings section, we are going to modify the first section of Healtchecks. We will use this configuration specifically, paste and save it { "Test": [\ "CMD",\ "curl",\ "-f",\ "http://localhost:3000/health"\ ], "Interval": 30000000000, "Timeout": 10000000000, "StartPeriod": 30000000000, "Retries": 3 } This configuration basically tells to Docker to do: Make a request inside the container to [http://localhost:3000/health](http://localhost:3000/health) and then we are also saying to make in interval of 30000000000 nanosec, and also makes 3 retries before switching to the new container that would be all, Now you have Zero Downtime Deployments 🎊. [Previous\ \ Rollbacks](/docs/core/applications/rollbacks) [Next\ \ Docker Compose](/docs/core/docker-compose) ### On this page [Steps to configure Zero Downtime Deployments](#steps-to-configure-zero-downtime-deployments) [Example](#example) --- # Astro SSR | Dokploy On this page Examples Astro SSR ========= Deploy a simple Astro SSR application. This example will deploy a simple Astro SSR application. 1. **Use Git Provider in Your Application**: * Repository: `https://github.com/Dokploy/examples.git` * Branch: `main` * Build path: `/astro-ssr` 2. **Add Environment Variables**: * Navigate to the "Environments" tab and add the following variable: NIXPACKS_START_CMD="pnpm run preview" 3. **Click on Deploy**: * Deploy your application by clicking the deploy button. 4. **Generate a Domain**: * Click on generate domain button. * A new domain will be generated for you. * You can use this domain to access your application. If you need further assistance, join our [Discord server](https://discord.com/invite/2tBnJ3jDJc) . [Previous\ \ Astro](/docs/core/astro) [Next\ \ Lit](/docs/core/lit) ### On this page No Headings --- # MySQL | Dokploy On this page [Databases](/docs/core/databases) [Connection](/docs/core/databases/connection) MySQL ===== This guide will cover how to connect from Beekeeper Studio to your mysql databases in dokploy. 1. Download and install Beekeeper Studio [Beekeeper Studio](https://www.beekeeperstudio.io/get) . 2. Go to your `mysql` databases. 3. In External Credentials, enter the `External Port (Internet)` make sure the port is not in use by another service eg. `3306` and click `Save`. 4. It will display the `External Connection URL` eg. `mysql://user:[[email protected]](/cdn-cgi/l/email-protection) :3306/database`. Open Beekeeper Studio and follow the steps: 1. Click on `Add New Server`. 2. Select `MySQL` as the `Database Type`. 3. Use `Import URL` to enter the `External Connection URL` from Dokploy eg. `mysql://user:[[email protected]](/cdn-cgi/l/email-protection) :3306/database`. 4. Click on `Connect`. 5. Click on `Save`. Done! now you can manage the database from Beekeeper Studio. [Previous\ \ Mongo Compass](/docs/core/databases/connection/mongo-atlas) [Next\ \ PG Admin](/docs/core/databases/connection/pg-admin) ### On this page No Headings --- # Rollbacks | Dokploy On this page [Applications](/docs/core/applications) Rollbacks ========= Learn how to rollback your application in Dokploy. Rollbacks are a powerful feature that allows you to easily revert changes to your application. This is particularly useful when you encounter issues or want to revert to a previous version of your application. [Requirements](#requirements) ------------------------------ 1. Have a `/health` endpoint in your application. [Steps to Rollback](#steps-to-rollback) ---------------------------------------- Let's suppose we have a NodeJS application that has a health check route `/api/health` that returns a 200 status code and running in the port 3000. 1. In your application is necessary to have a `Path` or `Health Route` to be able to achieve zero downtime deployments eg. in the case of a NodeJS app you can have a route `/api/health` that returns a 200 status code. 2. Go to `Advanced` Tab and go to Cluster Settings and enter to `Swarm Settings` 3. There are a couple options that you can use, in this case we will focus on `Health Check` and `Update Config`. 4. Paste this code in the health check field: Make sure the API Route exists in your application { "Test": [\ "CMD",\ "curl",\ "-f",\ "http://localhost:3000/api/health"\ ], "Interval": 30000000000, "Timeout": 10000000000, "StartPeriod": 30000000000, "Retries": 3 } 5. Now in the `Update Config` Now when the application is getting unhealthy response from the health check, the container will rollback to the previous version. Paste the following code: { "Parallelism": 1, "Delay": 10000000000, "FailureAction": "rollback", "Order": "start-first" } [Previous\ \ Going Production](/docs/core/applications/going-production) [Next\ \ Zero Downtime](/docs/core/applications/zero-downtime) ### On this page [Requirements](#requirements) [Steps to Rollback](#steps-to-rollback) --- # Domains | Dokploy On this page [Docker Compose](/docs/core/docker-compose) Domains ======= Configure domains for your Docker Compose application. When using Docker Compose, adding a domain to a service is a straightforward process. This guide will walk you through the necessary steps to configure manual domains for your application. Key Steps: 1. Add the service to the `dokploy-network`. 2. Use Traefik labels to configure routing. Attention Since v0.7.0 Dokploy support domains natively. This means that you can configure your domain directly in the Dokploy UI, without doing the rest of the steps check on the [domains section](/docs/core/domains) . Example Scenario Let's consider an application with three components: a frontend, a backend, and a database. We'll start with a basic Docker Compose file and then enhance it with domain configuration. version: "3.8" services: frontend: build: context: ./frontend dockerfile: Dockerfile volumes: - ./frontend:/app ports: - "3000:3000" depends_on: - backend backend: build: context: ./backend dockerfile: Dockerfile volumes: - ./backend:/app ports: - "5000:5000" environment: - DATABASE_URL=postgres://postgres:password@database:5432/mydatabase depends_on: - database database: image: postgres:13 environment: POSTGRES_USER: postgres POSTGRES_PASSWORD: password POSTGRES_DB: mydatabase volumes: - db-data:/var/lib/postgresql/data volumes: db-data: [Step 1: Add the Network](#step-1-add-the-network) --------------------------------------------------- First, we'll add the dokploy-network to our services: version: "3.8" services: frontend: # ... (previous configuration) networks: - dokploy-network backend: # ... (previous configuration) networks: - dokploy-network database: # ... (previous configuration) networks: - dokploy-network volumes: db-data: networks: dokploy-network: external: true Step 2: Configuring Traefik Labels Now, let's add Traefik labels to route domains to our services. We'll focus on the frontend and backend services: version: "3.8" services: frontend: build: context: ./frontend dockerfile: Dockerfile volumes: - ./frontend:/app expose: - 3000 depends_on: - backend networks: - dokploy-network labels: - traefik.enable=true - traefik.http.routers.frontend-app.rule=Host(`frontend.dokploy.com`) - traefik.http.routers.frontend-app.entrypoints=web - traefik.http.services.frontend-app.loadbalancer.server.port=3000 backend: build: context: ./backend dockerfile: Dockerfile volumes: - ./backend:/app expose: - 5000 environment: - DATABASE_URL=postgres://postgres:password@database:5432/mydatabase depends_on: - database networks: - dokploy-network labels: - traefik.enable=true - traefik.http.routers.backend-app.rule=Host(`backend.dokploy.com`) - traefik.http.routers.backend-app.entrypoints=web - traefik.http.services.backend-app.loadbalancer.server.port=5000 database: # ... (same as before) volumes: db-data: networks: dokploy-network: external: true Understanding Traefik Labels 1. `traefik.enable=true` Enables Traefik routing for the service. 2. `traefik.http.routers..rule=Host('your-domain.dokploy.com')` Specifies the domain for the service 3. `traefik.http.routers..entrypoints=web` Sets the service to be accessible via HTTP. 4. `traefik.http.services..loadbalancer.server.port=3000` Specifies the port your service is using internally. **Note**: Replace `` with a unique identifier for each service (e.g., frontend-app, backend-app, etc.). [Important Considerations](#important-considerations) ------------------------------------------------------ 1. **Port Exposure**: Use `expose` instead of `ports` to expose ports to the host machine. This ensures that the ports are not exposed to the host machine. 2. **DNS Configuration**: Ensure you create `A` records pointing to your domain in your DNS Provider Settings. 3. **HTTPS**: For HTTPS, you can use Let's Encrypt or other SSL/TLS certificates. [Deployment](#deployment) -------------------------- With these configurations in place, you're now ready to deploy your application using Docker Compose. This setup should be sufficient to get your services up and running with custom domain routing through Traefik. If you have any further questions or need assistance, join our [Discord server](https://discord.com/invite/2tBnJ3jDJc) and we'll be happy to help. [Previous\ \ Docker Compose](/docs/core/docker-compose) [Next\ \ Example](/docs/core/docker-compose/example) ### On this page [Step 1: Add the Network](#step-1-add-the-network) [Important Considerations](#important-considerations) [Deployment](#deployment) --- # PG Admin | Dokploy On this page [Databases](/docs/core/databases) [Connection](/docs/core/databases/connection) PG Admin ======== This guide will cover how to connect from pgAdmin to your postgres databases in dokploy. 1. Download and install pgAdmin [pgAdmin](https://www.pgadmin.org/download/) . 2. Go to your `postgres` databases. 3. In External Credentials, enter the `External Port (Internet)` make sure the port is not in use by another service eg. `5433` and click `Save`. 4. It will display the `External Connection URL` eg. `postgres://user:[[email protected]](/cdn-cgi/l/email-protection) :5433/database`. Open pgAdmin and follow the steps: 1. Click on `Add New Server`. 2. Enter the `Server Name` eg. `dokploy`. 3. Enter to `Connection`. 4. In Hostname/Address enter the IP from the server where the database is hosted eg. `1.2.4.5`. 5. In Port enter the port where the database is running eg. `5433`. 6. In Database enter the name of the database eg. `database`. 7. In Username enter the username eg. `user`. 8. In Password enter the password eg. `password`. 9. Click on `Save`. Done! now you can manage the database from pgAdmin. [Previous\ \ MySQL](/docs/core/databases/connection/mysql) [Next\ \ Redis](/docs/core/databases/connection/redis) ### On this page No Headings --- # Telegram | Dokploy On this page Notifications Telegram ======== Configure telegram notifications for your applications. Telegram notifications are a great way to stay up to date with important events in your Dokploy panel. You can choose to receive notifications for specific events or all events. [Telegram Notifications](#telegram-notifications) -------------------------------------------------- For start receiving telegram notifications, you need to fill the form with the following details: * **Name**: Enter any name you want. * **Bot Token**: Enter the bot token. eg. `123456789:ABCdefGHIjklMNOPqrstUVWXYZ` * **Chat ID**: Enter the chat ID. eg. `123456789` To Setup the telegram notifications, follow these steps: 1. Go to `https://telegram.me/botfather` and click on `Start Bot`. 2. Type `/newbot` and click on `Start`. 3. Set a name for your bot, eg. `dokploy_bot` make sure the name ends with `_bot`. 4. Copy the `Bot Token` and paste it in Dokploy `Telegram` Modal section. 5. Now you need to get the Chat ID, or create a new Channel 6. Search this bot in the search bar `@userinfobot`. 7. Type `/start` and it will return the chat ID. 8. Copy the `Chat ID` and paste it in Dokploy `Telegram` Modal section. 9. Click on test to make sure everything is working. 10. Click on `Create` to save the notification. [Previous\ \ Slack](/docs/core/slack) [Next\ \ Registry](/docs/core/registry) ### On this page [Telegram Notifications](#telegram-notifications) --- # Going Production | Dokploy On this page [Applications](/docs/core/applications) Going Production ================ Learn how to deploy your application in production in Dokploy. By default, dokploy offer multiple [Builds Types](/docs/core/applications/build-type) to deploy your application, the most common is `nixpacks` and `heroku buildpacks` however this also comes with problems, first is the resources that are required to build your application which some times can lead to timeout on your server or even freezeing your server and all your application will be down for this reasson, this is mainly problem from `Docker` since the comsumption of resources such as RAM, CPU is very high to build an application. [Solution](#solution) ---------------------- You have two options to solve this problem: 1. Increase the resources of your server CPU, RAM, Disk (Probably is not a good idea and cheapest solution) 2. Build & Publish the application in a CI/CD pipeline eg. Github Actions, Gitlab CI, etc. (Recommended) ### [Build & Publish the application in a CI/CD pipeline](#build--publish-the-application-in-a-cicd-pipeline) We will use Github Actions as an example, but you can use any CI/CD pipeline that you want. We will use the following configuration: 1. **Use Git Provider in Your Application**: * Repository: `https://github.com/Dokploy/production-example` * Branch: `main` * Build path: `/` The repo have everything you need, however you can follow the same idea for your own applications. 3. The repository already have a Dockerfile, so we will use that, in the case your application is different create your own Dockerfile is required for this guide. 4. We will use `Dockerhub` as an example, but you can use any container registry that you want. 5. Make sure to create the repository in the `Dockerhub` , `namespace` is your username and `repository` is `example`. 6. Create a new Github Actions workflow in `.github/workflows/deploy.yml` 7. Add the following code to the workflow: name: Build Docker images on: push: branches: ["main"] jobs: build-and-push-dockerfile-image: runs-on: ubuntu-latest steps: - name: Checkout repository uses: actions/checkout@v3 - name: Log in to Docker Hub uses: docker/login-action@v2 with: username: ${{ secrets.DOCKERHUB_USERNAME }} # Make sure to add the secrets in your repository in -> Settings -> Secrets (Actions) -> New repository secret password: ${{ secrets.DOCKERHUB_TOKEN }} # Make sure to add the secrets in your repository in -> Settings -> Secrets (Actions) -> New repository secret - name: Build and push Docker image uses: docker/build-push-action@v4 with: context: . file: ./Dockerfile push: true # Make sure to replace with your own namespace and repository tags: | namespace/example:latest platforms: linux/amd64 8. Create your own Dockerfile, in this case we will use the `Dockerfile` from the repository. FROM node:18-alpine AS base ENV PNPM_HOME="/pnpm" ENV PATH="$PNPM_HOME:$PATH" RUN corepack enable FROM base AS build WORKDIR /app COPY . . COPY package.json pnpm-lock.yaml ./ RUN --mount=type=cache,id=pnpm,target=/pnpm/store pnpm install --frozen-lockfile ENV NODE_ENV=production RUN pnpm run build FROM base AS dokploy WORKDIR /app ENV NODE_ENV=production # Copy only the necessary files COPY --from=build /app/dist ./dist COPY --from=build /app/package.json ./package.json COPY --from=build /app/node_modules ./node_modules EXPOSE 3000 CMD ["pnpm", "start"] 9. Now when you make a commit to your repository, the workflow will be triggered and the application will build and push to `Dockerhub`. 10. Now let's create application in Dokploy. 11. In `Source Type` select `Docker` 12. In the docker image field enter `namespace/example:latest` 13. Click on `Save`. 14. Click on `Deploy`. 15. Go to `Domains` and click `Dices` icon to generate a domain and the port set to `3000`. 16. Now you can access your application. ### [Auto deploy](#auto-deploy) When using Dockerhub as a registry you can also enable auto deploy, this will automatically deploy your application whenever you push to your repository. To setup auto deploys for Dockerhub, follow the steps below: 1. Go to your application and select `Deployments` tab. 2. Copy the `Webhook URL`. 3. Go to your Dockerhub repository and select `Webhooks` tab. 4. Set a name for the webhook and paste the `Webhook URL` copied in step 2. 5. That's it, now every time you push to your repository, your application will trigger a deployment in dokploy. The deployment will trigger only if the `Tag` matches the one specified in Dokploy. #### [External Registry](#external-registry) If you have a registry that is not Dockerhub, you can trigger a deployment after pushing to your repository in Github Actions. Your workflow will look like this: This method use the [Api Method](/docs/core/auto-deploy#api-method) to trigger a deployment. name: Build Docker images on: push: branches: ["main"] jobs: build-and-push-dockerfile-image: runs-on: ubuntu-latest steps: ...Same as step 7 from the previous example - name: Trigger Dokploy Deployment uses: dokploy/dokploy-action@v1 run: | curl -X 'POST' \ 'https:///api/trpc/application.deploy' \ -H 'accept: application/json' \ -H 'Authorization: Bearer YOUR-TOKEN' \ -H 'Content-Type: application/json' \ -d '{ "json":{ "applicationId": "YOUR-APPLICATION-ID" } }' You can also use this Github Action [Action](https://github.com/marketplace/actions/dokploy-deployment) to automate the deployment. [Healthcheck & Rollbacks](#healthcheck--rollbacks) --------------------------------------------------- When using Dokploy you can also configure healthchecks and rollbacks, this will allow you to configure your application to be able to recover from failures. In the repo we are using from the `Step 1.` we have a healthcheck endpoint `/health` that returns a 200 status code and running in the port 3000. Go to `Advanced` Tab and go to Cluster Settings and enter to `Swarm Settings` There are a couple options that you can use, in this case we will focus on `Health Check` and `Update Config`. Make sure the API Route exists in your application { "Test": [\ "CMD",\ "curl",\ "-f",\ "http://localhost:3000/health"\ ], "Interval": 30000000000, "Timeout": 10000000000, "StartPeriod": 30000000000, "Retries": 3 } Now in the `Update Config` Now when the application is getting unhealthy response from the health check, the container will rollback to the previous version. Paste the following code: { "Parallelism": 1, "Delay": 10000000000, "FailureAction": "rollback", "Order": "start-first" } Now you everything a production ready application with automated deployments, zero downtime, rollbacks and healthchecks. We recommend strongly to use this approach in production since this will make your server never build the application, will only in charge of the deployment keeping your server without any downtime. [Previous\ \ Build Type](/docs/core/applications/build-type) [Next\ \ Rollbacks](/docs/core/applications/rollbacks) ### On this page [Solution](#solution) [Build & Publish the application in a CI/CD pipeline](#build--publish-the-application-in-a-cicd-pipeline) [Auto deploy](#auto-deploy) [External Registry](#external-registry) [Healthcheck & Rollbacks](#healthcheck--rollbacks) --- # Nest.js | Dokploy On this page Examples Nest.js ======= Deploy a simple Nest.js application. This example will deploy a simple Nest.js application. 1. **Use Git Provider in Your Application**: * Repository: `https://github.com/Dokploy/examples.git` * Branch: `main` * Build path: `/nestjs` 2. **Click on Deploy**: * Deploy your application by clicking the deploy button. 3. **Generate a Domain**: * Click on generate domain button. * A new domain will be generated for you. * You can use this domain to access your application. If you need further assistance, join our [Discord server](https://discord.com/invite/2tBnJ3jDJc) . [Previous\ \ Lit](/docs/core/lit) [Next\ \ Next.js](/docs/core/nextjs) ### On this page No Headings --- # Mongo Compass | Dokploy On this page [Databases](/docs/core/databases) [Connection](/docs/core/databases/connection) Mongo Compass ============= This guide will cover how to configure a Mongo Compass connection for your applications in dokploy or panel. 1. Download and install Mongo Compass [Mongo Compass](https://www.mongodb.com/try/download/compass) . 2. Go to your `MongoDB` databases. 3. In External Credentials, enter the `External Port (Internet)` make sure the port is not in use by another service eg. `27017` and click `Save`. 4. It will display the `External Connection URL` eg. `mongodb://user:[[email protected]](/cdn-cgi/l/email-protection) :27017/database`. Open Mongo Compass and follow the steps: 1. Click on `Add Connection`. 2. Copy and paste the `External Connection URL` eg. `mongodb://user:[[email protected]](/cdn-cgi/l/email-protection) :27017/database`. 3. Click on `Connect`. Done! now you can manage the database from Mongo Compass. [Previous\ \ MariaDB](/docs/core/databases/connection/mariadb) [Next\ \ MySQL](/docs/core/databases/connection/mysql) ### On this page No Headings --- # Next.js | Dokploy On this page Examples Next.js ======= Deploy a simple Next.js application. This example will deploy a simple Next.js application. 1. **Use Git Provider in Your Application**: * Repository: `https://github.com/Dokploy/examples.git` * Branch: `main` * Build path: `/nextjs` 2. **Click on Deploy**: * Deploy your application by clicking the deploy button. 3. **Generate a Domain**: 1. Click on generate domain button. 2. A new domain will be generated for you. 3. You can use this domain to access your application. If you need further assistance, join our [Discord server](https://discord.com/invite/2tBnJ3jDJc) . [Previous\ \ Nest.js](/docs/core/nestjs) [Next\ \ Preact](/docs/core/preact) ### On this page No Headings --- # Permissions | Dokploy On this page Users Permissions =========== Add permissions to your users to manage your applications and services. Manage user roles and permissions within Dokploy. Note that only one admin role is allowed per instance. [Permissions](#permissions) ---------------------------- Dokploy offers multiple permissions to manage your users effectively: * **Create Projects**: Allows the user to create new projects. * **Create Services**: Allows the user to create new applications or databases. * **Access Traefik Files Tab**: Allows the user to access the Traefik files tab. * **Delete Projects**: Allows the user to delete projects. * **Delete Services**: Allows the user to delete services. * **Access Docker Tab**: Allows the user to access the Docker tab. * **Access API/CLI**: Allows the user to access the API/CLI, including the Swagger route. * **Access to Git Providers**: Allows the user to access the Git Providers. * **Access to SSH Keys**: Allows the user to access the SSH Keys. You can also grant permissions to specific users for accessing particular projects or services. ### [Project Permissions](#project-permissions) Based on your projects and services, you can assign permissions to specific users to give them access to particular projects or services. [Previous\ \ Gitlab](/docs/core/gitlab) [Next\ \ Discord](/docs/core/discord) ### On this page [Permissions](#permissions) [Project Permissions](#project-permissions) --- # Instructions | Dokploy On this page [Multi Server](/docs/core/multi-server) Instructions ============ Example to setup a remote server and deploy application in a VPS. Multi server allows you to deploy your apps remotely to different servers without needing to build and run them where the Dokploy UI is installed. [Requirements](#requirements) ------------------------------ 1. To install Dokploy UI, follow the [installation guide](en/docs/core/get-started/installation) . 2. Create an SSH key by going to `/dashboard/settings/ssh-keys` and add a new key. Be sure to copy the public key. ![Architecture Diagram](/_next/image?url=%2Fassets%2Fssh-keys.png&w=3840&q=75) 3. Decide which remote server to deploy your apps on. We recommend these reliable providers: * [Hostinger](https://www.hostinger.com/vps-hosting?ref=dokploy) Get 20% off with this [referral link](https://www.hostinger.com/vps-hosting?REFERRALCODE=1SIUMAURICI97) . * [DigitalOcean](https://www.digitalocean.com/pricing/droplets#basic-droplets) Get $200 credits for free with this [referral link](https://m.do.co/c/db24efd43f35) . * [Hetzner](https://www.hetzner.com/cloud/) Get €20 credits with this [referral link](https://hetzner.cloud/?ref=vou4fhxJ1W2D) . * [Vultr](https://www.vultr.com/pricing/#cloud-compute) Referral Link: [Referral Link](https://www.vultr.com/?ref=9679828) * [Linode](https://www.linode.com/es/pricing/#compute-shared) . * [Scaleway](https://www.scaleway.com/en/pricing/?tags=baremetal,available) . * [Google Cloud](https://cloud.google.com/) . * [AWS](https://aws.amazon.com/ec2/pricing/) . 4. When creating the server, it should ask for SSH keys. Ideally, use your computer's public key and the key you generated in the previous step. Here's how to add the public key in Hostinger: ![Adding SSH key](/_next/image?url=%2Fassets%2Fhostinger-add-sshkey.png&w=3840&q=75) The steps are similar across other providers. 5. Copy the server’s IP address and ensure you know the username (often `root`). Fill in all fields and click `Create`. ![Add server](/_next/image?url=%2Fassets%2Fmulti-server-add-server.png&w=3840&q=75) 6. To test connectivity, open the server dropdown and click `Enter Terminal`. If everything is correct, you should be able to interact with the remote server. 7. Click `Setup Server` to proceed. There are two tabs: SSH Keys and Deployments. This guide explains the easy way, but you can follow the manual process via the Dokploy UI if you prefer. ![Setup process](/_next/image?url=%2Fassets%2Fmulti-server-setup-2.png&w=3840&q=75) 8. Click `Deployments`, then `Setup Server`. If everything is correct, you should see output similar to this: ![Server setup output](/_next/image?url=%2Fassets%2Fmulti-server-setup-3.png&w=3840&q=75) You only need to run this setup once. If Dokploy updates later, check the release notes to see if rerunning this command is required. 9. You're ready to deploy your apps! Let's test it out: ![Add app](/_next/image?url=%2Fassets%2Fmulti-server-add-app.png&w=3840&q=75) 10. To check which server an app belongs to, you’ll see the server name at the top. If no server is selected, it defaults to `Dokploy Server`. Click `Deploy` to start building your app on the remote server. You can check the `Logs` tab to see the build process. For this example, we’ll use a test repo: Repo: `https://github.com/Dokploy/examples.git` Branch: `main` Build Path: `/astro` ![App setup](/_next/image?url=%2Fassets%2Fmulti-server-setup-app.png&w=3840&q=75) 11. Once the build is done, go to `Domains` and create a free domain. Just click `Create` and you’re good to go! 🎊 ![Finished setup](/_next/image?url=%2Fassets%2Fmulti-server-finish.png&w=3840&q=75) [Previous\ \ Multi Server](/docs/core/multi-server) ### On this page [Requirements](#requirements) --- # Preact | Dokploy On this page Examples Preact ====== Deploy a simple Preact application. This example will deploy a simple Preact application. 1. **Use Git Provider in Your Application**: * Repository: `https://github.com/Dokploy/examples.git` * Branch: `main` * Build path: `/preact` 2. **Add Environment Variables**: * Navigate to the "Environments" tab and add the following variable: NIXPACKS_START_CMD="pnpm run preview" 3. **Click on Deploy**: * Deploy your application by clicking the deploy button. 4. **Generate a Domain**: * Click on generate domain button. * A new domain will be generated for you. * You can use this domain to access your application. If you need further assistance, join our [Discord server](https://discord.com/invite/2tBnJ3jDJc) . [Previous\ \ Next.js](/docs/core/nextjs) [Next\ \ Qwik](/docs/core/qwik) ### On this page No Headings --- # MariaDB | Dokploy On this page [Databases](/docs/core/databases) [Connection](/docs/core/databases/connection) MariaDB ======= This guide will cover how to connect from Beekeeper Studio to your mariadb databases in dokploy. 1. Download and install Beekeeper Studio [Beekeeper Studio](https://www.beekeeperstudio.io/get) . 2. Go to your `mariadb` databases. 3. In External Credentials, enter the `External Port (Internet)` make sure the port is not in use by another service eg. `3307` and click `Save`. 4. It will display the `External Connection URL` eg. `mysql://user:[[email protected]](/cdn-cgi/l/email-protection) :3306/database`. Open Beekeeper Studio and follow the steps: 1. Click on `Add New Server`. 2. Select `MariaDB` as the `Database Type`. 3. Use `Import URL` to enter the `External Connection URL` from Dokploy eg. `mysql://user:[[email protected]](/cdn-cgi/l/email-protection) :3306/database`. 4. Click on `Connect`. 5. Click on `Save`. Done! now you can manage the database from Beekeeper Studio. [Previous\ \ Connection](/docs/core/databases/connection) [Next\ \ Mongo Compass](/docs/core/databases/connection/mongo-atlas) ### On this page No Headings --- # Lit | Dokploy On this page Examples Lit === Deploy a simple Lit application. This example will deploy a simple Lit application. 1. **Use Git Provider in Your Application**: * Repository: `https://github.com/Dokploy/examples.git` * Branch: `main` * Build path: `/lit` 2. **Add Environment Variables**: * Navigate to the "Environments" tab and add the following variable: NIXPACKS_START_CMD="pnpm run preview" 3. **Click on Deploy**: * Deploy your application by clicking the deploy button. 4. **Generate a Domain**: * Click on generate domain button. * A new domain will be generated for you. * You can use this domain to access your application. If you need further assistance, join our [Discord server](https://discord.com/invite/2tBnJ3jDJc) . [Previous\ \ Astro SSR](/docs/core/astro-ssr) [Next\ \ Nest.js](/docs/core/nestjs) ### On this page No Headings --- # Qwik | Dokploy On this page Examples Qwik ==== Deploy a simple Qwik application. This example will deploy a simple Qwik application. 1. **Use Git Provider in Your Application**: * Repository: `https://github.com/Dokploy/examples.git` * Branch: `main` * Build path: `/qwik` 2. **Add Environment Variables**: * Navigate to the "Environments" tab and add the following variable: NIXPACKS_START_CMD="pnpm run preview" 3. **Click on Deploy**: * Deploy your application by clicking the deploy button. 4. **Generate a Domain**: * Click on generate domain button. * A new domain will be generated for you. * You can use this domain to access your application. If you need further assistance, join our [Discord server](https://discord.com/invite/2tBnJ3jDJc) . [Previous\ \ Preact](/docs/core/preact) [Next\ \ Remix](/docs/core/remix) ### On this page No Headings ---