🚀 Executive Summary
TL;DR: Moving from Vercel to a VPS with Coolify solves the complexity and cost issues of managing persistent databases, caches, and cron jobs across multiple providers. Coolify offers a Vercel-like git-push-to-deploy experience on your own server, providing full control and predictable pricing for full-stack applications.
🎯 Key Takeaways
- Coolify transforms a standard VPS into a personal Platform-as-a-Service (PaaS), enabling a git-push-to-deploy workflow similar to Vercel.
- It allows self-hosting databases (e.g., PostgreSQL, MySQL, MongoDB) directly on the VPS, with automatic environment variable injection for applications within the same project.
- Coolify automates SSL certificate provisioning and renewal for custom domains (FQDNs) pointed to the VPS.
- It integrates with Git providers (GitHub, GitLab) via OAuth Apps for secure repository access and webhook-triggered automatic deployments.
- The platform uses Nixpacks for automatic build process detection, simplifying deployment configuration for various application types like Node.js, Python, or Ruby.
Moving from Vercel to a VPS with Coolify
Hey there, Darian Vance here. As Senior DevOps at TechResolve, I’ve managed deployments across dozens of platforms. I love Vercel for its simplicity, especially for front-end projects. It’s friction-free. But I ran into a wall on a recent project. The moment I needed a persistent database, a Redis cache, and a simple cron job, my “simple” Vercel setup spiraled into a multi-provider, bill-juggling headache. That’s when I rediscovered the power of a good old VPS, but with a modern twist: Coolify.
This guide is for you if you’re feeling that same friction. We’re going to set up a Vercel-like experience on your own virtual server. The goal is to get back the control and flexibility you lose with managed platforms, without sacrificing the git-push-to-deploy workflow we all love. Let’s dive in.
Prerequisites
Before we start, make sure you have the following ready. We’re keeping this focused, so I’ll assume you have these sorted:
- A fresh VPS with a public IP address. I recommend a provider like DigitalOcean, Hetzner, or Linode. A 2 CPU / 4GB RAM instance running Ubuntu 22.04 is a great starting point.
- A domain name that you can point to your VPS.
- An application in a GitHub or GitLab repository. We’ll use a standard Next.js app as an example.
- SSH access to your new server to run the initial setup.
The Guide: Your Personal PaaS in Under an Hour
Step 1: Install Coolify on Your VPS
First things first, you need to get Coolify running on your server. SSH into your newly provisioned VPS. The Coolify team provides a simple one-line installation script on their official website. You’ll just need to copy and run that in your terminal. It handles all the Docker dependencies and gets the main Coolify instance up and running.
Once the script finishes, you can access the Coolify dashboard by navigating to your server’s IP address in your browser. It will guide you through creating an admin account. Easy as that.
Pro Tip: Before running the installer, make sure your server’s firewall allows traffic on ports 80 and 443. This is a common oversight that prevents the SSL certificate generation from working later on. For example, on Ubuntu, you’d typically use `ufw` to allow ‘OpenSSH’, ‘HTTP’, and ‘HTTPS’.
Step 2: Connect Your Git Provider
This is where the magic begins. To get that Vercel-like push-to-deploy workflow, Coolify needs access to your repositories.
- Inside the Coolify dashboard, navigate to the “Settings” tab for your server.
- Select “GitHub App” (or your provider of choice).
- Coolify provides a link that will take you straight to GitHub to configure a new OAuth App. It pre-fills most of the details for you. Just give it a name and confirm.
- Once GitHub provides you with a Client ID and generates a Client Secret, copy those back into the corresponding fields in the Coolify dashboard and save.
Now Coolify can securely pull your code and even set up webhooks to trigger deployments automatically. In my production setups, this tight integration is non-negotiable.
Step 3: Create a Project and Deploy Your Application
With the foundation laid, let’s deploy your app.
- From the main dashboard, create a new “Project”. Think of this as a workspace for a full stack application.
- Inside the project, click “Add Resource” and select “Application”.
- You’ll be prompted to select your Git source. You should see a list of your repositories. Select the one you want to deploy.
- Next, you’ll configure the build process. For most Node.js, Python, or Ruby apps, you can stick with the default “Nixpacks” build pack. This is very similar to how Vercel works; it inspects your code and figures out how to build it automatically.
- Build Command: For a Next.js app, this would be `npm run build`.
- Install Command: Usually `npm install`.
- Start Command: Usually `npm start`.
- Navigate to the “Environment Variables” tab to add any keys your application needs, like `DATABASE_URL` or `API_SECRET`. This is much like adding secrets in Vercel’s UI, and it’s more secure than a `config.env` file in your repo.
- Finally, go to the “FQDN” (Fully Qualified Domain Name) tab. Enter the domain or subdomain you want to use (e.g., `app.yourdomain.com`) and point its A record to your server’s IP address. Coolify will automatically provision and renew an SSL certificate for you.
Once you’ve configured these settings, hit the “Deploy” button. You can watch the build logs in real-time right from the UI.
Step 4: Add a Database
This is the killer feature. Instead of relying on a separate database provider, you can host it right alongside your application.
- Back in your project dashboard, click “Add Resource” again.
- This time, select “PostgreSQL Database” (or MySQL, MongoDB, etc.).
- Give it a name and Coolify will spin up a new, isolated database container for you.
- Once it’s running, Coolify automatically exposes the connection URL as an environment variable to all other applications within the same project. You’ll see a variable like `POSTGRESQL_URL` available to use in your application’s settings. No more copying and pasting connection strings!
Pro Tip: By default, the database is only accessible from within Coolify’s private Docker network. This is fantastic for security. You don’t need to expose your database port to the public internet. Your application and database can communicate internally, which is also much faster.
Here’s Where I Usually Mess Up (Common Pitfalls)
- Forgetting Webhooks: If auto-deployments aren’t working on a `git push`, it’s usually because I forgot to enable them in the “Webhooks” section of the application settings in Coolify.
- Resource Limits: A cheap 1GB RAM server might struggle during a hefty `npm install` and a production build. If your build fails with an out-of-memory error, this is the first thing to check. In my experience, 2GB is a safer minimum for a build server.
- Base Path Mismatch: Sometimes, an application needs to be served from a sub-path (e.g., `/app`). Make sure your application’s base path configuration matches the path you set in the FQDN settings in Coolify.
Conclusion
Look, the jump from a fully-managed platform like Vercel to a VPS can seem daunting. But tools like Coolify bridge that gap beautifully. For a modest, fixed monthly price for your VPS, you get the power to run your app, your database, your cache, and your background workers all in one place. You get predictable pricing, more control over your environment, and an awesome open-source tool that gives you that “just push and it works” feeling.
Give it a try on your next project. It’s a small investment of time that pays huge dividends in flexibility and cost savings down the road.
🤖 Frequently Asked Questions
âť“ What problem does Coolify solve when migrating from Vercel to a VPS?
Coolify addresses the challenge of managing persistent services like databases, Redis caches, and cron jobs that become complex and costly on Vercel, by providing a unified, self-hosted PaaS experience on a VPS with full control and predictable pricing.
âť“ How does Coolify on a VPS compare to Vercel for application deployment?
While Vercel excels in friction-free front-end deployments, Coolify on a VPS offers greater control over the entire stack, allowing you to host applications, databases, and other services (like Redis) on a single server with predictable fixed costs, unlike Vercel which can lead to multi-provider headaches for full-stack needs.
âť“ What are common pitfalls when setting up Coolify and how can they be avoided?
Common pitfalls include forgetting to enable webhooks for auto-deployments (enable them in application settings), encountering resource limits during builds (use a VPS with at least 2GB RAM), and base path mismatches (ensure application’s base path matches FQDN settings in Coolify).
Leave a Reply