A short checklist for your first hour with a new Linux server. Run the commands as root, or prefix them with sudo.
1. Install updates
Debian and Ubuntu:
apt update && apt full-upgrade -y
AlmaLinux and Rocky Linux:
dnf upgrade -y
If a new kernel was installed, reboot so it takes effect: reboot
2. Create a regular user with sudo
Working as root all the time makes mistakes more costly. Create your own user (replace alice):
# Debian / Ubuntu
adduser alice
usermod -aG sudo alice
# AlmaLinux / Rocky Linux
useradd -m alice
passwd alice
usermod -aG wheel alice
If you added an SSH key for root, copy it to the new user:
mkdir -p /home/alice/.ssh
cp /root/.ssh/authorized_keys /home/alice/.ssh/
chown -R alice:alice /home/alice/.ssh
chmod 700 /home/alice/.ssh
chmod 600 /home/alice/.ssh/authorized_keys
In a new terminal, test ssh -p 10200 [email protected] (with your server's IP address and SSH port), then run sudo whoami. It should print root.
3. Set up a firewall
On a new server only SSH is listening, but our network doesn't filter what comes in on your forwarded ports, so every service you add later on one of them is reachable from the whole internet unless you block it. Enable a firewall that allows SSH first, then open only the ports you need. See Configure a firewall on your server.
4. Set the time zone
Check the current setting, then choose your preferred zone, for example America/Chicago (Dallas, Texas) or UTC:
timedatectl
timedatectl list-timezones | grep America
timedatectl set-timezone America/Chicago
5. Harden SSH
Once key login works for your user, disable password logins over SSH. See Add and use SSH keys.
6. Plan your backups
Backups aren't included in the plan price, so set them up before you store anything important. You can switch on the paid Automatic backups add-on for daily restore points of the whole server, and you should still keep your own off-server copies of important data. See Backups are your responsibility.