Hosting my Docker Container on a VPS with Coolify as a PaaS with GitHub Autodeploys
Essay - Published: 2024.10.16 | 2 min read (607 words)
cloud | coolify | create | docker | hosting | tech
DISCLOSURE: If you buy through affiliate links, I may earn a small commission. (disclosures)
I've been using Coolify the past few weeks to transition several of my side project sites to a VPS - both as an experiment and cost-cutting (and capping) measure.
In this screen cast I walk through setting up my newest project One Million Checkboxes on my VPS.
App Setup
- Docker Container that spins up an F# webapp
- Code hosted on Github private repo
Steps to Host my Docker Container on Coolify
Create new Deploy Key (SSH)
- Go to Coolify instance
- Go to
Keys and Tokens - Click
Add - Generate a new key and give it a descriptive name (I like
DATE_deploy-APPNAME)
Configure GitHub repo to allow you to deploy from it
- Go to your GitHub Repo
- Go to
Settings->Deploy keys - Click
Add deploy key - Copy / paste your PUBLIC deploy key here
- Save by hitting
Add Key
Create your app on Coolify
- Go to Coolify instance
- Go to
Dashboard->Projects - Select the Project you want to make the App in
- Click
New->Private Repository (with Deploy Key) - Select the private key you just made above
- Fill
Repository Urlwithgit@...from your GitHub Repo (IME this works better than https) - Fill
BuildPack= Dockerfile - Fill
Branch= main / master / whatever
Deploy your App
- On the configuration page - click Deploy
Setup Autodeploys from GitHub on branch push:
- Go to Coolify instance -> App Configuration page
- Go to
Webhookssection - Find GitHub webhook and add a GitHub webhook password (you can create one)
- Go to your GitHub repo
- Go to
Settings->Webhooks - Click
Add Webhook Payload URL= the url in CoolifySecret= The webhook password you just made- Send the push event
- Set to
Active - Save with
Add webhook
Debugging Failures
There's bound to be some configuration stuff that your app needs to deploy.
Here are some I've needed to set myself:
can't open '/artifacts/h80448k08g00c4oggg84c4cc/Dockerfile': No such file or directory
I build my apps like monorepos so my Dockerfile can't be found in the root directory.
To fix:
- Go to
Configuration - Go to
Buildsection - Set
Base Directoryto where my Dockerfile lives - for me that's/App - Click
Saveto save the configuration - Click
Deployto deploy with the new settings
URL gives Bad Gateway
For me this usually happens when my app is running fine but it's looking at the wrong port.
By default Coolify seems to point incoming traffic to port 3000 but my apps usually listen on 8080.
To fix:
- Go to
Configuration - Go to
Networksection - Set
Ports Exposesto the port you have - for me it's 8080 - Click
Saveto save the configuration - Click
Redeployto deploy with the new config
Next
Overall I've enjoyed using Coolify but it does have some rough edges as it's new and built by a solodev.
Let me know if you like this kind of post / want more on this topic and I'll make more guides.
If you liked this post you might also like:
Want more like this?
The best way to support my work is to like / comment / share this post on your favorite socials.
Inbound Links
- How I self-host with Ansible - Multi-server Container Deployments with Nomad
- 2025.11 Release Notes
- What's the Best Value VPS Provider? Price to Performance Ratio
- Why I'm Ditching Coolify for Ansible for Deploying my Web Apps
- My Career in Programming Languages
- How Cloudflare Container Pricing Compares to Google Cloud Run, AWS Fargate, Azure Container Apps, Railway, Digital Ocean App Platform, and Heroku Dynos
- Google Cloud Run Pricing Breakdown and Comparisons (2025)
- How to Setup Automated Database Backups with Coolify (backed by S3 Object Storage)
- How to Setup an Https Custom Domain with Coolify
- How to run an F# + Falco Webapp in a Docker Container
- How One Million Checkboxes was Built (Tech Stack and System Design)
- TTL Calculator - Convert DNS TTL seconds to human-readable time (built with Datastar)
- How To Hide Your Server's IP Address For Free With Cloudflare
- Why I'm Shutting Down 1000 Checkboxes
- Hetzner's Price Increases Explained (And what it means for your business)
- How to configure a Custom Domain on Coolify
- How to Delete an App on Coolify
- One Million Checkboxes - Globally Synced Data with HTMX
