How to Install the Self-Hosted Version of Coolify
- Date
- John Doe
Prerequisites
- A server with SSH access (VPS, Raspberry Pi, or any other server)
- Supported Operating Systems:
- Debian based (Debian, Ubuntu, etc.)
- Redhat based (CentOS, Fedora, Redhat, AlmaLinux, Rocky, etc.)
- SUSE based (SLES, SUSE, openSUSE, etc.)
- Arch Linux
- Raspberry Pi OS (Raspbian)
- Supported Architectures: AMD64, ARM64
- Minimum Server Requirements:
- 2 CPUs
- 2 GBs memory
- 30+ GB of storage for images
Installation
Automated Installation
SSH Enabled: Ensure SSH is enabled and you can connect to your server with the root user.
Curl Installed: Make sure
curl
command is available on your server.Install Coolify: Execute the following command on your server with the root user.
curl -fsSL https://cdn.coollabs.io/coolify/install.sh | bash
Access Coolify's UI: Open your browser and navigate to
http://<ip>:8000
of your server.
Manual Installation
SSH Enabled: Ensure SSH is enabled and you can connect to your server with the root user.
Curl Installed: Make sure
curl
command is available on your server.Install Docker Engine (24+): Follow the official documentation to install Docker Engine on your server.
Create Directories:
mkdir -p /data/coolify/{source,ssh,applications,databases,backups,services,proxy,webhooks-during-maintenance} mkdir -p /data/coolify/ssh/{keys,mux} mkdir -p /data/coolify/proxy/dynamic
Generate SSH Key:
ssh-keygen -f /data/coolify/ssh/keys/id.root@host.docker.internal -t ed25519 -N '' -C root@coolify
Setup Your SSH Key:
cat /data/coolify/ssh/keys/id.root@host.docker.internal.pub >> ~/.ssh/authorized_keys chmod 600 ~/.ssh/authorized_keys
Setup Configuration Files:
curl -fsSL https://cdn.coollabs.io/coolify/docker-compose.yml -o /data/coolify/source/docker-compose.yml curl -fsSL https://cdn.coollabs.io/coolify/docker-compose.prod.yml -o /data/coolify/source/docker-compose.prod.yml curl -fsSL https://cdn.coollabs.io/coolify/.env.production -o /data/coolify/source/.env curl -fsSL https://cdn.coollabs.io/coolify/upgrade.sh -o /data/coolify/source/upgrade.sh
Set Permissions:
chown -R 9999:root /data/coolify chmod -R 700 /data/coolify
Generate Values:
sed -i "s|APP_ID=.*|APP_ID=$(openssl rand -hex 16)|g" /data/coolify/source/.env sed -i "s|APP_KEY=.*|APP_KEY=base64:$(openssl rand -base64 32)|g" /data/coolify/source/.env sed -i "s|DB_PASSWORD=.*|DB_PASSWORD=$(openssl rand -base64 32)|g" /data/coolify/source/.env sed -i "s|REDIS_PASSWORD=.*|REDIS_PASSWORD=$(openssl rand -base64 32)|g" /data/coolify/source/.env sed -i "s|PUSHER_APP_ID=.*|PUSHER_APP_ID=$(openssl rand -hex 32)|g" /data/coolify/source/.env sed -i "s|PUSHER_APP_KEY=.*|PUSHER_APP_KEY=$(openssl rand -hex 32)|g" /data/coolify/source/.env sed -i "s|PUSHER_APP_SECRET=.*|PUSHER_APP_SECRET=$(openssl rand -hex 32)|g" /data/coolify/source/.env
Default Docker Network:
docker network create --attachable coolify
Start Coolify:
docker compose --env-file /data/coolify/source/.env -f /data/coolify/source/docker-compose.yml -f /data/coolify/source/docker-compose.prod.yml up -d --pull always --remove-orphans --force-recreate
Access Coolify's UI: Open your browser and navigate to
http://<ip>:8000
of your server.
Docker Desktop (Not Recommended for Production)
Install Docker Desktop for Windows.
Create a directory for Coolify data, e.g.,
C:\Users\yourusername\coolify
.Copy
docker-compose.windows.yml
and.env.windows-docker-desktop.example
to the created directory.Rename
docker-compose.windows.yml
todocker-compose.yml
.Rename
.env.windows-docker-desktop.example
to.env
.Create a Coolify Docker network:
docker network create coolify
Optional: Change the values in the
.env
file.Start Coolify:
docker compose up
Access Coolify on
localhost:8000
of your machine.
Note: Coolify Proxy is still not working on Windows.
Conclusion
You have successfully installed the self-hosted version of Coolify on your server. Coolify simplifies the deployment and management of applications, making it a powerful tool for developers. For more information and advanced configuration options, refer to the official Coolify documentation.