01 / SERVER ESSENTIALS
Start with a useful foundation.
For a fresh Debian, Ubuntu, RHEL-family, or Alpine VPS. Eight essentials by default. Opt in to a sudo user, key-only SSH, a firewall, security updates, swap, and a time zone, each with lockout checks.
New machine, not reinstalled yet? Consider reinstalling a clean official system first. Coming from the reinstall page selects the system for you.
YOUR SETUP / GENERATED COMMANDS
That hostname is rejected, so hostnamectl is left out.
nala fetch only runs when the installer is nala.
Use lowercase letters, digits, underscores, and hyphens, starting with a letter or underscore, and not a system account like root. User creation is left out.
That does not look like one OpenSSH public key line (ssh-ed25519, ssh-rsa, or ecdsa-). The key is left out.
No key entered: the script checks for an existing authorized_keys and stops without changing SSH if there is none.
Avoid lockout: keep this SSH window open while it runs. Test a login in a new window afterwards and close the old one only when it works. Cloud security groups are configured separately.
Choose a supported system: Debian / Ubuntu, RHEL family, or Alpine.
Alpine has no official automatic security update tool, so this step is left out. Run apk update && apk upgrade regularly.
(set -eu. /etc/os-releasecase "$ID" in debian|ubuntu) ;; *) echo "This script is for Debian or Ubuntu." >&2; exit 1 ;; esacapt-get updateapt-get install -y curl ca-certificates gnupg git tmux rsync jq htop)Generated here, executed by you. Check the target host, take a snapshot, and run one block at a time.
Ready? Find your next tool →