A comprehensive, user-friendly LXC (Linux Containers) management suite with automated installation, interactive container management, and advanced features. Designed for both beginners and advanced users.
# Clone the repository
git clone https://github.com/0xamirreza/lxc4dev.git
cd lxc4dev
# Make scripts executable
chmod +x lxc-install.sh 0xlxc.sh
# Run the installation
./lxc-install.sh
# Choose option 1 to install LXC + Network
# After installation, press Enter to launch 0xlxc manager
# OR
# For Access the LXC manager from anywhere just type
0xlxc| File | Description |
|---|---|
lxc-install.sh |
🔧 One-click LXC installation with network configuration |
0xlxc.sh |
🎛️ Advanced interactive container management interface |
VERSION |
📌 Version control file (current: v1.0.0) |
README.md |
📚 This comprehensive guide |
- ✅ One-click installation with automated network configuration
- ✅ Auto-launch interface - seamlessly transition from install to management
- ✅ Global command access - use
0xlxcfrom anywhere - ✅ Complete uninstallation with dependency cleanup
- ✅ Interactive container selection - no manual typing required
- ✅ 18 management functions covering all container operations
- ✅ Beautiful table interfaces with status indicators
- ✅ Resource monitoring - real-time CPU, memory, disk usage
- ✅ Container cloning with interactive source selection
- ✅ Smart backup system with automatic file discovery
- ✅ Interactive restore with backup file browser
- ✅ Snapshot management - create, restore, delete snapshots
- ✅ Data integrity - containers stopped during backup for consistency
- ✅ Automatic bridge setup (lxcbr0 with DHCP)
- ✅ Network diagnostics and connectivity testing
- ✅ IP address management with real-time display
- ✅ Network troubleshooting tools built-in
- Multi-distro Support - Add support for apt, dnf, zypper package managers
- Enhanced Resource Editor - Improve container resource editing functionality
- Installation Wizard - GUI-based installation option
- Container Templates - Pre-configured container templates
- Logging System - Persistent logging with rotation
- Web Interface - Browser-based management dashboard
- Auto-scaling - Dynamic resource adjustment
- Health Monitoring - Container health checks and alerts
- Custom Networks - Support for custom bridge configurations
- Container Migration - Move containers between hosts
- Backup Scheduling - Automated backup scheduling
- Performance Analytics - Historical performance data
- Container Orchestration - Multi-container deployment management
- Configuration Files - YAML/JSON configuration support
- Container Registry - Private container image registry
- Security Hardening - Enhanced security profiles
| # | Function | Description | Features |
|---|---|---|---|
| 1 | Create Container | Interactive OS selection | Resource limits, template selection |
| 2 | Container Info | Detailed system information | Resource usage, network details |
| 3 | List All Containers | Overview dashboard | Status, IP addresses, resource usage |
| 4 | Start Container | Boot containers | Interactive selection, status monitoring |
| 5 | Stop Container | Graceful shutdown | Safe stopping with confirmation |
| 6 | Restart Container | Reboot containers | Graceful restart with status updates |
| 7 | Delete Container | Remove containers | Safe deletion with data confirmation |
| 8 | Enter Container | Access container shell | Multiple methods (attach/console) |
| 9 | Execute Command | Run remote commands | Execute in any container remotely |
| 10 | Clone Container | Duplicate containers | Interactive source selection |
| 11 | Snapshot Management | Container snapshots | Create, restore, delete, list |
| 12 | Resource Usage | Real-time monitoring | CPU, memory, disk, network stats |
| 13 | Network Configuration | Network management | Interface config, connectivity tests |
| 14 | Backup Container | Full container backup | Smart directory selection |
| 15 | Restore Container | Restore from backup | Interactive backup file browser |
| 16 | Exit | Quit application | Clean exit with goodbye message |
| 17 | Edit Resources | Modify limits | Dynamic CPU, memory, disk adjustment |
| 18 | Uninstall LXC | Complete removal | Clean uninstall with dependency cleanup |
- Cgroup v1/v2 Support - Automatic detection and compatibility
- Resource Validation - Input validation for all settings
- Error Handling - Comprehensive error checking and user feedback
- Color-coded Interface - Beautiful, intuitive user experience
- Table Formatting - Professional data presentation
- Smart Defaults - Sensible default values for quick setup
# Access the LXC manager from anywhere
0xlxc# Installation
./lxc-install.sh # Install LXC with network setup
# Management Interface
0xlxc # Open interactive manager
# Direct LXC Commands (after installation)
lxc-ls -f # List all containers with details
lxc-start -n CONTAINER_NAME # Start a specific container
lxc-stop -n CONTAINER_NAME # Stop a specific container
lxc-attach -n CONTAINER_NAME # Attach to container shell
lxc-console -n CONTAINER_NAME # Access container console
lxc-info -n CONTAINER_NAME # Show container information
# Network Troubleshooting
sudo lxc-fix-network # Fix network issues (auto-installed)# 1. Install the system
./lxc-install.sh
# Choose option 1, press Enter when done
# 2. Create your first container
# Select option 1 in 0xlxc interface
# Choose Ubuntu 22.04, set resources
# 3. Start and enter the container
# Use options 4 and 8 in the interface
# 4. Backup your configured container
# Use option 14 for backup- Arch Linux - Fully tested and working perfectly
- CachyOS - Fully tested and working perfectly
The installation script currently supports pacman (Arch-based distributions). Support for other package managers is planned:
| Package Manager | Distributions | Status |
|---|---|---|
pacman |
Arch Linux, Manjaro, EndeavourOS, CachyOS | ✅ Supported |
apt |
Debian, Ubuntu, Linux Mint, Pop!_OS | 🔄 Planned |
dnf |
Fedora, RHEL 8+, CentOS Stream | 🔄 Planned |
yum |
RHEL, CentOS 7 | 🔄 Planned |
zypper |
openSUSE, SUSE Linux Enterprise | 🔄 Planned |
apk |
Alpine Linux | 🔄 Planned |
xbps |
Void Linux | 🔄 Planned |
emerge |
Gentoo (Portage) | 🔄 Planned |
Note: While the core 0xlxc management interface should work on any Linux distribution with LXC installed, the automated installer currently only supports Arch-based systems.
- Linux system with systemd
- Root/sudo privileges
- Internet connection for package downloads
- Minimum 2GB RAM (4GB+ recommended)
- 10GB+ free disk space
- LXC (Linux Containers)
- iptables-nft
- dnsmasq
- systemd-networkd
Contributions are welcome! Please feel free to submit a Pull Request. Areas where help is needed:
- Support for additional package managers (apt, dnf, zypper, etc.)
- Testing on different distributions
- Documentation improvements
- Bug fixes and feature enhancements
This project is licensed under the MIT License - see the MIT License for details.
- Bug Reports: Create an issue
- Feature Requests: Create an issue
- Documentation: Check this comprehensive README.md for all usage information
If this project helped you, please consider giving it a ⭐ on GitHub!
Made with ❤️ for the Linux community