6.5 KiB
IPMI Fan Control
A modern web-based application for controlling fan speeds on Dell T710 and compatible servers using IPMI. Features a clean web UI, automatic fan curves, panic mode for safety, and support for multiple servers.
Features
- 🖥️ Multiple Server Support - Manage multiple servers from a single interface
- 🌡️ Temperature-Based Fan Curves - Automatically adjust fan speeds based on CPU temperatures
- ⚡ Panic Mode - Automatically sets fans to 100% if sensor data is lost
- 🎛️ Manual Fan Control - Direct control over individual fans or all fans at once
- 📊 Real-time Monitoring - View temperatures, fan speeds, and power consumption
- 🔒 Secure Authentication - JWT-based authentication with encrypted passwords
- 🐳 Docker Support - Easy deployment with Docker Compose
- 🔄 Persistent Storage - Settings and credentials survive container restarts
Supported Servers
- Dell PowerEdge T710 (tested)
- Dell PowerEdge R710/R720/R730 (should work)
- Dell PowerEdge R810/R820/R910/R920 (should work)
- HPE servers with iLO (partial support)
Quick Start
Prerequisites
- Docker and Docker Compose installed
- IPMI enabled on your server(s) with network access
Installation
- Clone the repository:
git clone https://git.lemonlink.eu/impulsivefps/ipmi-fan-control.git
cd ipmi-fan-control
- Copy the example environment file and edit it:
cp .env.example .env
# Edit .env and set a secure SECRET_KEY
- Create the data directory:
mkdir -p data
- Start the application:
docker-compose up -d
-
Access the web interface at
http://your-server-ip:8000 -
Complete the setup wizard to create your admin account
First Time Setup
- When you first access the web UI, you'll be guided through a setup wizard
- Create an administrator account
- Add your first server by providing:
- Server name
- IP address/hostname
- IPMI username and password
- Vendor (Dell, HPE, etc.)
Usage
Manual Fan Control
- Go to a server's detail page
- Click on the "Fan Control" tab
- Enable "Manual Fan Control"
- Use the slider to set the desired fan speed
- Click "Apply" to send the command
Automatic Fan Curves
- Go to the "Fan Curves" page for your server
- Create a new fan curve with temperature/speed points
- Select the curve and click "Start Auto Control"
- The system will automatically adjust fan speeds based on temperatures
Panic Mode
Panic mode is enabled by default. If the application loses connection to a server and cannot retrieve sensor data for the configured timeout period (default: 60 seconds), it will automatically set all fans to 100% speed for safety.
IPMI Commands Used
This application uses the following IPMI raw commands:
Dell Servers
- Enable Manual Control:
raw 0x30 0x30 0x01 0x00 - Disable Manual Control:
raw 0x30 0x30 0x01 0x01 - Set Fan Speed:
raw 0x30 0x30 0x02 <fan_id> <speed_hex> - Get 3rd Party PCIe Status:
raw 0x30 0xce 0x01 0x16 0x05 0x00 0x00 0x00 - Enable 3rd Party PCIe Response:
raw 0x30 0xce 0x00 0x16 0x05 0x00 0x00 0x00 0x05 0x00 0x00 0x00 0x00 - Disable 3rd Party PCIe Response:
raw 0x30 0xce 0x00 0x16 0x05 0x00 0x00 0x00 0x05 0x00 0x01 0x00 0x00
Standard IPMI
- Get Temperatures:
sdr type temperature - Get All Sensors:
sdr elist full - Get Power Supply Status:
sdr type 'Power Supply' - Dell Power Monitor:
delloem powermonitor
Fan Mapping
For Dell servers, the fan mapping is:
| IPMI ID | Physical Fan |
|---|---|
| 0x00 | Fan 1 |
| 0x01 | Fan 2 |
| 0x02 | Fan 3 |
| 0x03 | Fan 4 |
| 0x04 | Fan 5 |
| 0x05 | Fan 6 |
| 0x06 | Fan 7 |
| 0xff | All Fans |
Configuration
Environment Variables
| Variable | Default | Description |
|---|---|---|
SECRET_KEY |
(required) | Secret key for JWT tokens |
DATA_DIR |
/app/data | Directory for persistent data |
PANIC_TIMEOUT_SECONDS |
60 | Seconds before panic mode activates |
PANIC_FAN_SPEED |
100 | Fan speed during panic mode (%) |
DATABASE_URL |
sqlite:///app/data/... | Database connection string |
DEBUG |
false | Enable debug mode |
Docker Compose
version: '3.8'
services:
ipmi-fan-control:
image: ipmi-fan-control:latest
container_name: ipmi-fan-control
restart: unless-stopped
ports:
- "8000:8000"
environment:
- SECRET_KEY=your-secure-secret-key
- PANIC_TIMEOUT_SECONDS=60
volumes:
- ./data:/app/data
Building from Source
Backend
cd backend
pip install -r requirements.txt
python -m uvicorn main:app --reload
Frontend
cd frontend
npm install
npm run dev
Development
The application consists of:
- Backend: Python FastAPI with SQLAlchemy ORM
- Frontend: React with TypeScript, Material-UI, and Recharts
- Database: SQLite (default) or PostgreSQL
- IPMI: Direct integration with ipmitool
Security Considerations
- Change the default SECRET_KEY in production
- Use HTTPS when accessing over the internet
- Place behind a reverse proxy (nginx, traefik) for SSL termination
- Use strong passwords for the admin account
- Server passwords are encrypted at rest using Fernet encryption
- Regularly update the Docker image for security patches
Troubleshooting
Cannot connect to server
- Verify IPMI is enabled in the server's BIOS/iDRAC settings
- Check network connectivity:
ping <server-ip> - Test IPMI manually:
ipmitool -I lanplus -H <ip> -U <user> -P <pass> mc info - Check firewall rules allow IPMI traffic (port 623)
Fan control not working
- Ensure manual fan control is enabled first
- Check that the server supports the IPMI raw commands
- Verify you have admin/root IPMI privileges
- Some servers require 3rd party PCIe card response to be disabled
Container won't start
- Check logs:
docker-compose logs -f - Verify data directory has correct permissions
- Ensure port 8000 is not already in use
License
MIT License - See LICENSE file for details
Contributing
Contributions are welcome! Please:
- Fork the repository
- Create a feature branch
- Make your changes
- Submit a pull request
Support
For issues and feature requests, please use the GitHub issue tracker.
Acknowledgments
- Dell for the IPMI command documentation
- The ipmitool project
- FastAPI and React communities
