Preparing new vps from scratch
clean up
remove snap
sudo apt-get autoremove --purge snapd gnome-software-plugin-snap && sudo apt-mark hold snapd
update
update the thing to current
apt-get update && apt-get upgrade
add swap
fallocate -l 2G /swapfile && chmod 600 /swapfile
mkswap /swapfile && swapon /swapfile
echo '/swapfile none swap sw 0 0' | sudo tee -a /etc/fstab
sysctl vm.swappiness=10
sysctl vm.vfs_cache_pressure=50
nano /etc/sysctl.conf
vm.swappiness=10
vm.vfs_cache_pressure=50
install basics
install the most basic of basics
apt install -y curl htop fail2ban docker.io net-tools make docker-compose
install portainer
cheatsheets/portainer-standalone/
add overlay
install zerotier
curl -s https://install.zerotier.com | sudo bash
add machine to overlay network
export INTERFACE=YOUR_ZEROTIER_NETWORK_ID
zerotier join $INTERFACE
allow traffic from all zerotier network devices
export INTERFACE=YOUR_ZEROTIER_NETWORK_ID
ufw allow in on $INTERFACE
add user
create mr user
make new user sudo
add user to docker group
sudo groupadd docker
sudo usermod -aG docker koad
lock down
cheatsheets/uncomplicated-firewall/
remove regular internet firewall rules, deny all