Skip to content

Installation - Self-hosted

Prerequisites

Server Requirements

You need a server with SSH access. This can be:

  • A VPS
  • A Dedicated Server
  • A VM in Proxmox
  • A Raspberry Pi (for all compatible models read the Raspberry Pi OS Setup Guide prerequisites)
  • Any other server with SSH access

Supported Operating Systems

  • Debian based Linux distributions (Debian, Ubuntu, etc.)
  • Redhat based Linux distributions (CentOS, Fedora, Redhat, AlmaLinux, Rocky, Asahi, etc.)
  • SUSE based Linux distributions (SLES, SUSE, openSUSE, etc.)
  • Arch Linux
  • Raspberry Pi OS 64-bit (Raspbian)
  • Alpine Linux

Supported Architectures

We only support 64-bit architectures:

  • AMD64
  • ARM64

Minimum Hardware Requirements

Server Requirements for Coolify

  • 2 Core CPU
  • 2 GBs memory (RAM)
  • 30+ GB of storage for the images

If you build and host on the same server as Coolify and your builds are utilizing all available memory, this may cause the server to become unresponsive or even crash. To prevent this, consider enabling swap space on your server (or paying for more resources).

Server Requirements for Your Resources

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 requires more resources than hosting a static site (waay more).

Installation Methods

  1. Prepare Your Servern

    • Log in as the root user (non-root user is not fully supported yet [non-root-user](/docs/ knowledge-base/server/non-root-user))
    • Configure SSH by following the SSH Settings Configuration Guide
    • Configure required firewall ports using the Firewall Guide (if you are an advanced user you can have this configured differently)
    • Ensure curl is installed (pre-installed on most systems)
  2. Run the Installation Script

    Terminal window
    curl -fsSL https://cdn.coollabs.io/coolify/install.sh | sudo bash

    View the Scripts Source Code

  3. Access Coolify

    • You can find the URL of your Coolify instance in the installation output.
    • It is recommended to use the PrivateIP to access Coolify as it is more secure (a VPN setup to your Server is needed for that to work).

The installer does the following:

  • Installs required tools (curl wget git jq openssl)
  • Installs Docker Engine (27)
  • Configures Docker logging
  • Configures Docker daemon with default address pools
  • Creates directory structure at /data/coolify
  • Sets up SSH keys for server management
  • Installs and starts Coolify

2. Manual Installation

For users who prefer more control over the installation process.

  1. SSH Configuration Make sure SSH is enabled and configured correctly like shown in the SSH Configuration Guide.

  2. Install Required Tools Make sure the curl command is available on your server.

  3. Install Docker Engine Follow the official documentation to install Docker Engine (24+) on your server: Docker Engine Installation.

  4. Configure Docker Configure Docker logging and default address pools by editing /etc/docker/daemon.json with the following configuration (the adress pools can also be configured differently)

    {
    "log-driver": "json-file",
    "log-opts": {
    "max-size": "10m",
    "max-file": "3"
    },
    "default-address-pools": [
    {"base":"10.0.0.0/8","size":24}
    ]
    }

    After saving the configuration, restart Docker:

    Terminal window
    systemctl restart docker
  5. Create Directory Structure Create the base configuration directories under /data/coolify.

    Terminal window
    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
  6. Generate SSH Keys Generate an SSH key for Coolify to be able to manage this server from itself.

    Terminal window
    ssh-keygen -f /data/coolify/ssh/keys/[email protected] -t ed25519 -N '' -C root@coolify
  7. Configure SSH Access Add your public SSH key to ~/.ssh/authorized_keys. This will allow Coolify to connect to this server from itself.

    Terminal window
    cat /data/coolify/ssh/keys/[email protected] >>~/.ssh/authorized_keys
    chmod 600 ~/.ssh/authorized_keys
  8. Download Configuration Files Copy the docker-compose.yml, docker-compose.prod.yml, .env.production & upgrade.sh files from Coolify’s CDN to /data/coolify/source.

    Terminal window
    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
  9. Set Permissions Set permissions for all the files and directories.

    Terminal window
    chown -R 9999:root /data/coolify
    chmod -R 700 /data/coolify
  10. Configure Environment Variables Generate values for the following variables in /data/coolify/source/.env.

    Terminal window
    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
  11. Configure Root User (Recommended) Configure Root User via Environment Variables. To prevent the registration page from ever being exposed, you can configure a root user in your .env file. Read more about this in the Create Root User with Environment Variables guide.

  12. Create Docker Network Make sure the default coolify Docker network is available.

    Terminal window
    docker network create --attachable coolify
  13. Start Coolify

    Terminal window
    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
  14. Access Installation Now you can access Coolify on port http://<ip>:8000 of your server.

3. Docker Desktop Installation

For local development and testing purposes only.

  • 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 to docker-compose.yml.
  • Rename .env.windows-docker-desktop.example to .env.
  • Create a coolify docker network with docker 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.