Back to Blog
Tutorials

How to Deploy and Run Dokploy on a VPS with Ubuntu

Deploying and running Dokploy on a VPS with Ubuntu is a straightforward process that can significantly simplify your application deployment workflow. Dokploy is an open-source platform designed to make deploying web applications, especially those using Docker, as easy as possible.

6 min read
Share:
How to Deploy and Run Dokploy on a VPS with Ubuntu

Deploying and running Dokploy on a VPS with Ubuntu is a straightforward process that can significantly simplify your application deployment workflow. Dokploy is an open-source platform designed to make deploying web applications, especially those using Docker, as easy as possible. It provides a user-friendly interface for managing your applications, making it accessible even for those with minimal technical expertise. In this comprehensive guide, we’ll walk through the steps to get Dokploy up and running on your Ubuntu VPS, ensuring you have a reliable and efficient deployment platform.

Why Use Dokploy?

Dokploy stands out as a powerful yet accessible tool for developers and hobbyists alike. Here’s why it’s worth considering:

  • Ease of Use: Dokploy simplifies the deployment process, allowing you to deploy applications with just a few clicks through its intuitive web interface.

  • Docker Integration: It leverages Docker, making it ideal for containerized applications, which are increasingly popular for their portability and scalability.

  • Versatility: Supports multiple deployment methods, including GitHub, GitLab, Bitbucket, and direct Docker deployments, catering to various workflows.

  • Lightweight: Requires minimal server resources, making it cost-effective for VPS setups, especially for small projects or startups.

By deploying Dokploy on your Ubuntu VPS, you can manage your web applications efficiently without needing to dive into complex server configurations.

Prerequisites

Before you begin, ensure you have the following in place:

  • A VPS (Virtual Private Server) with Ubuntu installed. Dokploy officially supports Ubuntu 20.04, 22.04, and 24.04 LTS. However, some users have reported issues with the installation script on Ubuntu 24.04 (Dokploy GitHub Issue #1041). If you encounter problems, consider using Ubuntu 22.04 for better stability.

  • SSH Access: You’ll need to connect to your VPS via SSH. Tools like PuTTY (for Windows) or the built-in SSH client on macOS and Linux are suitable.

  • Basic Linux Knowledge: Familiarity with basic Linux commands and navigating the terminal will make the process smoother.

Your VPS should also meet the following minimum requirements to ensure smooth operation:

These specifications are crucial for handling Docker builds and preventing system freezes during deployment.

Step-by-Step Installation Guide

Follow these steps to deploy and run Dokploy on your Ubuntu VPS:

Step 1: Access Your VPS via SSH

Connect to your VPS using an SSH client. For macOS or Linux users, open your terminal and run:

  • Replace username with your actual username (often root for VPS setups).

  • Replace your-vps-ip with your VPS’s IP address.

For Windows users, you can use PuTTY or another SSH client to connect. Ensure you have your VPS credentials handy.

Step 2: Run the Dokploy Installation Script

Once logged into your VPS, install Dokploy by executing the following command:

This command does the following:

  • Downloads the official Dokploy installation script from Dokploy’s website.

  • Automatically installs Docker if it’s not already present on your system.

  • Sets up Dokploy and its dependencies.

The installation process typically takes 5-10 minutes, depending on your server’s speed and network connection.

Important Note: If you’re using Ubuntu 24.04, some users have reported the installation script getting stuck (Dokploy GitHub Issue #1041). If this happens, consider switching to Ubuntu 22.04, which is widely reported to work without issues.

Step 3: Access the Dokploy Dashboard

After the installation completes, you can access the Dokploy dashboard by opening a web browser and navigating to:

http://your-vps-ip:3000

  • Replace your-vps-ip with your VPS’s actual IP address.

On your first visit, you’ll be prompted to create an admin account. Follow the on-screen instructions to set up your account, which will be used to manage your applications within Dokploy.

Step 4: Verify Firewall Settings (Optional)

Dokploy runs on port 3000 by default. If your VPS has a firewall enabled (e.g., UFW on Ubuntu), you may need to allow traffic on this port to access the dashboard. Run the following command:

This step is optional but recommended if you’re using a firewall to ensure the Dokploy dashboard is accessible.

Deploying Your First Application

With Dokploy installed, you’re ready to deploy your web applications. Here’s a brief overview of the process:

  1. Log in to the Dokploy Dashboard: Access http://your-vps-ip:3000 and log in with your admin account.

  2. Create a New Project: Click the "New Project" button in the top right corner of the dashboard.

  3. Add Services: Select your preferred deployment method (e.g., GitHub, GitLab, Docker) and configure your application settings.

  4. Deploy: Follow the on-screen instructions to deploy your application. Dokploy will handle the build and deployment process, providing a URL to access your application once complete.

Dokploy supports various deployment methods, making it flexible for different project types.

Tips and Considerations

To ensure a smooth experience with Dokploy, keep the following in mind:

  • Server Requirements: Verify that your VPS meets the minimum requirements (2GB RAM, 30GB disk space) to avoid performance issues during Docker builds.

  • Security: Enhance the security of your Dokploy instance by setting up HTTPS. You can use Let’s Encrypt to obtain a free SSL certificate. In the Dokploy dashboard, navigate to the Settings page, enter your domain, email, and select Let’s Encrypt from the Certificate dropdown. For detailed instructions, refer to the Dokploy Documentation.

  • Regular Updates: Keep Dokploy and Docker updated to benefit from the latest features and security patches. Check the Dokploy Documentation for update instructions.

  • Backup: Regularly back up your data and configurations to prevent loss in case of server failures.

  • Firewall Configuration: If you’re using a firewall, ensure port 3000 is open to allow access to the Dokploy dashboard.

  • Ubuntu Version Caution: While Ubuntu 24.04 is listed as supported, some users have reported installation issues. If you encounter problems, Ubuntu 22.04 is a reliable alternative.

Troubleshooting Common Issues

If you run into problems during installation or setup, here are some common issues and solutions:

For additional troubleshooting, consult the Dokploy Troubleshooting Guide. If issues persist, you can explore community discussions on the Dokploy GitHub repository.

Conclusion

Deploying Dokploy on your Ubuntu VPS is a simple yet powerful way to streamline your application deployment process. With its user-friendly interface and robust Docker integration, Dokploy makes it easy to manage and deploy web applications without the need for complex server configurations. By following the steps outlined in this guide, you can have a fully functional deployment platform up and running in no time.

Whether you’re a seasoned developer or new to server management, Dokploy’s accessibility and flexibility make it a valuable tool for your projects. If you encounter any issues, the Dokploy Documentation and community resources are excellent places to find support. Happy deploying!

Y

Written by

Yared