DEV Community

Alex Spinov
Alex Spinov

Posted on

Coolify Has a Free API — Heres How to Self-Host Your Own Vercel Alternative

Coolify is an open-source, self-hostable platform that replaces Vercel, Netlify, and Heroku. Deploy apps, databases, and services from your own server with a beautiful dashboard.

Why Coolify?

  • Self-hosted Vercel: Deploy from Git with zero config
  • Any language: Node, Python, Go, Rust, PHP, Ruby, static
  • Databases: PostgreSQL, MySQL, Redis, MongoDB one-click
  • Free forever: Your server, your rules
  • Docker-based: Anything in a Dockerfile can be deployed
  • Auto SSL: Let's Encrypt certificates
  • Webhooks: Auto-deploy on git push

Install (One Command)

curl -fsSL https://cdn.coollabs.io/coolify/install.sh | bash
Enter fullscreen mode Exit fullscreen mode

Dashboard available at http://your-server:8000

Deploy from GitHub

  1. Connect your GitHub repo in the dashboard
  2. Coolify detects your framework (Next.js, Remix, etc.)
  3. Click Deploy — automatic builds, SSL, and domain setup

API: List Applications

curl http://localhost:8000/api/v1/applications \
  -H 'Authorization: Bearer YOUR_API_TOKEN'
Enter fullscreen mode Exit fullscreen mode

API: Create Application

curl -X POST http://localhost:8000/api/v1/applications \
  -H 'Authorization: Bearer YOUR_API_TOKEN' \
  -H 'Content-Type: application/json' \
  -d '{
    "project_uuid": "your-project-id",
    "server_uuid": "your-server-id",
    "environment_name": "production",
    "git_repository": "https://github.com/user/repo",
    "git_branch": "main",
    "build_pack": "nixpacks",
    "ports_exposes": "3000"
  }'
Enter fullscreen mode Exit fullscreen mode

API: Deploy Application

curl -X POST http://localhost:8000/api/v1/applications/APP_UUID/deploy \
  -H 'Authorization: Bearer YOUR_API_TOKEN'
Enter fullscreen mode Exit fullscreen mode

API: Create Database

curl -X POST http://localhost:8000/api/v1/databases \
  -H 'Authorization: Bearer YOUR_API_TOKEN' \
  -H 'Content-Type: application/json' \
  -d '{
    "type": "postgresql",
    "name": "my-postgres",
    "server_uuid": "your-server-id"
  }'
Enter fullscreen mode Exit fullscreen mode

API: Get Deployment Logs

curl http://localhost:8000/api/v1/applications/APP_UUID/logs \
  -H 'Authorization: Bearer YOUR_API_TOKEN'
Enter fullscreen mode Exit fullscreen mode

Environment Variables

curl -X POST http://localhost:8000/api/v1/applications/APP_UUID/envs \
  -H 'Authorization: Bearer YOUR_API_TOKEN' \
  -H 'Content-Type: application/json' \
  -d '{
    "key": "DATABASE_URL",
    "value": "postgres://user:pass@db:5432/mydb",
    "is_build_time": false
  }'
Enter fullscreen mode Exit fullscreen mode

Docker Compose Support

Deploy any docker-compose.yml:

services:
  app:
    build: .
    ports:
      - '3000:3000'
    environment:
      - DATABASE_URL=postgres://db:5432/mydb
  db:
    image: postgres:16
    volumes:
      - pgdata:/var/lib/postgresql/data
volumes:
  pgdata:
Enter fullscreen mode Exit fullscreen mode

Real-World Use Case

A bootstrapped SaaS moved from Vercel ($40/mo) + Railway ($20/mo) to Coolify on a $10/mo Hetzner VPS. Same deployments, same auto-SSL, same GitHub integration — but $50/mo cheaper with more control.


Need to automate data collection? Check out my Apify actors for ready-made scrapers, or email spinov001@gmail.com for custom solutions.

Top comments (0)