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.
Caution
The SSH key must not have a passphrase or 2FA enabled for the user used to run the Coolify installation script or the connection will fail.
SSH Settings Configuration ​
These settings need to be configured manually before running the Coolify installation script:
Edit SSH Configuration
bashnano /etc/ssh/sshd_configEnsure these settings are present:
sshPermitRootLogin prohibit-password PubkeyAuthentication yesNote
The
PermitRootLoginoption can be set toyes,without-password, orprohibit-password. For enhanced security, we recommend usingprohibit-password.Caution!
Make sure to add your SSH keys to the
~/.ssh/authorized_keysfile before settingPermitRootLogintoprohibit-password, otherwise you may lock yourself out of the server.Restart SSH Service
SystemD:
# Debian/Ubuntu-based (systemd)
systemctl restart ssh # Or `systemctl restart sshd` if needed
# CentOS/RHEL 7+ (systemd)
systemctl restart sshdOpenRC:
# Alpine/Gentoo (OpenRC)
rc-service sshd restart
# Older Ubuntu (Upstart)
service sshd restart
# Legacy Linux (SysVinit)
# /etc/init.d/sshd restartManual Configuration ​
Note
The following steps are handled automatically by the Coolify installation script. Manual configuration is only needed if the automatic setup fails.
Install OpenSSH Server
Ubuntu/Debian/PopOS
bashapt update && apt install -y openssh-server systemctl enable --now sshdCentOS/RHEL/Fedora/Rocky
bashdnf install -y openssh-server systemctl enable --now sshdSLES/openSUSE
bashzypper install -y openssh systemctl enable --now sshdArch Linux
bashpacman -Sy --noconfirm openssh systemctl enable --now sshdAlpine Linux
bashapk add openssh rc-update add sshd rc-service sshd startConfigure SSH Settings Follow the SSH Settings Configuration section above.
Generate and Configure SSH Keys
bash# 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 ~/.sshConfigure in Coolify UI
- Navigate to
Keys & Tokensmenu - Go to
Private Keyssection - Add the private key
- Configure the key in your localhost server settings
- Navigate to
