Coolify is an open-source, self-hosted platform-as-a-service — the modern Heroku alternative that runs on your own infrastructure. It handles Docker-based deployments, automatic SSL, reverse proxy configuration, database provisioning, and environment variable management through a clean web UI, eliminating the manual server configuration that typically accompanies VPS hosting.
Running Coolify on a Hong Kong VPS gives your team Heroku-like deployment convenience combined with CN2 GIA routing — your apps deploy in seconds and serve Asian users with the same low-latency China connectivity as any other Server.HK workload.
What Coolify Manages for You
- Application deployments — connect a GitHub/GitLab repo, define a build command, and Coolify handles the rest: clone, build, containerise, deploy, and expose via HTTPS
- Automatic SSL — Let’s Encrypt certificates provisioned and renewed automatically for every deployed application
- Reverse proxy — Traefik handles routing and SSL termination without manual Nginx configuration
- Database provisioning — spin up PostgreSQL, MySQL, Redis, MongoDB, and MinIO instances with one click
- Environment variables — manage secrets per-application through the UI, never in plaintext config files
- Deployment previews — auto-deploy preview environments for pull requests
- Multi-server support — manage deployments across multiple VPS instances from a single Coolify dashboard
VPS Requirements
| Use Case | RAM | vCPU | Storage |
|---|---|---|---|
| Coolify + 2–3 small apps | 2 GB | 2 | 40 GB NVMe |
| Coolify + 5–10 apps | 4 GB | 4 | 80 GB NVMe |
| Team PaaS (10+ apps) | 8 GB | 8 | 160 GB NVMe |
Step 1: Install Coolify
apt update && apt upgrade -y
# Coolify's official one-line installer
curl -fsSL https://cdn.coollabs.io/coolify/install.sh | bashThe installer automatically installs Docker, Docker Compose, and all Coolify dependencies, then starts the Coolify service stack. Installation takes 3–5 minutes.
# Open required ports
ufw allow 22/tcp
ufw allow 80/tcp
ufw allow 443/tcp
ufw allow 8000/tcp # Coolify dashboard (temporary, will be proxied later)
ufw enableAccess the Coolify dashboard at http://YOUR_VPS_IP:8000 to complete initial setup. Create your admin account on first login.
Step 2: Configure Your Domain
In Coolify dashboard: Settings → General
- Set App URL to
https://coolify.yourdomain.com - Enable Auto-update to keep Coolify current
Point your domain DNS A record at your VPS IP, then in Coolify enable SSL for the dashboard itself. Once HTTPS is active, close port 8000 in your firewall:
ufw delete allow 8000/tcpStep 3: Connect Your Git Provider
In Coolify: Sources → Add
GitHub
- Select GitHub App (recommended) or Personal Access Token
- For GitHub App: follow the OAuth flow to install the Coolify GitHub App on your account or organisation
- Coolify can now access your repositories and receive webhook events for automatic deployments
GitLab (Self-Hosted)
If you followed our GitLab CE guide and host GitLab on a Hong Kong VPS:
- In your GitLab: User Settings → Applications → New Application
- Redirect URI:
https://coolify.yourdomain.com/auth/source/gitlab/callback - Scopes:
api read_user read_repository - Copy the Application ID and Secret into Coolify’s GitLab source configuration
Step 4: Deploy Your First Application
Deploy a Node.js App from GitHub
- In Coolify: Projects → New Project → New Resource → Application
- Select your GitHub source and choose your repository
- Configure:
- Build Pack: Nixpacks (auto-detects Node.js, Python, PHP, etc.) or Dockerfile
- Branch:
main - Domain:
myapp.yourdomain.com - Port: 3000 (or your app’s port)
- Add environment variables:
NODE_ENV=production,DATABASE_URL=... - Click Deploy
Coolify clones the repository, builds the Docker image, starts the container, configures Traefik routing, and provisions the Let’s Encrypt certificate — all automatically. Your app is live at https://myapp.yourdomain.com within 2–3 minutes.
Deploy a Laravel (PHP) App
# Coolify detects PHP/Laravel automatically via Nixpacks
# Set these environment variables in the Coolify UI:
APP_ENV=production
APP_KEY=base64:YOUR_KEY # generate with: php artisan key:generate --show
DB_HOST=YOUR_DB_HOST
DB_DATABASE=myapp
DB_USERNAME=myapp_user
DB_PASSWORD=strong_passwordDeploy a Python/Django App
Add a Procfile to your repository root:
web: gunicorn myproject.wsgi:application --bind 0.0.0.0:8000 --workers 3Coolify’s Nixpacks buildpack detects Django and installs requirements from requirements.txt automatically.
Step 5: Provision a Database
In Coolify: Projects → Your Project → New Resource → Database
Select PostgreSQL, MySQL, or Redis. Coolify:
- Pulls the official Docker image
- Generates a secure random password
- Creates the database and user
- Exposes a connection string you can paste directly into your application’s environment variables
The database runs in a Docker container on the same VPS — connection latency is effectively zero (container-to-container on the same host).
Step 6: Configure Automatic Deployments
With GitHub App integration, Coolify automatically deploys when you push to the configured branch:
- In your application settings: enable Auto Deploy
- Optionally enable Preview Deployments — Coolify creates a temporary subdomain for each pull request
- Configure Webhooks: Coolify installs the webhook on your GitHub repo automatically
Deployment workflow: git push origin main → GitHub webhook → Coolify pulls code → builds image → zero-downtime container swap. Total time: 60–120 seconds for most Node.js or Python apps.
Step 7: Set Up Backups
In Coolify: Backups — configure S3-compatible backup destination (Cloudflare R2 is free for egress and works well from Hong Kong):
# Configure in Coolify UI:
S3 Endpoint: https://YOUR_ACCOUNT.r2.cloudflarestorage.com
Bucket: coolify-backups
Access Key: YOUR_R2_ACCESS_KEY
Secret Key: YOUR_R2_SECRET_KEYEnable daily database backups for each provisioned database. Coolify dumps the database, compresses it, and uploads to R2 automatically.
Coolify vs Manual VPS Configuration
| Task | Manual VPS | Coolify on VPS |
|---|---|---|
| Deploy new app | 30–120 min (Nginx, SSL, Docker) | 2–3 minutes |
| Add SSL certificate | 10–20 min (certbot config) | Automatic |
| Add database | 20–40 min (install, secure, create user) | 1 click, 60 seconds |
| Deploy on git push | Requires CI/CD setup (30–60 min) | Toggle on, works immediately |
| Env variable management | Edit files on server manually | UI with encryption at rest |
| Rollback deployment | Manual Docker tag management | One-click rollback in UI |
Conclusion
Coolify transforms a Hong Kong VPS from a blank server into a self-hosted PaaS that rivals Heroku and Railway in deployment convenience — while keeping all your data on infrastructure you control, with CN2 GIA routing to mainland China as standard. The one-command installation, automatic SSL, and Git-push deployments remove the operational overhead that makes manual VPS configuration time-consuming.
For teams currently paying $25–50/month per app on Heroku or Railway, consolidating onto a single Coolify-managed Hong Kong VPS delivers the same deployment experience at a fraction of the cost — with better latency for your Asian user base.
Build your PaaS: Browse Server.HK Hong Kong VPS plans — a 4 GB plan runs Coolify with 5–10 production applications comfortably.