Managing VPS Instances
Complete guide to managing, monitoring, and maintaining your VPS instances.
Overview
Once your VPS is created, you can manage it through the dashboard or SSH. This guide covers all management operations.
Instance Dashboard
Access your VPS dashboard:
- Go to Pods in the main menu
- Click on your instance name
- View the instance dashboard
Dashboard Sections
Overview Tab:
- Instance status
- Resource usage charts
- Connection information
- Quick actions (Start, Stop, Reboot)
Metrics Tab:
- Real-time performance graphs
- CPU usage
- Memory utilization
- Disk I/O
- Network traffic
Snapshots Tab:
- Create and manage snapshots
- Restore from snapshots
- Delete old snapshots
Console Tab:
- Web-based terminal access
- Emergency access when SSH is unavailable
Instance Operations
Start Instance
Start a stopped instance:
- Go to your instance dashboard
- Click Start button
- Instance boots in 30-60 seconds
Cost Note: Billing resumes when started.
Stop Instance
Shut down your instance:
- Go to your instance dashboard
- Click Stop button
- Confirm the action
- Instance shuts down in 30-60 seconds
Important:
- All data is preserved
- Still billed for storage
- Can start anytime
- Network connections are lost
Graceful Shutdown:
# Prefer SSH shutdown for clean stop
ssh root@your-ip
sudo shutdown -h now
Reboot Instance
Restart your instance:
- Go to your instance dashboard
- Click Reboot button
- Confirm the action
- Instance reboots in 1-2 minutes
Use Cases:
- After kernel updates
- To apply system changes
- Troubleshooting issues
- After configuration changes
SSH Reboot:
sudo reboot
Delete Instance
Warning: This permanently deletes your instance and all data!
Before Deleting:
- ✅ Backup important data
- ✅ Create snapshot if needed
- ✅ Update DNS records
- ✅ Notify team members
- ✅ Document configuration
Delete Steps:
- Go to your instance dashboard
- Click Delete button
- Type instance name to confirm
- Click Confirm Delete
- Instance deleted in 1-2 minutes
Cannot be undone!
Editing Instance Configuration
Change Instance Name
- Go to instance dashboard
- Click Edit button
- Update name
- Click Save
Attach/Detach Firewalls
Attach Firewall:
- Go to instance dashboard
- Click Edit button
- Select firewall from dropdown
- Click Save
- Rules apply immediately
Detach Firewall:
- Click Edit button
- Remove firewall selection
- Click Save
- All traffic allowed (not recommended!)
Add/Remove SSH Keys
Add Key:
- Go to instance dashboard
- Click SSH Keys section
- Click Add Key
- Select existing key or add new
- Key added to
~/.ssh/authorized_keys
Remove Key:
- Go to SSH Keys section
- Click Remove next to key
- Key removed from server
Resource Monitoring
CPU Usage
Monitor CPU utilization:
Dashboard:
- Real-time graph
- Average over 1h, 6h, 24h
- Peak usage highlighted
SSH Monitoring:
# Real-time CPU usage
htop
# CPU info
lscpu
# Load average
uptime
# Per-process CPU
top -o %CPU
High CPU Troubleshooting:
- Identify process:
top - Check logs:
journalctl -xe - Restart service if needed
- Consider upgrading profile
Memory Usage
Track RAM utilization:
Dashboard:
- Used vs. Available
- Swap usage
- Historical trends
SSH Monitoring:
# Memory usage
free -h
# Detailed memory info
cat /proc/meminfo
# Per-process memory
top -o %MEM
# Find memory hogs
ps aux --sort=-%mem | head
High Memory Solutions:
- Identify memory leak
- Restart services
- Clear caches
- Upgrade to larger profile
Disk Usage
Monitor storage utilization:
Dashboard:
- Used/Total storage
- I/O operations per second
- Read/write bandwidth
SSH Monitoring:
# Disk space
df -h
# Largest directories
du -h --max-depth=1 /
# Find large files
find / -type f -size +100M -exec ls -lh {} \;
# I/O stats
iostat -x 1
Low Disk Space Solutions:
# Clean package cache
apt clean # Ubuntu/Debian
yum clean all # CentOS
# Remove old logs
journalctl --vacuum-time=7d
# Find and remove old files
find /tmp -type f -atime +7 -delete
# Docker cleanup (if applicable)
docker system prune -a
Network Traffic
Monitor bandwidth usage:
Dashboard:
- Inbound traffic
- Outbound traffic
- Peak bandwidth
- Monthly total
SSH Monitoring:
# Network interfaces
ifconfig
# Live traffic
iftop
# Bandwidth per process
nethogs
# Network statistics
netstat -i
Software Management
Update System
Keep your system updated:
Ubuntu/Debian:
# Update package list
sudo apt update
# Upgrade packages
sudo apt upgrade -y
# Upgrade distribution
sudo apt dist-upgrade -y
# Remove old packages
sudo apt autoremove -y
CentOS/Fedora:
# Update all packages
sudo yum update -y
# Or with dnf (Fedora)
sudo dnf update -y
# Clean old packages
sudo yum autoremove -y
Auto-Updates (Ubuntu/Debian):
# Install unattended-upgrades
sudo apt install unattended-upgrades -y
# Enable auto-updates
sudo dpkg-reconfigure -plow unattended-upgrades
Install Software
Web Server:
# Nginx
sudo apt install nginx -y
sudo systemctl enable nginx
sudo systemctl start nginx
# Apache
sudo apt install apache2 -y
sudo systemctl enable apache2
sudo systemctl start apache2
Database:
# MySQL
sudo apt install mysql-server -y
sudo mysql_secure_installation
# PostgreSQL
sudo apt install postgresql postgresql-contrib -y
# Redis
sudo apt install redis-server -y
Programming Languages:
# Python 3
sudo apt install python3 python3-pip -y
# Node.js (via NodeSource)
curl -fsSL https://deb.nodesource.com/setup_20.x | sudo -E bash -
sudo apt install nodejs -y
# PHP
sudo apt install php php-fpm php-mysql -y
# Go
sudo apt install golang -y
# Ruby
sudo apt install ruby-full -y
Docker:
# Install Docker
curl -fsSL https://get.docker.com -o get-docker.sh
sudo sh get-docker.sh
# Add user to docker group
sudo usermod -aG docker $USER
# Install Docker Compose
sudo curl -L "https://github.com/docker/compose/releases/latest/download/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
sudo chmod +x /usr/local/bin/docker-compose
Service Management
Control system services:
# Start service
sudo systemctl start nginx
# Stop service
sudo systemctl stop nginx
# Restart service
sudo systemctl restart nginx
# Reload configuration
sudo systemctl reload nginx
# Enable on boot
sudo systemctl enable nginx
# Disable on boot
sudo systemctl disable nginx
# Check status
sudo systemctl status nginx
# View logs
sudo journalctl -u nginx -f
User Management
Create Users
Add non-root users:
# Create user
sudo adduser johndoe
# Add to sudo group (Ubuntu/Debian)
sudo usermod -aG sudo johndoe
# Add to wheel group (CentOS)
sudo usermod -aG wheel johndoe
# Set password
sudo passwd johndoe
SSH Key Management
Add SSH key for user:
# Switch to user
sudo su - johndoe
# Create .ssh directory
mkdir -p ~/.ssh
chmod 700 ~/.ssh
# Add public key
echo "ssh-ed25519 AAAA..." >> ~/.ssh/authorized_keys
chmod 600 ~/.ssh/authorized_keys
Disable password authentication:
# Edit SSH config
sudo nano /etc/ssh/sshd_config
# Set these values:
PasswordAuthentication no
PubkeyAuthentication yes
# Restart SSH
sudo systemctl restart sshd
Security Hardening
Configure Firewall
UFW (Ubuntu/Debian):
# Install UFW
sudo apt install ufw -y
# Default policies
sudo ufw default deny incoming
sudo ufw default allow outgoing
# Allow SSH (important!)
sudo ufw allow 22/tcp
# Allow HTTP/HTTPS
sudo ufw allow 80/tcp
sudo ufw allow 443/tcp
# Enable firewall
sudo ufw enable
# Check status
sudo ufw status verbose
Firewalld (CentOS):
# Start firewalld
sudo systemctl start firewalld
sudo systemctl enable firewalld
# Allow services
sudo firewall-cmd --permanent --add-service=ssh
sudo firewall-cmd --permanent --add-service=http
sudo firewall-cmd --permanent --add-service=https
# Reload
sudo firewall-cmd --reload
# Check status
sudo firewall-cmd --list-all
Install Fail2Ban
Protect against brute-force attacks:
# Install
sudo apt install fail2ban -y
# Create local config
sudo cp /etc/fail2ban/jail.conf /etc/fail2ban/jail.local
# Edit config
sudo nano /etc/fail2ban/jail.local
# Find [sshd] section and ensure:
enabled = true
maxretry = 3
bantime = 3600
# Start fail2ban
sudo systemctl enable fail2ban
sudo systemctl start fail2ban
# Check status
sudo fail2ban-client status sshd
Secure SSH
Best practices for SSH:
# Edit SSH config
sudo nano /etc/ssh/sshd_config
# Recommended settings:
Port 22 # Or custom port
PermitRootLogin no # Disable root login
PasswordAuthentication no # Key-based only
PubkeyAuthentication yes
PermitEmptyPasswords no
X11Forwarding no
MaxAuthTries 3
ClientAliveInterval 300
ClientAliveCountMax 2
# Restart SSH
sudo systemctl restart sshd
Adjust SSH Session Timeout
By default, SSH sessions timeout after 10 minutes of inactivity. You can increase this by editing the SSH configuration:
# Edit the production SSH config
sudo nano /etc/ssh/sshd_config.d/99-production.conf
# Find and modify these values:
ClientAliveInterval 300 # Seconds between keep-alive checks
ClientAliveCountMax 2 # Number of missed keep-alives before disconnect
The total timeout = ClientAliveInterval × ClientAliveCountMax seconds.
Common timeout settings:
| Timeout | ClientAliveInterval | ClientAliveCountMax |
|---|---|---|
| 10 min (default) | 300 | 2 |
| 30 min | 900 | 2 |
| 1 hour | 1800 | 2 |
| 4 hours | 3600 | 4 |
| 8 hours | 3600 | 8 |
| Disabled | 0 | 0 |
After editing, restart SSH:
sudo systemctl restart sshd
Note: Longer timeouts may pose a security risk if you leave sessions unattended. Consider your security requirements when adjusting this setting.
Enable Automatic Security Updates
Ubuntu/Debian:
sudo apt install unattended-upgrades -y
sudo dpkg-reconfigure -plow unattended-upgrades
CentOS:
sudo yum install yum-cron -y
sudo systemctl enable yum-cron
sudo systemctl start yum-cron
Backup & Recovery
Create Snapshots
Regular snapshots protect your data:
- Go to instance dashboard
- Click Snapshots tab
- Click Create Snapshot
- Enter descriptive name
- Click Create
Snapshot Tips:
- Take before major changes
- Weekly for production
- Before system updates
- Label with date and purpose
Manual Backups
Backup specific data:
Database Backup:
# MySQL
mysqldump -u root -p database_name > backup.sql
# PostgreSQL
pg_dump database_name > backup.sql
File Backup:
# Tar archive
tar -czf backup.tar.gz /path/to/data/
# Rsync to remote server
rsync -avz /path/to/data/ user@remote:/backup/
Automated Backups:
# Create backup script
cat > /root/backup.sh << 'EOF'
#!/bin/bash
DATE=$(date +%Y%m%d)
tar -czf /backup/data-$DATE.tar.gz /var/www/
find /backup/ -name "data-*.tar.gz" -mtime +7 -delete
EOF
chmod +x /root/backup.sh
# Add to crontab
crontab -e
# Add: 0 2 * * * /root/backup.sh
Performance Optimization
Optimize Web Server
Nginx:
# /etc/nginx/nginx.conf
worker_processes auto;
worker_connections 2048;
gzip on;
gzip_types text/plain text/css application/json application/javascript;
client_max_body_size 100M;
PHP-FPM:
# /etc/php/8.1/fpm/pool.d/www.conf
pm = dynamic
pm.max_children = 50
pm.start_servers = 5
pm.min_spare_servers = 5
pm.max_spare_servers = 35
Enable Caching
Redis for sessions:
# Install Redis
sudo apt install redis-server -y
# Configure PHP to use Redis
echo "session.save_handler = redis" >> /etc/php/8.1/fpm/php.ini
echo "session.save_path = 'tcp://127.0.0.1:6379'" >> /etc/php/8.1/fpm/php.ini
Database Optimization
MySQL tuning:
-- Check slow queries
SHOW VARIABLES LIKE 'slow_query_log';
SET GLOBAL slow_query_log = 'ON';
-- Add indexes
CREATE INDEX idx_user_email ON users(email);
-- Analyze tables
ANALYZE TABLE users;
Troubleshooting
Cannot SSH
Check instance status:
- Verify instance is running
- Check SSH service:
sudo systemctl status sshd - Check firewall allows port 22
Test connectivity:
# Ping server
ping your-ip
# Test SSH port
telnet your-ip 22
# Verbose SSH
ssh -v root@your-ip
High Load
Check processes:
# CPU hogs
top -o %CPU
# Memory hogs
top -o %MEM
# Disk I/O
iotop
Solutions:
- Kill rogue processes
- Restart services
- Upgrade instance profile
- Optimize applications
Out of Disk Space
Find space hogs:
du -h --max-depth=1 / | sort -rh | head -20
Clean up:
# Old logs
sudo journalctl --vacuum-time=7d
# Package cache
sudo apt clean
# Docker cleanup
docker system prune -a
# Old kernels (Ubuntu)
sudo apt autoremove --purge
Service Won't Start
Check logs:
sudo journalctl -u service-name -n 50
# Or
sudo tail -f /var/log/nginx/error.log
Common fixes:
# Check configuration
sudo nginx -t
# Fix permissions
sudo chown -R www-data:www-data /var/www/
# Check ports
sudo netstat -tlnp | grep :80
Best Practices
Regular Maintenance
Weekly:
- Review resource usage
- Check for updates
- Review logs for errors
- Verify backups
Monthly:
- Full system update
- Create snapshot
- Review security logs
- Clean up old files
- Review firewall rules
Monitoring
Set up monitoring:
- CPU/memory alerts
- Disk space alerts
- Service health checks
- Uptime monitoring
Documentation
Keep records of:
- Configuration changes
- Software installed
- User accounts
- Firewall rules
- Backup schedules
Next Steps
Need help? Contact support through the dashboard.