This repository contains a collection of professional bash scripts for automated LXC container and user management on Proxmox VE. Designed for high efficiency, visual consistency, and easy configuration through a single control center.
- π Integrated with
users.txt: All scripts useusers.txtas the single source of truth for data. - βοΈ Centralized Configuration: Global settings (Template ID, Memory, Storage, etc.) are managed through
config.cfg. - π₯οΈ Interactive UI & Menus: Equipped with interactive menus, premium ANSI colors, and real-time progress bars.
- π‘οΈ Safety Checks: Automatic container status verification (stop-before-edit logic) to prevent configuration corruption.
- π οΈ Robust & Safe: Uses
set -euo pipefailand strict regex validation to prevent input errors. - π Summary Reporting: Concise reports (Success/Failed/Already) after every operation completes.
- π Full English Localization: All UI strings, logs, and menus are in professional English.
| File | Function | Highlighted Features |
|---|---|---|
pct-create.sh |
Bulk Create LXC & Users | Setup Wizard, Manual Input mode, Config Editor |
pct-destroy.sh |
Bulk Remove LXC & Users | Purge logic, Stop-before-delete, Interactive Menu |
pct-control.sh |
Bulk Control (Start/Stop/Restart) | Real-time command output, Status monitor, Progress bar |
pct-edit.sh |
Resource Editor (Memory, Network, etc.) | Stop-before-edit, Bulk Resize (Expand), IP update |
pct-set-auto_boot.sh |
Auto-Boot Management | Enable/Disable bulk mode, Visual status indicators |
config.cfg |
Global Settings | Central configuration for resources and templates |
users.txt |
User Database | List of VMIDs and usernames to be processed |
Make sure you're on a Proxmox node with root access.
git clone https://github.com/FatihSatrio/create-lxc-automation.git
cd create-lxc-automationFill in the users.txt file using the format VMID, Username:
601, user01
602, user02
605, user05
All scripts support both interactive (menu-driven) mode and direct CLI mode.
A. Create Containers & Users
sudo bash pct-create.shB. Start/Stop/Restart Control
sudo bash pct-control.shC. Edit Resources (Network/RAM/CPU/Disk)
sudo bash pct-edit.shD. Auto-Boot Management
sudo bash pct-set-auto_boot.shE. Remove Containers & Users
sudo bash pct-destroy.shYou can edit config.cfg directly or through the Configuration menu inside the scripts.
TEMPLATE_ID="999" # Source LXC Template ID
MEMORY="512" # RAM (MB)
DISK_SIZE="3" # Disk (GB)
STORAGE="hdd" # Proxmox storage name
DEFAULT_PASSWORD="..." # Default password for pve users- Disk Resize: Proxmox only supports expanding disk size. Shrinking is not supported and will fail.
- Safety: Scripts will automatically stop a running container before editing its resources to ensure stability.
- Validation: Lines in
users.txtthat are invalid or non-numeric are automatically skipped.
Have an idea for a new feature? Feel free to open an Issue or submit a Pull Request to this repository.
Author: Fatih Satrio (Moon)
Base Logic: MASR170902