Logo

Command Palette

Search for a command to run...

Command Palette

Search for a command to run...

Blog
PreviousNext

From Localhost to Production with Coolify

Self-hosting is back! Learn how to ship your websites from localhost to VPS with Coolify.

Are Vercel/Netlify bills getting out of hand? Or maybe you just want total control. Enter Coolify - an open-source, self-hosted alternative to Heroku/Vercel.

The Self-Hosting Mindset

Self-hosting is no longer about configuring complex Nginx files manually. Tools like Coolify offer a git-push-to-deploy experience on your own hardware.

Why Coolify?

  • Zero-Cost Deployments: You pay for the VPS, nothing per site.
  • Privacy & Ownership: Your data stays on your server.
  • Auto SSL: Integrated with Traefik for automatic Let's Encrypt certificates.
  • Service Market: One-click install for PostgreSQL, Redis, Meilisearch, and many more.

Setting Up Your Production Environment

1. The VPS Selection

Choose a provider like DigitalOcean, Hetzner, or AWS LightSail. 1 vCPU and 2GB RAM is enough to start several small apps.

2. Installing Coolify

Running a single command on your fresh Ubuntu server is often enough:

curl -fsSL https://cdn.coollabs.io/coolify/install.sh | bash

3. Deploying Your Next.js App

Connect your GitHub account, select your repository, and set the Build Pack to Nixpacks or Dockerfile. Coolify detects your environment (Next.js, Vite, Express) and handles the rest.

Best Practices for Production

  • Backups: Use S3-compatible storage (Cloudflare R2 or AWS S3) for automatic database backups.
  • Monitoring: Host a small Uptime Kuma instance to monitor your apps' health.
  • Security: Enable Cloudflare Proxy for DDoS protection and hide your server's IP.

Conclusion

Control your infrastructure, own your data, and save money. Self-hosting with Coolify is the modern standard for independent builders.