Deploy on Coolify
Coolify runs the published images and generates the secrets itself, so the setup is a pasted compose file and two domains. The same six containers as the Compose stack, managed from the Coolify interface.
Before you start
- With a server attached to deploy on. coolify.io
- Two hostnames, one for the api and one for the web app. Keep them under one registrable domain, because the session cookie is issued on the parent they share.
Coolify runs the stack from the Docker images published to GHCR on each release and generates the secrets itself. Nothing is built on your server, so the setup is a pasted compose file and two domains.
Set it up
Create the service
New Resource → Docker Compose Empty, then pick the server to deploy on. Paste the whole of one file into Docker Compose file and press Save:
Without a license key the Pro images run as Community does. To unlock the Pro features later, enter the key in god mode, under License. The stack stays the same, with no move to another compose file.
Set the domains
The stack serves two origins: the api and the web app. Coolify generates a domain for each on the first deploy. To use your own, edit the domain of the
apiand thewebservice:https://api.example.comhttps://plan.example.com
Coolify turns those into
SERVICE_URL_APIandSERVICE_URL_WEB, which the compose file reads as the api’sAPI_URLandAPP_URL, and as the api origin web hands to the browser.Deploy
Press Deploy. Postgres, RustFS, api, worker, bot and web come up together. The one-shot
migrateservice applies the migrations first, and api, worker and bot start once it exits. The first account registered becomes the instance admin.
Environment variables
There is nothing to fill in by hand. The database password, auth secret, encryption key and object store credentials are generated on the first deploy and stay stable across later ones.
Optional variables from .env.example go in Environment Variables: legal document URLs, telemetry opt-out, worker tuning. VERSION pins a release; leave it out for the newest. Mail, AI provider keys, single sign-on and the Telegram bot token are not variables. You configure them in the interface after you sign in.
Changing a domain or a variable later takes a redeploy, which is how Coolify applies an environment change.
Upgrade
Press Redeploy. Coolify pulls the newest images, and the migrate service backs up the database into the db-backups volume and applies the new migrations before the apps start.
Build from source
Use this to run a branch instead of a release. The server builds the images itself, which takes longer and needs more memory than pulling them.
Create the application
New Resource → Public Repository, then pick the server. Enter the repository URL and press Check repository:
https://github.com/croffasia/itsaplan.gitFill in the rest and press Continue:
- Docker Compose
//docker-compose.coolify.yml
Choose the branch
In Configuration → Git Source, set Branch, leave Commit SHA as
HEAD, and press Save.- Released versions only. A mirror branch the release workflow moves to each published release.
- The latest features, the moment they merge. Expect breaking changes between releases.
Set the domains and deploy
Set the domains in Configuration → General. Here each field needs the container port after the host, then press Deploy:
https://api.example.com:3000https://plan.example.com:3001
To keep a Public Repository resource and pull the published images instead of building, set Custom build command in Configuration → General to docker compose pull and redeploy.
Troubleshooting
A domain answers nothing, or answers with the wrong service, on a source build.
The container port is missing from the domain field. A Public Repository resource needs https://api.example.com:3000 and https://plan.example.com:3001, port included.
Sign-in returns to the login page.
The two domains are not under one registrable domain, so the browser drops the session cookie. Put both under the same domain and redeploy.
A changed variable had no effect.
Coolify applies environment changes on the next deploy. Redeploy the resource.
For anything else, read the container logs in Coolify, starting with migrate and the api.
Support
- Report them in GitHub issues.
- Ask in GitHub discussions.
- It ships with the source as docs/coolify.md.
Other ways to run it: Railway, Docker Compose, Kubernetes.