Skip to content

Instantly share code, notes, and snippets.

@feliche93
Created January 21, 2025 14:49
Show Gist options
  • Save feliche93/0896d4526ee4625955920cee10d74a6b to your computer and use it in GitHub Desktop.
Save feliche93/0896d4526ee4625955920cee10d74a6b to your computer and use it in GitHub Desktop.
Coolify Cloud Config
#cloud-config
# This config is written for Ubuntu 24.04
users:
- name: heuristiq
ssh_authorized_keys:
- "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIBdhhcyVg+gFKXh3ODUtctEkIyImqFKAqUe0Q7MViiTG Hetzner Heuristiq"
sudo: ALL=(ALL:ALL) ALL
groups: sudo
shell: /bin/bash
chpasswd:
expire: true
users:
- name: heuristiq
password: changeme
type: text
runcmd:
- sed -i '/PermitRootLogin/d' /etc/ssh/sshd_config
- echo "PermitRootLogin without-password" >> /etc/ssh/sshd_config
- sed -i '/PubkeyAuthentication/d' /etc/ssh/sshd_config
- echo "PubkeyAuthentication yes" >> /etc/ssh/sshd_config
- sed -i '/PasswordAuthentication/d' /etc/ssh/sshd_config
- echo "PasswordAuthentication no" >> /etc/ssh/sshd_config
- systemctl restart sshd
- echo "\$nrconf{kernelhints} = -1;" > /etc/needrestart/conf.d/99disable-prompt.conf
- apt update
- apt upgrade -y --allow-downgrades --allow-remove-essential --allow-change-held-packages
- reboot
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment