VPS System Setup

Initial server configuration for a Hostinger KVM 1 VPS running Ubuntu 24.04.

Server Info

Provider:  Hostinger KVM 1
IP:        xxx.xxx.xxx.xxx
OS:        Ubuntu 24.04 Noble
RAM:       3.8 GB
Storage:   47.3 GB NVMe
Domain:    yourdomain.com
Timezone:  Asia/Manila (PHT, UTC+8)

Add Swap

sudo fallocate -l 2G /swapfile
sudo chmod 600 /swapfile
sudo mkswap /swapfile
sudo swapon /swapfile
echo '/swapfile none swap sw 0 0' | sudo tee -a /etc/fstab
echo "vm.swappiness=10" | sudo tee -a /etc/sysctl.conf
sudo sysctl -p

Set Timezone to Philippine Time

sudo timedatectl set-timezone Asia/Manila

SSH Keepalive (prevent disconnects)

sudo nano /etc/ssh/sshd_config
# Add:
# ClientAliveInterval 60
# ClientAliveCountMax 10
sudo systemctl restart sshd

Disable Unnecessary Services

sudo systemctl disable --now snapd
sudo systemctl disable --now ModemManager
sudo systemctl disable --now fwupd
sudo systemctl disable --now packagekit
sudo systemctl disable --now apport
sudo systemctl disable --now bolt

DNS Records (Cloudflare)

TypeNameValueProxy
A*xxx.xxx.xxx.xxxDNS only
A@xxx.xxx.xxx.xxxDNS only

File Structure

/opt/quadlet/
├── logto/
│   └── .env
├── flipt/
│   └── .env
└── infisical/
    └── .env

/etc/containers/systemd/
├── logto.container
├── flipt.container
└── infisical.container

/etc/caddy/
└── Caddyfile

/swapfile (2GB)