
Dokploy is an open-source, self-hosted Platform as a Service (PaaS) that simplifies application deployment and management. It serves as a free alternative to platforms like Heroku, Vercel, and Netlify, using Docker for containerization and Traefik for automatic HTTPS routing. Dokploy provides a web-based dashboard where administrators can deploy applications from Git repositories, manage databases, configure environment variables, and monitor resource usage.
This article explains how to install Dokploy on Ubuntu 24.04 and deploy a sample application. It covers the installation process, initial configuration, deploying an application from a GitHub repository, configuring a custom domain with SSL certificates, and monitoring application performance through the Dokploy dashboard.
Before you begin, you need to:
sudo privileges.dokploy.example.com and app.example.com).Dokploy provides a single installation script that installs Docker (if not present), configures Docker Swarm mode, and deploys the Dokploy application stack. The script requires root privileges and handles all dependencies automatically.
Update the server's package index.
Run the Dokploy installation script with root privileges.
Output:
The script installs and configures Dokploy and its dependencies.
Add your user to the docker group to run Docker commands without sudo.
Verify that the Dokploy services are running.
Output:
You should see the dokploy service and supporting services (for example, PostgreSQL and Redis). Depending on the Dokploy version and your configuration, you may also see a Traefik service (sometimes shown as dokploy-traefik) for HTTP/HTTPS routing.
The web interface runs on port 3000 by default. In this section, you access the dashboard and create the administrator account.
Open the Dokploy dashboard in your web browser. Replace SERVER-IP with your server's IP address.
The setup page prompts you to enter your name, email address, and password for the initial administrator account. Click Register to complete the setup.
The dashboard displays the main project view after registration. From here, you can create projects, deploy applications, and manage databases.
The initial setup uses HTTP on port 3000. This article shows how to configure a custom domain with HTTPS for the Dokploy dashboard later in the Secure the Dokploy Dashboard section.
Dokploy supports multiple deployment methods including GitHub repositories, Git URLs, Docker images, and Docker Compose files. In this section, you deploy a sample Node.js application from a public GitHub repository.
Click Create Project from the dashboard.
Enter a project name (for example, demo-project) and click Create.
The project page opens, displaying options to add applications, databases, and Docker Compose stacks.
Click Create Service and select Application.
Enter an application name (for example, hello-app) and click Create.
Navigate to the General tab and configure the source settings:
https://github.com/dokploy/hello-world).main.
Configure the build settings:
Dokploy supports multiple build types:
Click Save to apply the configuration.
Click Deploy to start the build process.
Navigate to the Deployments tab to monitor the build progress.
The deployment log shows each build step including dependency installation, compilation, and container creation. A successful deployment displays a green status indicator.
Navigate to the Logs tab to view the application's runtime output.
Output:
The application is now running inside a Docker container managed by Dokploy.
Dokploy uses Traefik to route traffic and automatically provision SSL certificates through Let's Encrypt. Traefik requires ports 80 and 443 to handle HTTP/HTTPS traffic and certificate provisioning.
Allow HTTP and HTTPS traffic through the firewall.
Enable UFW if it is not already enabled.
Verify the firewall status.
Navigate to the Domains tab for your application.
Click Add Domain.
Configure the domain settings:
app.example.com).Click Create to save the domain configuration.
Verify that your domain's DNS A record points to your server's IP address.
Install dig if it is not available.
Query the DNS A record for app.example.com.
Output:
Verify the output matches your server's public IP address.
Access the application through your custom domain.
Traefik automatically provisions the SSL certificate on the first request. Certificate renewal occurs automatically before expiration.
This section assigns a domain to the Dokploy dashboard, enables HTTPS, and disables IP:port access after confirming the domain works.
Navigate to Settings > Web Server in the Dokploy dashboard.
Configure a domain for the panel (for example, dokploy.example.com).
Enable HTTPS and select Let's Encrypt for certificate provisioning.
Verify the domain works correctly by accessing https://dokploy.example.com.
Disable IP:port access after confirming the domain works.
Verify that your domain is working correctly with HTTPS before disabling IP:port access. Otherwise, you lose access to the Dokploy dashboard.
Dokploy provides one-click database deployments with automatic backup configuration. In this section, you deploy a PostgreSQL database.
Navigate to your project and click Create Service.
Select Database and choose PostgreSQL.
Enter a database name (for example, app-db) and click Create.
Navigate to the General tab to view the database connection settings.
Dokploy displays internal connection details for application-to-database connections on the server:
5432).It also includes an External Port (Internet) field. Set this only if you need to connect from outside the server (for example, from your workstation).
Click Deploy to start the database container.
Optionally configure automated backups in the Backups tab:
Navigate to the Environment tab for your application.
Copy the Internal Connection URL value from the database's General tab and save it as an environment variable.
Replace INTERNAL-CONNECTION-URL with the exact value displayed in Dokploy (use the copy button next to the field).
Click Save and redeploy the application for the changes to take effect.
Dokploy provides real-time monitoring for CPU, memory, disk, and network usage. In this section, you access the monitoring dashboard.
Navigate to the Monitoring tab for your application.
Four graphs display resource utilization:
Use the monitoring data to identify performance bottlenecks and adjust resource limits.
Navigate to the Advanced tab to configure resource constraints:
You have installed Dokploy on Ubuntu 24.04 and deployed a sample application with a custom domain and SSL certificate. The platform provides a centralized dashboard for managing containerized applications, databases, and Docker Compose stacks with automatic HTTPS provisioning through Traefik. For advanced features including cluster deployments, remote servers, and custom Traefik configurations, refer to the official Dokploy documentation.
0 Comments
Be the first to comment and share your perspective with the community.