title | description |
---|---|
Installation - Self-hosted |
Installation of the self-hosted version of Coolify. |
To get started, you need a server, it can be a VPS, a Raspberry Pi, or any other server that you have SSH access to.
If you don't have a server or server provider yet, we prefer to use Hetzner.You can use our referral link. It will helps us to keep the project alive.
TLDR for installation: ```bash curl -fsSL https://cdn.coollabs.io/coolify/install.sh | bash ``` ## Requirements ### Supported Operating Systems- Debian based Linux distributions (Debian, Ubuntu, etc.)
- Redhat based Linux distributions (CentOS, Fedora, Redhat, AlmaLinux, Rocky etc.)
- SUSE based Linux distributions (SLES, SUSE, openSUSE, etc.)
- Arch Linux
- Raspberry Pi OS (Raspbian)
- AMD64
- ARM64
- 2 CPUs
- 2 GBs memory
- 30+ GB of storage for the images.
Choosing your server resources depends on your usage. If you are planning to run a lot of things, you should consider buying a server with more resources.
Hosting Supabase
, Appwrite
or Posthog
are requires more resources than hosting a static site (waay more).
Here is an example. I'm hosting most of my production stuffs on a server with:
- 8GB of memory (average usage 3.5GB)
- 4 CPUs (average usage ~20-30%)
- 150GB disk (usage 40GB)
For the following things:
- 3 NodeJS apps
- 4 Static sites
- Plausible Analytics (for visitor analytics)
- Fider (feedback tool)
- UptimeKuma (uptime monitoring)
- Ghost (my newsletters)
- 3 Redis databases
- 2 PostgreSQL databases
This works with Docker Engine (not Docker Desktop, for that, go here) on any supported Linux distribution.
Make sure SSH is enabled and you can connect to your server with SSH from your local machine with root user: [more details here](/). Make sure `curl` command is available on your server. Execute the following command on your server with `root` user.```bash
curl -fsSL https://cdn.coollabs.io/coolify/install.sh | bash
```
> You can find the source code of this script [here](https://github.com/coollabsio/coolify/blob/main/scripts/install.sh).
What it does? The script will do the following on your operating system.
- Install basic commands:
curl wget git jq jc
Docker Engine
(24+).- Configures proper logging for
Docker Engine
. - Creates directory structure at
/data/coolify
for all the configuration files. - Creates an SSH key for Coolify to be able to manage this server from itself at
/data/coolify/ssh/keys/id.root@host.docker.internal
. - Install and start dockerized
Coolify
.
```bash
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
```
```bash
ssh-keygen -f /data/coolify/ssh/keys/id.root@host.docker.internal -t ed25519 -N '' -C root@coolify
```
Add your public SSH key to ~/.ssh/authorized_keys
. This will allow Coolify to connect to this server from itself.
```bash
cat /data/coolify/ssh/keys/id.root@host.docker.internal.pub >>~/.ssh/authorized_keys
chmod 600 ~/.ssh/authorized_keys
```
<Tip>
You can skip this step if you already have an SSH key. But you need to add this key to your Coolify instance after installation.
</Tip>
```bash
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
```
Make sure you save the values somewhere. If you lose them, you will lose access to your Coolify installation and all your data.
</Warning>
- Install Docker Desktop for Windows.
- Create a directory that will hold all your Coolify related data. For example in your User directory:
C:\Users\yourusername\coolify
. - Copy
docker-compose.windows.yml
and.env.windows-docker-desktop.example
to the directory you created in the previous step. - Rename
docker-compose.windows.yml
todocker-compose.yml
. - Rename
.env.windows-docker-desktop.example
to.env
. - Create a
coolify
docker network withdocker network create coolify
. - Optional: Change the values in
.env
file. - Start Coolify with
docker compose up
command. - You can access Coolify on port
localhost:8000
of your machine.
Coolify Proxy is still not working on Windows.