DEVELOPMENT.md
"First, thanks for considering contributing to my project. It really means a lot!" - @andrasbacsai
You can ask for guidance anytime on our Discord server in the #contribute channel.
To understand the tech stack, please refer to the Tech Stack document.
Follow the steps below for your operating system:
<details> <summary><strong>Windows</strong></summary>Install docker-ce, Docker Desktop (or similar):
Install Spin:
Install Orbstack, Docker Desktop (or similar):
Install Spin:
Install Docker Engine, Docker Desktop (or similar):
Install Spin:
After installing Docker (or Orbstack) and Spin, verify the installation:
docker --version
spin --version
Fork the Coolify repository to your GitHub account.
Install a code editor on your machine (choose one):
| Editor | Platform | Download Link |
|---|---|---|
| Visual Studio Code (recommended free) | Windows/macOS/Linux | Download |
| Cursor (recommended but paid) | Windows/macOS/Linux | Download |
| Zed (very fast) | Windows/macOS/Linux | Download |
Clone the Coolify Repository from your fork to your local machine
git clone in the command line, orFile -> Clone Repository select github.com as the repository location, then select your forked Coolify repository, choose the local path and then click CloneOpen the cloned Coolify Repository in your chosen code editor.
.env.development.example file in the root directory of your local Coolify repository..env.development.example file and rename the copy to .env..env file and review its contents. Adjust any environment variables as needed for your development setup..env file. Use the IP address or hostname of your PostgreSQL database container. You can find this information by running docker ps after executing spin up..env file.spin up
[!NOTE] You may see some errors, but don't worry; this is expected.
sudo spin up
[!NOTE] If you change environment variables afterwards or anything seems broken, press Ctrl + C to stop the process and run
spin upagain.
Access your Coolify instance:
http://localhost:8000[email protected]passwordAdditional development tools:
| Tool | URL | Note |
|---|---|---|
| Laravel Horizon (scheduler) | http://localhost:8000/horizon | Only accessible when logged in as root user |
| Mailpit (email catcher) | http://localhost:8025 | |
| Telescope (debugging tool) | http://localhost:8000/telescope | Disabled by default |
[!NOTE] To enable Telescope, add the following to your
.envfile:envTELESCOPE_ENABLED=true
When working on Coolify, keep the following in mind:
Database Migrations: After switching branches or making changes to the database structure, always run migrations:
docker exec -it coolify php artisan migrate
Resetting Development Setup: To reset your development setup to a clean database with default values:
docker exec -it coolify php artisan migrate:fresh --seed
Troubleshooting: If you encounter unexpected behavior, ensure your database is up-to-date with the latest migrations and if possible reset the development setup to eliminate any environment-specific issues.
[!IMPORTANT] Forgetting to migrate the database can cause problems, so make it a habit to run migrations after pulling changes or switching branches.
If you encounter issues or break your database or something else, follow these steps to start from a clean slate (works since v4.0.0-beta.342):
Stop all running containers ctrl + c.
Remove all Coolify containers:
docker rm coolify coolify-db coolify-redis coolify-realtime coolify-testing-host coolify-minio coolify-vite-1 coolify-mail
Remove Coolify volumes (it is possible that the volumes have no coolify prefix on your machine, in that case remove the prefix from the command):
docker volume rm coolify_dev_backups_data coolify_dev_postgres_data coolify_dev_redis_data coolify_dev_coolify_data coolify_dev_minio_data
Remove unused images:
docker image prune -a
Start Coolify again:
spin up
Run database migrations and seeders:
docker exec -it coolify php artisan migrate:fresh --seed
After completing these steps, you'll have a fresh development setup.
[!IMPORTANT] Always run database migrations and seeders after switching branches or pulling updates to ensure your local database structure matches the current codebase and includes necessary seed data.
To add a new service to Coolify, please refer to our documentation: Adding a New Service
To contribute to the Coolify documentation, please refer to this guide: Contributing to the Coolify Documentation