Deployment Overview of Proxmox Backup Server on Server¶
Prerequisites and Basic Requirements¶
The deployment of Proxmox Backup Server requires a Debian 12 (Bookworm) operating system. The installation process necessitates root privileges to modify system repositories, install packages, and manage system services. The following components are required:
- Operating System: Debian 12 (Bookworm)
- Privileges: Root access (sudo or root user)
- Network: Access to the internet for downloading packages and repository keys
- Architecture: AMD64 (x86_64)
File and Directory Structure¶
The application utilizes specific directories for configuration, data, and certificates. The primary locations include:
/etc/apt/sources.list.d/: Contains repository list files, includingpbs-enterprise.listand the Proxmox Backup Server repository file./etc/apt/sources.list: The main APT source list, modified to includecontribandnon-free-firmwarecomponents./root/nginx/: Directory created for Nginx and Certbot Docker Compose configuration./data/nginx/user_conf.d/: Directory containing Nginx user configuration files, specifically{{ prefix }}{{ server_id }}.hostkey.in.conf./etc/letsencrypt/: Volume mount point for SSL certificates managed by Certbot.
Application Installation Process¶
The Proxmox Backup Server is installed as a native package using the APT package manager. The installation involves adding the official Proxmox repository and installing the proxmox-backup-server meta-package.
- Update and upgrade existing APT packages.
- Install required utilities:
curl,wget,ca-certificates, andgnupg. - Disable the Proxmox PBS enterprise repository by commenting out the line in
/etc/apt/sources.list.d/pbs-enterprise.list. - Enable the
contribandnon-free-firmwarecomponents in/etc/apt/sources.list. - Add the Proxmox PBS repository key and configure the repository source file.
- Update the APT cache.
- Install the
proxmox-backup-serverpackage. - Install ZFS support packages:
zfs-dkmsandlinux-headers-amd64.
Docker Containers and Their Deployment¶
A reverse proxy and SSL certificate management system is deployed using Docker Compose. This setup utilizes the jonasal/nginx-certbot image to handle HTTPS termination and certificate renewal.
The deployment involves the following steps:
- Install Docker on the host system.
- Create the directory
/root/nginxwith permissions0755owned byroot. - Generate a
compose.ymlfile in/root/nginxdefining the Nginx service. - Configure the Nginx service with the following parameters:
- Image:
jonasal/nginx-certbot:latest - Restart policy:
unless-stopped - Network mode:
host - Environment variable:
[email protected] - Environment file:
/data/nginx/nginx-certbot.env - Volume mounts:
nginx_secretsmapped to/etc/letsencrypt/data/nginx/user_conf.dmapped to/etc/nginx/user_conf.d
- Execute
docker compose up -dwithin the/root/nginxdirectory to start the containers.
Proxy Servers¶
The Nginx container acts as a reverse proxy for the Proxmox Backup Server. The configuration modifies the Nginx user configuration file located at /data/nginx/user_conf.d/{{ prefix }}{{ server_id }}.hostkey.in.conf.
- The existing
proxy_passdirective within thelocation /block is removed. - A new
proxy_passdirective is added to forward traffic tohttp://127.0.0.1:8007. - SSL certificates are managed automatically by the Certbot component within the Docker container, storing secrets in the
nginx_secretsvolume.
Starting, Stopping, and Updating¶
The Proxmox Backup Server service is managed via systemd. The service name is proxmox-backup.
- Start and Enable: The service is started and enabled to run on boot during the installation process.
- Service Management: Use standard
systemctlcommands to manage the service state. - Start:
systemctl start proxmox-backup - Stop:
systemctl stop proxmox-backup - Restart:
systemctl restart proxmox-backup - Status:
systemctl status proxmox-backup
The Docker-based proxy stack is managed via Docker Compose commands executed in the /root/nginx directory:
- Start:
docker compose up -d - Stop:
docker compose down - Update: Pull the latest image and restart the containers using
docker compose pullfollowed bydocker compose up -d.