Table of Contents

Always Add SSH Keys via Coolify UI, Never Directly to Database

Affects: Coolify

Fact

Coolify stores private keys encrypted using Laravel's encryption (APP_KEY). Inserting a raw private key directly into the private_keys table will result in:

Always use Settings → Private Keys → Add Private Key in the Coolify web UI.

Also: corrupted key files

Coolify caches keys as files in /var/www/html/storage/app/ssh/keys/. If these contain only b:0; (a corrupted serialized PHP value), delete them and let Coolify regenerate from the database:

docker exec coolify ls /var/www/html/storage/app/ssh/keys/
docker exec coolify rm /var/www/html/storage/app/ssh/keys/id_coolify

See Also