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.

Configuration Steps

These are the steps to configure OpenSSH for Coolify.

  1. Install and Enable SSH

    Choose the commands for your Linux distribution:

    Ubuntu/Debian

    Terminal window
    sudo apt install openssh-server
    sudo systemctl status sshd

    CentOS/RHEL

    Terminal window
    sudo yum install openssh-server
    sudo systemctl status sshd

    Arch Linux

    Terminal window
    sudo pacman -S openssh
    sudo systemctl status sshd

    Alpine Linux

    Terminal window
    sudo apk add openssh
    sudo rc-service sshd status

    SLES/openSUSE

    Terminal window
    sudo zypper install openssh
    sudo systemctl status sshd
  2. Configure SSH Settings

    Edit /etc/ssh/sshd_config to ensure these settings:

    PermitRootLogin prohibit-password
    PubkeyAuthentication yes

    You can also set PermitRootLogin to yes, without-password, or prohibit-password (all of these are supported).

    Make sure to restart the SSH service after changing the configuration.

  3. Set Up SSH Keys

    If you used the automated Coolify installation script, this step is already done.

    For manual installation:

    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
    cat /data/coolify/ssh/keys/[email protected] >> ~/.ssh/authorized_keys
    # Set proper permissions
    chmod 600 ~/.ssh/authorized_keys
    chmod 700 ~/.ssh
  4. Configure Coolify

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

Troubleshooting

If you’re having connection issues:

  • Verify SSH service is running.
  • Check that the right SSH key is set in Coolify.
  • Check permissions on ~/.ssh directory and files.
  • Ensure the SSH key has no passphrase and no 2FA enabled.
  • Confirm you are using the right user.