New Server Setup with Ubuntu
I need to setup new server from time to time, and I always forget all the things that need to be set up. So, here it goes. Once the Ubuntu server is provisioned, it’s usually on ext4 and it’s configured correctly, so no need to modify the fs options.
Post-installation
Create the 2G swapfile according to btrfs swapfile docs.
Enable user-accessible dmesg: edit /etc/sysctl.d/10-kernel-hardening.conf
and kernel.dmesg_restrict = 0
.
Install basic software
sudo apt update
sudo apt -V dist-upgrade
sudo apt install git neovim htop fish net-tools whois fzf eza
sudo update-alternatives --config editor # select neovim
fish
Server Setup
More tips on when you’re setting up a server:
- Create a Byobu Startup script which runs all necessary stuff in Byobu windows
- Setup a network using netplan
Docker
sudo apt install docker docker-buildx docker-compose-v2
Add your user to the docker group:
sudo usermod -aG docker mavi
Reboot, and test it out:
docker run --rm -ti ubuntu /bin/bash
Scripts
Written on October 4, 2025