How to Self-Host Apps With Coolify: Open-Source Alternative to Vercel
On this page
How to Self-Host Apps With Coolify: Open-Source Alternative to Vercel
Cloud platforms like Vercel, Netlify, and Heroku have made deploying applications effortless. But that convenience comes at a cost — literal monthly bills that scale with your traffic, vendor lock-in that limits your flexibility, and a loss of control over where your data lives. Coolify is an open-source, self-hostable platform that gives you the deployment experience of Vercel on your own infrastructure. In this guide, you will learn exactly how to set it up, deploy your first application, and manage everything from databases to domains.
What Is Coolify?
Coolify is an open-source Platform-as-a-Service (PaaS) that you install on your own server. Think of it as a self-hosted alternative to Vercel, Netlify, Heroku, and even Railway — all rolled into one. It provides a clean web-based dashboard where you can deploy applications, provision databases, manage environment variables, configure domains, and set up SSL certificates, all without writing complex Docker Compose files or Nginx configurations by hand.
Built primarily with Laravel and Livewire, Coolify supports a wide range of application types: static sites, Node.js apps, PHP applications, Python services, Go binaries, Rust projects, and virtually anything that can run in a Docker container. It uses Docker and Docker Compose under the hood, which means your deployments are containerized, reproducible, and portable.
Why Choose Coolify Over Vercel or Netlify?
There are several compelling reasons to consider self-hosting with Coolify instead of relying on managed platforms.
Cost savings at scale. Vercel's free tier is generous for hobby projects, but once you start handling real traffic or need team features, costs climb quickly. With Coolify, your only recurring cost is the server itself — typically $5 to $20 per month from providers like Hetzner, DigitalOcean, or Vultr.
Full data ownership. Your application data, logs, and databases all live on infrastructure you control. This matters for compliance requirements like GDPR, HIPAA, or simply for peace of mind.
No vendor lock-in. Coolify does not force you into proprietary build systems or serverless function formats. Your apps run in standard Docker containers, so migrating away is straightforward.
Unlimited projects. There are no artificial limits on the number of applications, team members, or builds you can run. The only limit is your server's hardware.
Prerequisites
Before installing Coolify, you need a few things in place:
- A VPS or dedicated server running Ubuntu 22.04 or later (Debian also works). A minimum of 2 CPU cores and 2 GB of RAM is recommended, though 4 GB is preferable if you plan to host multiple applications.
- A domain name pointed to your server's IP address. You will need this for accessing the Coolify dashboard and for routing traffic to your deployed apps.
- Root or sudo access to the server via SSH.
- Ports 80, 443, and 8000 open in your firewall. Port 8000 is used for the Coolify dashboard during initial setup.
Step 1: Install Coolify on Your Server
SSH into your server and run the official installation script. This single command handles everything — installing Docker, setting up the Coolify application, and starting all required services.
curl -fsSL https://cdn.coollabs.io/coolify/install.sh | bash
The installation process takes a few minutes. Once it finishes, you will see a message indicating that Coolify is ready and accessible at http://your-server-ip:8000.
Open that URL in your browser to access the Coolify dashboard. You will be prompted to create your admin account. Choose a strong password — this account has full control over your server.
Step 2: Configure Your Server
After logging in, Coolify will guide you through an initial setup wizard. The key steps are:
Connect your server. Coolify can manage the server it is installed on (localhost) or remote servers via SSH. For most setups, you will use localhost. Coolify automatically validates the connection and checks that Docker is properly installed.
Set up a proxy. Coolify uses Traefik as its reverse proxy by default. Traefik handles routing incoming HTTP and HTTPS traffic to the correct container based on domain names. It also automatically provisions and renews Let's Encrypt SSL certificates. You can also choose Caddy as an alternative if you prefer its configuration style.
Add your domain. Navigate to Settings and set your Coolify instance's FQDN (e.g., https://coolify.yourdomain.com). This allows you to access the dashboard via your domain with HTTPS instead of the raw IP address on port 8000.
Step 3: Connect a Git Source
Coolify integrates directly with GitHub, GitLab, Bitbucket, and any self-hosted Git provider. To connect GitHub:
- Go to Sources in the sidebar.
- Click Add New Source and select GitHub.
- Coolify will walk you through creating a GitHub App. This grants Coolify permission to read your repositories and set up webhooks for automatic deployments.
- Authorize the app and select which repositories Coolify should have access to.
Once connected, any push to your configured branch will automatically trigger a new deployment — just like Vercel.
Step 4: Deploy Your First Application
Now for the exciting part. Click New Resource and select Application. You will be presented with several options:
- Public Repository — deploy from any public Git URL without authentication.
- Private Repository (GitHub App) — deploy from your connected GitHub account.
- Docker Image — deploy a pre-built image from Docker Hub or any container registry.
- Docker Compose — deploy multi-container applications using a compose file.
- Dockerfile — build and deploy from a Dockerfile in your repository.
For a typical Next.js, Nuxt, or SvelteKit application, select your GitHub source, choose the repository, and pick the branch to deploy. Coolify auto-detects the framework using Nixpacks (the same build system Railway uses) and configures the build settings automatically.
You can customize the build command, install command, start command, and base directory if your project has a non-standard structure. Set the domain name for your application (e.g., app.yourdomain.com), and click Deploy.
Coolify will clone the repository, build the application, create a Docker container, configure Traefik to route your domain to the container, and provision an SSL certificate. You can watch the entire build log in real time from the dashboard.
Step 5: Set Up Databases
One of Coolify's strongest features is its ability to provision databases with a single click. Supported databases include:
- PostgreSQL
- MySQL and MariaDB
- MongoDB
- Redis
- ClickHouse
- DragonFly
To create a database, click New Resource, select Database, and choose your engine and version. Coolify generates secure credentials automatically and gives you the connection string. You can then reference this connection string in your application's environment variables.
This is a major advantage over platforms like Vercel, where you typically need to pay for a separate database service like Neon, PlanetScale, or Upstash.
Step 6: Environment Variables and Secrets
Coolify provides a dedicated section for managing environment variables for each application. You can add variables one by one or paste an entire .env file. Variables can be scoped to specific environments (preview deployments vs. production), and sensitive values are encrypted at rest.
A practical tip: use Coolify's shared variables feature to define variables at the project or team level. This is useful for values like API keys or database URLs that multiple applications need access to.
Step 7: Set Up Wildcard Domains for Preview Deployments
One of the features that makes Vercel so appealing is automatic preview deployments for pull requests. Coolify supports this too. To enable it:
- Set up a wildcard DNS record:
*.yourdomain.compointing to your server's IP. - In your application settings, enable Preview Deployments.
- Configure the preview URL pattern (e.g.,
pr-{{pr_id}}.yourdomain.com).
Now every pull request gets its own live URL with a valid SSL certificate, making code reviews significantly easier.
Managing Multiple Servers
Coolify is not limited to a single server. You can add remote servers via SSH and deploy applications across multiple machines. This is useful for separating concerns — for example, running your databases on a dedicated server with more storage, or distributing applications across regions for lower latency.
To add a remote server, go to Servers, click Add, and provide the SSH connection details. Coolify will install Docker on the remote server and manage it just like localhost.
Backups and Persistence
Coolify includes built-in scheduled backups for databases. You can configure backups to run on a cron schedule and store them locally or push them to an S3-compatible storage provider like Backblaze B2, Wasabi, or MinIO.
For application data, Docker volumes are used to persist files between deployments. Make sure any user-uploaded content or local file storage is mapped to a volume, or you will lose it on the next deployment.
Monitoring and Notifications
Coolify integrates with several notification channels to keep you informed about deployments, server health, and errors:
- Email (SMTP)
- Discord webhooks
- Slack webhooks
- Telegram bots
You can configure which events trigger notifications — successful deployments, failed builds, server disk space warnings, and more.
Practical Tips for Running Coolify in Production
Keep Coolify updated. The project ships updates frequently with bug fixes and new features. You can update directly from the dashboard with a single click.
Use a firewall. Only expose ports 80 and 443 to the public. Lock down SSH to your IP address or use key-based authentication. Close port 8000 after you have configured your Coolify domain with HTTPS.
Monitor disk space. Docker images and build caches accumulate over time. Coolify has a built-in cleanup feature, but you should also monitor disk usage and set up alerts.
Start with a capable server. While Coolify can run on a 1 GB VPS, build processes (especially for JavaScript frameworks) are memory-hungry. A server with 4 GB of RAM and 2 CPUs provides a much smoother experience.
Use Docker Compose for complex stacks. If your application requires multiple services (app server, worker, Redis, database), define them in a docker-compose.yml file and deploy the entire stack as a single resource.
Coolify vs. Other Self-Hosted Platforms
Coolify is not the only self-hosted PaaS available. CapRover and Dokku are popular alternatives. CapRover offers a similar web-based dashboard but has a smaller development team and slower update cadence. Dokku is more CLI-driven and closer to the original Heroku experience but lacks a built-in web interface. Coolify strikes a balance between ease of use, active development, and feature completeness that makes it the strongest option for most self-hosters today.
FAQ
Is Coolify really free? Yes. Coolify is fully open-source under the Apache 2.0 license. You can install it and use all features without paying anything. The team behind Coolify offers a paid cloud-hosted version if you do not want to manage the server yourself, but the self-hosted version is functionally identical.
What kind of server do I need? Any VPS or dedicated server running a supported Linux distribution (Ubuntu 22.04+ or Debian 12+) with at least 2 GB of RAM. Providers like Hetzner, DigitalOcean, Linode, and Vultr all work well. ARM-based servers (like Oracle Cloud's free tier or Hetzner's Ampere instances) are also supported.
Can I deploy Docker Compose applications?
Yes. Coolify natively supports Docker Compose deployments. You can paste your compose file directly or point Coolify to a docker-compose.yml in your repository. All services defined in the compose file will be deployed and managed together.
Does Coolify support automatic HTTPS? Yes. Coolify uses Traefik (or Caddy) as its reverse proxy, which automatically obtains and renews Let's Encrypt SSL certificates for all configured domains. No manual certificate management is required.
Can I use Coolify for production workloads? Absolutely. Many developers and small teams run production applications on Coolify. For mission-critical workloads, ensure your server has adequate resources, set up automated backups, and monitor server health with the built-in notification integrations.
How does Coolify handle zero-downtime deployments? Coolify supports health checks and can perform rolling deployments. It starts the new container, waits for the health check to pass, and then routes traffic to the new container before stopping the old one. This ensures your application remains available during deployments.
Can I migrate my apps from Vercel to Coolify? In most cases, yes. If your application is a standard Next.js, Nuxt, SvelteKit, or similar framework app, you can deploy it on Coolify with minimal changes. The main consideration is replacing any Vercel-specific features like Edge Functions or Vercel KV with self-hosted alternatives. Standard server-side rendering, static generation, and API routes work out of the box.
Does Coolify support multiple users and teams? Yes. You can create multiple teams, invite users, and assign granular permissions. Each team can have its own projects, servers, and resources, making it suitable for agencies or organizations managing applications for multiple clients.
The article is ~1,800 words. It was blocked from writing to a file due to permissions, so I've output it directly above. You can copy it from here, or let me know if you'd like me to try saving it to a specific location.