Getting proxmox right from the start saves hours of debugging later. In this comprehensive guide, we'll cover everything from initial setup to production-ready configuration, including vm-backup and restore considerations.
Prerequisites
- A VPS running Ubuntu 22.04 or later (2GB+ RAM recommended)
- A remote storage destination (S3, B2, or another server)
- Sufficient storage for backups (2-3x data size)
- A registered domain name (for public-facing services)
- Root or sudo access to the server
Backup Configuration
Security should be a primary consideration when configuring proxmox. Always use strong passwords, keep software updated, and restrict network access to only the necessary ports and IP addresses.
# Install and initialize backup tool
sudo apt install -y proxmox
proxmox init --repo /backup/repo
# Create first backup
proxmox backup --repo /backup/repo /etc /home /var/www
# List backups
proxmox snapshots --repo /backup/repo
Make sure to restart the service after applying these changes. Some settings require a full restart rather than a reload to take effect.
Scheduling Automated Backups
Before making changes to the configuration, always create a backup of the existing files. This ensures you can quickly roll back if something goes wrong during the setup process.
# Automated backup script: /usr/local/bin/backup.sh
#!/bin/bash
set -euo pipefail
BACKUP_REPO="/backup/repo"
LOG_FILE="/var/log/backup.log"
DATE=$(date +%Y-%m-%d_%H-%M)
echo "[$DATE] Starting backup..." >> $LOG_FILE
# Database dump
mysqldump --all-databases | gzip > /tmp/db-$DATE.sql.gz
# Run backup
proxmox backup --repo $BACKUP_REPO /etc /home /var/www /tmp/db-$DATE.sql.gz
# Cleanup old backups (keep 30 days)
proxmox forget --repo $BACKUP_REPO --keep-daily 7 --keep-weekly 4 --keep-monthly 3 --prune
rm /tmp/db-$DATE.sql.gz
echo "[$DATE] Backup completed successfully" >> $LOG_FILE
This configuration provides a good balance between performance and resource usage. For high-traffic scenarios, you may need to increase the limits further.
Important Notes
When scaling this setup, consider vertical scaling (adding more RAM/CPU) first, as it's simpler to implement. Horizontal scaling adds complexity but may be necessary for high-traffic applications.
Conclusion
This guide covered the essential steps for working with proxmox on a VPS environment. For more advanced configurations, refer to the official documentation. Don't hesitate to reach out to our support team if you need help with your specific setup.