Browse by type
LXC AutoScale is an async resource management daemon for Proxmox environments. It automatically adjusts CPU and memory allocations for LXC containers based on real-time usage metrics and predefined thresholds. It supports local execution, remote execution via SSH, or the Proxmox REST API as backend. Container cloning (horizontal scaling) is also supported as an experimental feature.
Quick Start
| Method | Instructions |
|---|---|
| Docker | Docker |
| No Docker | Install script |
asynciopct commands) or Proxmox REST API (proxmoxer)${ENV_VAR} expansion for secretspct exec needed)ignore_lxc)[!NOTE] If you need to autoscale Virtual Machine resources on Proxmox hosts, you will like this project.
curl -sSL https://raw.githubusercontent.com/fabriziosalmi/proxmox-lxc-autoscale/main/install.sh | bash
[!TIP] Once installed, verify the service is running:
bash systemctl status lxc_autoscale.service
Starting with v1.2.0, CPU usage is measured via host-side cgroup accounting (cgroup v2/v1). This reads the kernel's own CPU time tracking for each container directly from the Proxmox host, without needing to execute commands inside containers. Benefits:
pct exec per container)If cgroup accounting is unavailable, the daemon falls back to /proc/stat (requires LXCFS) and then to load average estimation.
LXCFS Configuration (optional, for fallback method)
If you want the /proc/stat fallback to work correctly, configure LXCFS with the -l flag in /lib/systemd/system/lxcfs.service:
ExecStart=/usr/bin/lxcfs /var/lib/lxcfs -l
Then run systemctl daemon-reload && systemctl restart lxcfs and restart your containers.
See the Proxmox forum thread for details.
On hybrid Intel CPUs (Alder Lake / Raptor Lake / Arrow Lake, 12th gen+), you can pin containers to Performance or Efficiency cores via the cpu_pinning tier setting:
TIER_databases:
lxc_containers:
- "102"
cpu_pinning: p-cores # Run on Performance cores only
TIER_background_tasks:
lxc_containers:
- "105"
- "106"
cpu_pinning: e-cores # Run on Efficiency cores only
Accepted values: p-cores, e-cores, all, or an explicit range like 0-11 or 0,2,4,6-8. Core topology is auto-detected from the kernel at startup.
LXC AutoScale is configured via a YAML file at /etc/lxc_autoscale/lxc_autoscale.yaml. For detailed configuration options, see the documentation.
[!TIP] If you need LXC AutoScale configuration for all your LXC containers, you can automatically generate it by running this command:
bash curl -sSL https://raw.githubusercontent.com/fabriziosalmi/proxmox-lxc-autoscale/main/lxc_autoscale/lxc_autoscale_autoconf.sh | bash
[!TIP] LXC AutoScale ML has been moved to a separate repository.
LXC AutoScale is tested on Proxmox VE 8.3.3. It may work on older versions, but compatibility is not guaranteed.
Yes. Configure the container IDs in the YAML file and the service will start managing them.
No, LXC AutoScale is designed for LXC containers only. For VM autoscaling, see proxmox-vm-autoscale.
Yes. Two options:
use_remote_proxmox: true and provide SSH credentials.backend: api and configure proxmox_api with API tokens. Requires pip install proxmoxer.Yes (v2.0+). Set backend: api in the YAML config and provide API token credentials under proxmox_api. This avoids SSH entirely and uses scoped API tokens instead of root shell access. See the configuration docs for details.
LXC AutoScale backs up container settings before making changes and supports rollback via --rollback. Test thoroughly in a non-production environment before deploying to production.
The default polling interval is 300 seconds (5 minutes). Adjust with the poll_interval setting.
Yes. Add container IDs to the ignore_lxc list in the configuration file.
For more detailed questions and answers, see the Q&A documentation.
Contributions are welcome. To get involved:
LXC AutoScale is made better by the people who contribute to it. Thank you to everyone who has helped improve the project.
See the full contributors graph.
[!CAUTION] The author assumes no responsibility for any damage or issues that may arise from using this tool.
LXC AutoScale is licensed under the MIT License, which means you are free to use, modify, and distribute this software with proper attribution. For more details, please see the LICENSE file.
$ claude mcp add proxmox-lxc-autoscale \
-- python -m otcore.mcp_server <graph>