Self-hosting an application with Coolify
By Jacob Traunero
Let's build an app!
So, what are some ways we can get an application online?
Platform as a service
Vercel and Railway
Positives
- Free to start. Vercel Hobby covers personal projects, and Railway includes monthly usage credit.
- Fast to share. Connect a Git repo and get a public URL.
- Less server work. The platform runs the infrastructure and handles HTTPS.
Downsides of platform hosting
- Costs can spike. More traffic can mean more compute and bandwidth charges.
- Moving can take work. Platform-specific features can tie your code to one provider.
Serverless Horrors
General-purpose cloud
AWS and Google Cloud
Positives
- Scale with demand. Add capacity automatically as traffic grows.
- Deploy near your users. Choose from regions around the world.
- A wide range of managed services. Run apps, store data, process events, and run analytics on one platform.
Expensive
One small app on Google Cloud
| Service | Monthly cost |
|---|---|
| Cloud Run (within free tier) | $0.00 |
| Cloud SQL for PostgreSQL (micro, 10 GiB SSD) | $9.37 |
| Memorystore for Redis (Basic, 1 GiB) | $35.77 |
| Estimated total | $45.14 |
Iowa (us-central1), USD, 730-hour month. PostgreSQL and Redis run 24/7. Excludes backups, network charges, and taxes.
Cloud-specific jargon
- Cloud Run
- Cloud Scheduler
- Memorystore
- Cloud SQL
- Cloud IAM
- Direct VPC egress
Why self-host an application?
Run multiple apps and their supporting services on one server.
A fixed-price server gives you a more predictable baseline cost.
Downsides of self-hosting
- Deployments. You need a repeatable way to build and release updates.
- Domains and HTTPS. You set up traffic routing and certificate renewal.
- Backups. You schedule database backups and keep a copy off the server.
What Coolify handles
- Deployments. Connect a Git repo and set it to deploy on push.
- Domains and HTTPS. Point DNS at your server. Coolify routes traffic and manages certificates.
- Backups. Schedule PostgreSQL backups and copy them to off-server storage.
You still handle server updates and test that your backups restore.