Last updated: Sep 8, 2026
VPS Setup Manual
This note contains basic instructions for a fresh Ubuntu server (Ubuntu 24.04 at the time of writing), a set of steps and commands to keep close for the next time I need to set it up manually. Key setup and SSH hardening details live in SSH 101.
Connect to the VPS
Connect to the server as root using SSH (SSH 101 for key concepts):
ssh root@ip # replace ip with the server IP address
Package maintenance
apt update # update the package list
apt upgrade -y # update installed packages
reboot
shutdown -r now # reboot now
shutdown -h now # shutdown now
shutdown -h +10 # shutdown in 10 minutes
shutdown -c # cancel a scheduled shutdown
Create a new user
In order not to use the root user for everyday server work, we need to create a new user and give them super user rights.
adduser normal_user # add new user
usermod -aG sudo normal_user # add the user to the sudo group
su - normal_user # switch to a new user
sudo whoami # check sudo access
exit
Enable SSH login for the new user
Set up authorized_keys for the new user SSH 101: Adding your SSH key to the server. From another session, confirm login works:
ssh normal_user@ip
Once key login works, harden SSH, see SSH 101: Hardening SSH on the server.
Auth log
Ubuntu writes SSH logins, PAM sessions, and many sudo events to /var/log/auth.log.
sudo cat /var/log/auth.log
sudo tail -f /var/log/auth.log
Install zsh
sudo apt install zsh # install zsh
chsh -s $(which zsh) # set it as the default shell
vi ~/.zshrc # customize the config
source ~/.zshrc # apply the changes