Skip to content

Latest commit

Β 

History

34 Commits

Folders and files

NameName
Last commit message
Last commit date
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸš€ Proxmox LXC Automation Suite

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.


✨ Key Features

  • πŸ”— Integrated with users.txt: All scripts use users.txt as 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 pipefail and 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 Structure

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

πŸš€ Usage

1. Preparation

Make sure you're on a Proxmox node with root access.

git clone https://github.com/FatihSatrio/create-lxc-automation.git
cd create-lxc-automation

2. Configure the Database

Fill in the users.txt file using the format VMID, Username:

601, user01
602, user02
605, user05

3. Running the Scripts

All scripts support both interactive (menu-driven) mode and direct CLI mode.

A. Create Containers & Users

sudo bash pct-create.sh

B. Start/Stop/Restart Control

sudo bash pct-control.sh

C. Edit Resources (Network/RAM/CPU/Disk)

sudo bash pct-edit.sh

D. Auto-Boot Management

sudo bash pct-set-auto_boot.sh

E. Remove Containers & Users

sudo bash pct-destroy.sh

πŸ› οΈ Configuration (config.cfg)

You 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

πŸ“ Important Notes

  • 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.txt that are invalid or non-numeric are automatically skipped.

🀝 Contributing

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

About

πŸš€ Professional bash automation suite for bulk-managing LXC containers and users on Proxmox VE centralized config, interactive menus, and real-time progress reporting.

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages