# IPMI Controller - Persistence Setup ## Data Persistence All configuration and user data is stored in the `data/` directory: - `data/config.json` - All settings, fan curves, IPMI config - `data/users.json` - User accounts and passwords **IMPORTANT:** The `data/` directory is committed to git for version control of your settings. ## Backup Your Settings ```bash # Create backup cd ~/ipmi-controller cp -r data data.backup.$(date +%Y%m%d) # Or backup to external location cp data/config.json /mnt/backup/ipmi-controller-config.json ``` ## Auto-Start on Boot (systemd) 1. **Create service file:** ```bash sudo tee /etc/systemd/system/ipmi-controller.service << 'EOF' [Unit] Description=IPMI Controller After=network.target [Service] Type=simple User=devmatrix WorkingDirectory=/home/devmatrix/ipmi-controller ExecStart=/usr/bin/python3 /home/devmatrix/ipmi-controller/web_server.py Restart=always RestartSec=10 [Install] WantedBy=multi-user.target EOF ``` 2. **Enable and start:** ```bash sudo systemctl daemon-reload sudo systemctl enable ipmi-controller sudo systemctl start ipmi-controller ``` 3. **Check status:** ```bash sudo systemctl status ipmi-controller sudo journalctl -u ipmi-controller -f ``` ## Docker Deployment (Persistent) ```bash # Using docker-compose cd ~/ipmi-controller docker-compose up -d # Data is persisted in ./data directory ``` ## Updating Without Losing Settings ```bash cd ~/ipmi-controller # Backup first cp -r data data.backup # Pull updates git pull # Restart sudo systemctl restart ipmi-controller # OR if using docker: docker-compose restart ``` ## What Gets Persisted ✅ IPMI connection settings ✅ HTTP sensor configuration ✅ Fan curves (Balanced, Silent, Performance, etc.) ✅ User accounts and passwords ✅ Theme preference (dark/light) ✅ Fan groups and custom names ✅ All control settings (poll interval, panic temps, etc.) ## Migration to New Server 1. Copy `data/config.json` and `data/users.json` to new server 2. Install ipmitool: `sudo apt-get install ipmitool` 3. Install Python deps: `pip install -r requirements.txt` 4. Start server: `python3 web_server.py`