π One-command installer for LXC AutoScale with automatic container detection, locale selection, and professional UI setup.
Built using the Community-Scripts framework for seamless Proxmox VE integration.
- β One-Command Installation - Single bash command to deploy everything
- β Automatic LXC Detection - Automatically finds and configures existing containers
- β Multi-Language Support - English and Turkish locale options
- β Professional UI - Modern dark-themed web interface on port 8080
- β SSH Key Management - Automatic SSH key generation and setup
- β Community-Scripts Framework - Whiptail menus, advanced/default modes
- β No Telemetry - Privacy-focused, no data collection
- Proxmox VE 8.4.x or 9.0.x
- Root Access to Proxmox host
- Internet Connection for downloading packages
Run this single command on your Proxmox host:
bash <(curl -s https://raw.githubusercontent.com/droltr/lxc-auto-scaler/main/lxc-autoscale.sh)The installer will:
- Show interactive menu (Default/Advanced mode)
- Detect existing LXC containers
- Ask for locale preference (EN/TR)
- Create and configure the container
- Install LXC AutoScale
- Setup web interface
- Display access information
- OS: Debian 13 (Trixie)
- Type: Unprivileged
- CPU: 2 cores (configurable)
- RAM: 2048 MB (configurable)
- Disk: 8 GB (configurable)
- Network: DHCP (configurable)
- LXC AutoScale - Resource auto-scaling daemon
- Python 3 - Runtime environment
- Nginx - Web server (port 8080)
- SSH Server - Remote access
- Original UI - Web dashboard from upstream project
After installation, access the dashboard at:
http://<CONTAINER_IP>:8080
Features:
- π Live log viewer (last 100 lines)
- π Container metrics
The installer displays an SSH key at the end. Run the provided command on your Proxmox host:
echo 'ssh-rsa AAAA...' >> /root/.ssh/authorized_keysEdit the configuration file:
nano /etc/lxc_autoscale/lxc_autoscale.yamlAdd container IDs to monitor:
TIER_DEFAULT:
lxc_containers: [101, 102, 103] # Your container IDssystemctl restart lxc_autoscaleThe installation completes successfully, but AutoScale cannot function until you complete these steps:
The installer displays an SSH public key. This key MUST be added to your Proxmox host:
# On Proxmox host (NOT in the container):
echo 'ssh-rsa AAAA...' >> /root/.ssh/authorized_keysWhy: The AutoScale service runs inside the LXC container but needs to execute pct commands on the Proxmox host via SSH.
Test the connection:
# Inside the container:
ssh root@PROXMOX_IP "pct list"If this works, SSH is configured correctly.
Edit the configuration file inside the container:
# Inside the container (pct enter CONTAINER_ID):
nano /etc/lxc_autoscale/lxc_autoscale.yamlFind the TIER_DEFAULT section and add your container IDs:
TIER_DEFAULT:
cpu_upper_threshold: 80
cpu_lower_threshold: 20
memory_upper_threshold: 70
memory_lower_threshold: 20
min_cores: 1
max_cores: 4
min_memory: 512
max_memory: 4096
lxc_containers: [101, 102, 103] # β ADD YOUR CONTAINER IDs HEREGet container IDs from Proxmox:
# On Proxmox host:
pct listImportant: Do NOT add the AutoScale container itself to the list!
After adding container IDs:
# Inside the container:
systemctl restart lxc_autoscale
systemctl restart lxc_autoscale_ui# Check service status
systemctl status lxc_autoscale
systemctl status lxc_autoscale_ui
# Watch the logs (you should see container metrics)
tail -f /var/log/lxc_autoscale.logExpected log output:
Container 101 - CPU usage: 25.3%, Memory usage: 45.2%
Container 102 - CPU usage: 10.1%, Memory usage: 30.5%
If you see pct: not found errors, SSH key was not added correctly.
Symptom: Cannot access http://CONTAINER_IP:8080
Check:
# Is Flask UI running?
systemctl status lxc_autoscale_ui
# Is port 5000 listening?
ss -tlnp | grep 5000
# Is Nginx running?
systemctl status nginx
# Check Nginx error log
tail -20 /var/log/nginx/error.logCommon Issues:
- Flask UI service failed to start: Check
/var/log/flask_ui.logif it exists - Port 5000 not listening: Service may be restarting, wait 10 seconds
- 502 Bad Gateway: Flask UI starting up, refresh after a few seconds
Symptom: Containers not being scaled
Check:
# View service logs
journalctl -u lxc_autoscale -n 50
# Check configuration
cat /etc/lxc_autoscale/lxc_autoscale.yaml
# Test SSH connection to Proxmox host
ssh root@PROXMOX_IP "pct list"Common Issues:
- SSH key not added to Proxmox host
- No containers configured in YAML
- Proxmox host IP incorrect in config
Symptom: Can execute commands but no prompt visible
Temporary Fix:
export PS1='\u@\h:\w\$ 'Permanent Fix:
Add to /root/.bashrc:
echo 'export PS1="\u@\h:\w\$ "' >> /root/.bashrcMain configuration file: /etc/lxc_autoscale/lxc_autoscale.yaml
Key settings:
- CPU/Memory Thresholds - When to scale up/down
- Min/Max Resources - Resource limits
- Check Interval - Polling frequency (default: 5 minutes)
- Container List - Which containers to manage
- Off-Peak Hours - Resource optimization schedule
For detailed configuration options, see the LXC AutoScale Documentation.
# Check service status
systemctl status lxc_autoscale
# View live logs
journalctl -u lxc_autoscale -f
# Restart service
systemctl restart lxc_autoscale
# Stop service
systemctl stop lxc_autoscale
# View log file
tail -f /var/log/lxc_autoscale.logTo update LXC AutoScale to the latest version:
# SSH into the container
pct enter <CONTAINER_ID>
# Update repository
cd /opt/lxc-autoscale
git pull
# Restart service
systemctl restart lxc_autoscaleTo remove the container:
# Stop the container
pct stop <CONTAINER_ID>
# Delete the container
pct destroy <CONTAINER_ID>This installer is built upon the excellent work of:
- Author: Fabrizio Salmi
- Project: proxmox-lxc-autoscale
- Description: Automatically scale LXC containers resources on Proxmox hosts
- Project: ProxmoxVE Helper-Scripts
- Website: helper-scripts.com
- Description: Community-driven Proxmox VE automation scripts
- Original Creator: tteck (in memoriam)
MIT License - See LICENSE file for details
Contributions are welcome! Please feel free to submit a Pull Request.
- Additional locale support
- Enhanced UI features
- Configuration templates
- Documentation improvements
- LXC AutoScale Issues: Report here
- Installer Issues: Report here
- Community Scripts: Discord
Iβm new to this kind of work, so if Iβve violated any rules, I apologize in advance to those concerned. I think I may have made a mistake with the name; it should probably end with βinstaller.β If this will cause a serious issue, we can change it. I hope I have properly credited the original code owners in the correct place. I did not intend to make any changes to their code, but if I accidentally did (with AI β Claude), I would like to apologize for that as well. Please excuse my inexperience. This tool is provided as-is without any warranty. Always test in a non-production environment first. The author assumes no responsibility for any damage or issues that may arise from using this installer.
If this project helped you, please consider giving it a β!
Made with β€οΈ for the Proxmox community