Published on

Coolify Guide: How to Automate Self-Hosted Deployments

Coolify is an open-source, self-hosted platform that allows you to deploy applications, databases, and services on your own servers with a single click. It serves as an alternative to expensive platforms like Heroku or Vercel, potentially reducing your monthly cloud costs by 70% or more while keeping you in full control of your data. By connecting your GitHub account to a private virtual private server (VPS), you can automate the entire build and deployment process in under 10 minutes.

Why should you consider self-hosting your applications?

Self-hosting means running software on a server that you own or rent, rather than using a managed service where the provider handles everything. This approach gives you complete privacy and eliminates the "black box" feeling of traditional cloud providers.

When you use managed platforms, you often pay a significant premium for convenience and ease of use. By managing your own instance, you can run dozens of small projects on a single $5/month server that might otherwise cost hundreds on a per-project billing model.

What are the core features of Coolify?

The platform acts as a control center for your infrastructure, providing a beautiful dashboard to manage complex backend tasks. It handles SSL certificates (the technology that puts the "padlock" in your browser address bar) automatically through Let's Encrypt.

You can also deploy popular databases like PostgreSQL, MySQL, or Redis with just a few clicks. It monitors your applications' health and automatically restarts them if they crash, ensuring your website stays online without manual intervention.

What do you need to get started?

Before you begin, you will need a few basic tools to host your applications. The most important requirement is a VPS (Virtual Private Server - a remote computer you rent from a provider like DigitalOcean, Hetzner, or Linode) running Ubuntu 22.04 or 24.04.

You will also need a domain name to point to your server so users can access your apps. Finally, basic familiarity with a terminal (a text-based interface used to give commands to your computer) will help you run the initial installation script.

Step 1: How do you prepare your server?

Once you have rented a VPS, you need to log in to it using SSH (Secure Shell - a way to securely connect to a remote computer over the internet). Open your terminal and type the following command, replacing your_server_ip with the actual address provided by your host:

# Connect to your remote server
ssh root@your_server_ip

After logging in, it is a best practice to update your system to ensure you have the latest security patches. Run these commands one after the other:

# Update the list of available packages
sudo apt update

# Upgrade all installed packages to their latest versions
sudo apt upgrade -y

What you should see: A long list of text scrolling by as the server downloads updates. Once it finishes, you will be back at the command prompt, ready for the next step.

Step 2: How do you install Coolify?

The installation process is designed to be as simple as possible. The developers provide a "one-liner" script that detects your operating system and installs all necessary dependencies, including Docker (a tool that allows applications to run in isolated environments called containers).

Copy and paste this command into your terminal:

# Download and run the official installation script
curl -fsSL https://cdn.coollabs.io/coolify/install.sh | bash

What you should see: The script will check your server's resources and begin installing Docker and the Coolify dashboard. This usually takes 2 to 5 minutes depending on your server's speed. When it completes, the terminal will display a URL, typically http://your_server_ip:8000.

Step 3: How do you access the dashboard?

Open your web browser and navigate to the IP address and port (a specific "channel" a server uses to communicate) shown at the end of the installation. The first time you visit, you will be asked to create an admin account.

  1. Enter your email address and a strong password.
  2. Click "Register" to create your account.
  3. You will be greeted by the "Getting Started" wizard.

Don't worry if the page takes a moment to load the first time; the system is setting up your local database in the background. Once you are in, you'll see a clean interface where you can add your first "Server" (which, in this case, is the same machine you just installed the software on).

Step 4: How do you deploy your first project?

In our experience, the easiest way to start is by connecting a GitHub repository. We've found that using the "Public Repository" option is great for testing, but "Private Repositories" are better for real-world products.

  1. Click on "Projects" in the sidebar and select "Create New Project."
  2. Choose "Public Repository" for a quick test.
  3. Paste the URL of a simple web project, such as a Next.js 15 or React 19 starter kit.
  4. Coolify will automatically detect the language (e.g., Node.js or Python 3.12).
  5. Click "Deploy."

What you should see: A "Logs" screen will appear, showing you exactly what the server is doing. It will download your code, build the application, and start it. Once the status turns green and says "Running," your app is live.

Common Gotchas and Troubleshooting

It is normal to feel a bit overwhelmed when your first deployment fails. Most errors for beginners happen because the server doesn't have enough RAM (Random Access Memory - the "short-term memory" your server uses to run tasks). We recommend a server with at least 2GB of RAM to run both the dashboard and your applications comfortably.

Another common issue is firewall settings. If you cannot access the dashboard at port 8000, ensure your VPS provider has opened that port in their web console. You may also need to run sudo ufw allow 8000 in your terminal to tell the server's internal firewall to let traffic through.

Next Steps

Now that you have your own deployment platform running, you can experiment with more advanced features. Try setting up a Postgres database and connecting it to a backend API (Application Programming Interface - a way for different software programs to talk to each other). You might also want to explore "Environment Variables," which are secret keys like API tokens that your app needs to function but shouldn't be shared in your code.

For guides that cover every feature in detail, visit the official Coolify documentation.


Read the Coolify Documentation