Skip to main content
A collection of user-friendly automation scripts for Proxmox VE environments. Scripts are designed to speed up repetitive administrative tasks, improve consistency, and enforce best practices in cluster management.

Overview

Proxmox Userscripts provides a curated library of automation tools for common Proxmox VE operations, reducing manual work and human error in virtual infrastructure management.

Automation

Automate repetitive administrative tasks

Consistency

Enforce standardized configurations across clusters

Best Practices

Built-in security and operational best practices

Time Savings

Reduce manual configuration and troubleshooting time

Use Cases

Common Operations

Automate virtual machine creation with consistent:
  • Resource allocation (CPU, RAM, disk)
  • Network configuration (VLAN tagging, bridges)
  • Storage backend selection
  • Post-deployment configuration hooks
Streamline backup operations:
  • Scheduled backup creation
  • Retention policy enforcement
  • Backup verification and testing
  • Off-site replication automation
Simplify cluster administration:
  • Node updates and patching
  • Storage pool management
  • Resource rebalancing
  • Health checks and monitoring
Standardize VM templates:
  • Template creation from existing VMs
  • Cloud-init integration
  • Template versioning and updates
  • Multi-cluster template distribution

Key Features

1

User-Friendly Interface

Clear prompts and informative output for easy use by operators of all skill levels
2

Safety Checks

Built-in validation and confirmation prompts prevent destructive operations
3

Idempotent Operations

Scripts can be run multiple times without causing unintended side effects
4

Comprehensive Logging

All operations are logged for audit trails and troubleshooting

Script Categories

VM Management

Automation scripts for virtual machine lifecycle:
  • VM creation - Deploy VMs from templates with custom configurations
  • VM cloning - Rapid provisioning from existing VMs
  • VM migration - Live migration and cold storage migration
  • Resource adjustment - CPU, memory, and disk hot-plug operations
Use VM management scripts in conjunction with Ansible or Terraform for full infrastructure-as-code workflows.

Storage Operations

Storage management and optimization:
  • Storage pool creation - LVM, ZFS, Ceph integration
  • Disk management - Add, resize, migrate virtual disks
  • Snapshot operations - Create, restore, delete snapshots
  • Thin provisioning - Optimize storage utilization
Always test storage operations in a lab environment before running on production clusters.

Network Configuration

Network automation tools:
  • Bridge configuration - Create and manage Linux bridges
  • VLAN setup - VLAN tagging for network segmentation
  • Firewall rules - Proxmox firewall automation
  • SDN integration - Software-defined networking setup

Backup & Recovery

Backup workflow automation:
  • Backup scheduling - Automated backup job creation
  • Retention management - Policy-based backup pruning
  • Restore operations - Simplified VM and CT restore
  • Verification - Automated backup integrity checks

Best Practices

Test First

Always test scripts in a lab or staging environment before production use

Read the Code

Review script source before execution to understand what it does

Backup Before Changes

Take snapshots or backups before running scripts that modify infrastructure

Version Control

Track script versions and changes in your infrastructure repository

Installation

1

Clone Repository

git clone https://github.com/safesploitOrg/proxmox-userscripts.git
cd proxmox-userscripts
2

Review Scripts

Examine script contents to understand what they do:
ls -la scripts/
cat scripts/example-script.sh
3

Make Executable

chmod +x scripts/*.sh
4

Run Scripts

Execute with appropriate permissions:
./scripts/example-script.sh
Most scripts require root privileges on Proxmox nodes. Always verify you’re running on the correct node before execution.

Example Workflows

Rapid VM Deployment

1

Prepare Template

Create a base VM template with cloud-init support
2

Run Provisioning Script

Execute VM creation script with desired parameters
./scripts/create-vm.sh --template ubuntu-22.04 --name webserver-01 --cpu 2 --ram 4096
3

Post-Configuration

Scripts automatically handle cloud-init, network configuration, and resource allocation

Automated Backup Workflow

1

Schedule Backups

Configure retention policy and schedule
./scripts/setup-backup.sh --retention 7 --schedule "0 2 * * *"
2

Verification

Automated integrity checks run after each backup
3

Cleanup

Old backups are automatically pruned based on retention policy

Security Considerations

Important Security Notes:
  • Scripts may require root access to Proxmox nodes
  • Review all code before execution on production systems
  • Use dedicated service accounts with least-privilege access
  • Audit all script modifications and maintain version control
  • Never commit credentials or API tokens to version control

Secure Usage

  • Credentials: Use Proxmox API tokens instead of root passwords
  • Permissions: Run scripts with minimum required privileges
  • Logging: Enable comprehensive logging for audit trails
  • Access Control: Restrict script execution to authorized administrators

Repository Information

Contributions are welcome! If you’ve developed useful Proxmox automation scripts, please submit a pull request with:
  • Clear documentation
  • Usage examples
  • Safety checks and validation
  • Error handling

Support & Contributions

Report Issues

Submit bug reports and feature requests on GitHub

Contribute

Submit pull requests with improvements and new scripts
Before contributing, review the CONTRIBUTING.md file in the repository for guidelines on code style, testing requirements, and submission process.

Resources

Build docs developers (and LLMs) love