Guides › Support
Common VPS setup errors and how to fix them yourself
Most problems when setting up a VPS fall into a handful of familiar errors. Here they are by symptom, with the usual cause and the command to check. Still stuck? Message us with the error text.
This guide contains referral links: Datapi365 may earn a commission if you buy, at no extra cost to you. Plan details were read from Hostinger's site on the date above and may change. Affiliate disclosure
Can’t SSH in
- Wrong IP or username: check the IP in your provider’s panel; new Ubuntu servers often use
rootor the user you created. - Firewall blocks port 22: from the provider’s web console run
sudo ufw status; if missing,sudo ufw allow OpenSSH. - Wrong key file permissions:
~/.sshmust be 700 andauthorized_keys600, owned by the user. - Banned by fail2ban after failed attempts: wait an hour, or run
sudo fail2ban-client set sshd unbanip <your IP>from the console.
Locked out after disabling password login? Use the web console in your provider’s panel (no SSH needed) and add the correct key to authorized_keys. Always test key login in a new window before closing the old session.
https not issued, browser says “not secure”
- Domain not pointing to the server: look up the A record with any online DNS lookup tool; it must show your VPS IP.
- Ports 80 or 443 closed:
sudo ufw allow 80/tcpandsudo ufw allow 443/tcp. - Read the web server log:
sudo journalctl -u caddy -n 50explains why a certificate failed.
App shows 502 or won’t open
- Not running:
docker psshould show the container as “Up”. - App errors:
docker logs --tail 50 <container>. - Wrong port: the web server must point to the port the app listens on (e.g.
127.0.0.1:3000). - Restart:
docker compose up -din the app’s folder.
Slow server, full disk, out of memory
- Disk:
df -h. Usual culprits: logs, old backups, unused Docker images (docker image prune; read before confirming). - Memory:
free -h,top. Self-hosted AI models use the most; pick a smaller model or upgrade.
When you ask for help, include
- Your VPS provider and OS (
lsb_release -a). - What you were doing, what you expected, what you saw.
- The exact error text or a screenshot.
- No passwords. If we need access, follow grant temporary access.