Skip to content

OpenSSH

Coolify uses SSH to connect to your server and deploy your applications. This is true even when using the localhost server where Coolify is running.

SSH Settings Configuration

These settings need to be configured manually before running the Coolify installation script:

  1. Edit SSH Configuration

    Terminal window
    nano /etc/ssh/sshd_config

    Ensure these settings are present:

    PermitRootLogin prohibit-password
    PubkeyAuthentication yes
  2. Restart SSH Service

    Terminal window
    systemctl restart sshd

Manual Configuration

  1. Install OpenSSH Server

    Ubuntu/Debian/PopOS

    Terminal window
    apt update && apt install -y openssh-server
    systemctl enable --now sshd

    CentOS/RHEL/Fedora/Rocky

    Terminal window
    dnf install -y openssh-server
    systemctl enable --now sshd

    SLES/openSUSE

    Terminal window
    zypper install -y openssh
    systemctl enable --now sshd

    Arch Linux

    Terminal window
    pacman -Sy --noconfirm openssh
    systemctl enable --now sshd

    Alpine Linux

    Terminal window
    apk add openssh
    rc-update add sshd
    rc-service sshd start
  2. Configure SSH Settings Follow the SSH Settings Configuration section above.

  3. Generate and Configure SSH Keys

    Terminal window
    # Generate SSH key pair
    ssh-keygen -t ed25519 -a 100 \
    -f /data/coolify/ssh/keys/[email protected] \
    -q -N "" -C root@coolify
    # Set correct ownership
    chown 9999 /data/coolify/ssh/keys/[email protected]
    # Add public key to authorized_keys
    mkdir -p ~/.ssh
    cat /data/coolify/ssh/keys/[email protected] >> ~/.ssh/authorized_keys
    # Set proper permissions
    chmod 600 ~/.ssh/authorized_keys
    chmod 700 ~/.ssh
  4. Configure in Coolify UI

    1. Navigate to Keys & Tokens menu
    2. Go to Private Keys section
    3. Add the private key
    4. Configure the key in your localhost server settings