VPS
Monitor your VPS and fix common errors
Most VPS problems show up in three numbers: CPU, memory and disk. Learn to read them and the usual errors become quick fixes. Commands target Ubuntu and Debian and may vary elsewhere.
Monitoring commands
- htop shows live CPU, memory and processes (install with sudo apt install htop)
- free -h shows memory and swap
- df -h shows disk usage per mount
- du -sh /var/* | sort -h finds large folders
- uptime shows load averages
- ss -tulpn lists listening ports
Error: SSH connection refused
Something is blocking port 22 or the SSH service is not running.
- Check the IP and port you are using
- Use the console or ask support if you cannot log in
- sudo systemctl status ssh and sudo systemctl start ssh
- sudo ufw status and confirm SSH is allowed
Error: Permission denied (publickey)
The server wants a key and did not accept yours.
- Run ssh -v user@IP to see which keys are tried
- Confirm the right username
- Check chmod 700 ~/.ssh and chmod 600 ~/.ssh/authorized_keys
- Make sure the public key is in authorized_keys with no line breaks
- Use ssh -i path/to/key user@IP for a specific key
Error: No space left on device
- df -h to find the full mount
- df -i in case inodes ran out
- sudo du -xh / --max-depth=1 | sort -h to find the culprit
- sudo journalctl --vacuum-size=200M to trim logs
- sudo apt clean and docker system prune if you use Docker
Delete only what you understand.
Problem: High CPU
- Open htop and sort by CPU with F6
- Identify the process
- Restart it with systemctl restart NAME, or stop a runaway one
- If it returns, check logs with journalctl -u NAME
Unknown processes using all CPU can mean a compromised server, so review logins with last and change credentials.
Prevent trouble
- Set a reminder to check df -h weekly
- Rotate logs
- Add swap for memory spikes
- Upgrade your plan if usage stays high, which you can do any time
If you are stuck, open a ticket on our Discord or email support.