Easily manage your HP's server fans speeds, anywhere!
ℹ NOTE: The v1.0.0 is a complete rewrite of the tool, so any feedback is appreciated!
If you find any bug or have any suggestion, please open an issue. Thanks! 😄
This tool is a single PHP script that uses the php-curl
extension to get the current server fan speeds from the iLO REST api and the php-ssh2
extension to set the fan speeds using the patched iLO SSH interface. You can also create custom presets to set a specific fan configuration with a single click, all with a simple and clean web interface made using Alpine.js and TailwindCSS.
This tool requires a patched iLO firmware that expose to the iLO SSH interface some commands to manipulate the fans speeds. You can find more information about this patch on this Reddit post.
As of now, the patch (and so this tool) only works for Gen8 & Gen9 servers with iLO 4.
Gen10 servers with iLO 5 are not supported at the moment.
Sure, although I spent a lot of time rewriting the tool from scratch so I would recommend using this version instead.
Anyway, you can download the original version™ from the GitHub releases page.
Answer #1: In my opinion, PHP is perfect for this type of tasks where you need to do some server-side things and something easy to deploy (you just need a web server with PHP installed).
Answer #2: I wanted to make this tool as easy as possible to install and use, so I decided to put everything in a single file.
See my original comment on r/homelab to know the story behind this tool!
If you found this tool useful, consider offering me a coffee using PayPal or via GitHub Sponsors to support my work! Thank you so much! 🙏
If you already have a Docker environment, you can be up and running in minutes using the following command (obviously you need to change the value):
docker run -d --name ilo-fans-controller --restart always \
-p 8000:80 \
-e ILO_HOST='your-ilo-address' \
-e ILO_USERNAME='your-ilo-username' \
-e ILO_PASSWORD='your-ilo-password' \
ghcr.io/alex3025/ilo-fans-controller:latest
Or if you prefer, you can use docker compose
, as the docker-compose.yaml file is provided as well.
⚠ IMPORTANT! ⚠
Again, this tool works thanks to a patched iLO firmware that expose to the iLO SSH interface some commands to manipulate the fans speeds.
This patch is required to use this tool!
Update the system:
sudo apt-get update && sudo apt-get upgrade
Install the required packages (apache2
, php8.1
, php8.1-curl
and php8.1-ssh2
):
sudo apt-get install apache2 php8.1 php8.1-curl php8.1-ssh2
Download and extract the latest source code using wget
and tar
:
wget -qL https://github.com/alex3025/ilo-fans-controller/archive/refs/tags/1.0.0.tar.gz -O - | tar -xz
Enter the directory:
cd ilo-fans-controller-1.0.0
Open the config.inc.php
file you favourite text editor and change the variables according to your configuration.
ℹ NOTE: Remember that
$ILO_HOST
is the IP address of your iLO interface, not of the server itself.ℹ NOTE: It's recommended to create a new iLO user with the minimum privileges required to access the SSH interface and the REST api (Remote Console Access).
Here is an example:
<?php
/*
ILO ACCESS CREDENTIALS
--------------
These are used to connect to the iLO
interface and manage the fan speeds.
*/
$ILO_HOST = '192.168.1.69';
$ILO_USERNAME = 'Administrator';
$ILO_PASSWORD = 'AdministratorPassword1234';
?>
When you're done, create a new subdirectory in your web server root directory (usually /var/www/html/
) and copy the config.inc.php
, ilo-fans-controller.php
and favicon.ico
to it:
sudo mkdir /var/www/html/ilo-fans-controller
sudo cp config.inc.php ilo-fans-controller.php favicon.ico /var/www/html/ilo-fans-controller/
Then rename ilo-fans-controller.php
to index.php
(to make it work without specifying the filename in the URL):
sudo mv /var/www/html/ilo-fans-controller/ilo-fans-controller.php /var/www/html/ilo-fans-controller/index.php
That's it! Now you can reach the tool at http://<your-server-ip>/ilo-fans-controller/
(or http://<your-server-ip>/ilo-fans-controller/index.php
for API requests).
ℹ NOTE: If the web server where you installed this tool will be reachable from outside your network, remember to setup some sort of authentication (like Basic Auth) to prevent unauthorized fan management at 2AM.
The first thing to do when you encounter a problem is to check the logs.
If you are using Apache, PHP errors are logged in the
/var/log/apache2/error.log
file.
If you think you found a bug, please open an issue and I'll take a look.
Below you can find some common problems and their solutions.
If you see the following error in the logs when you create a new preset:
PHP Warning: file_put_contents(presets.json): Failed to open stream: Permission denied in .../index.php on line X
This is probably because the presets.json
file is not writable by the web server user.
To fix this, run the following command to change the file owner to www-data
(the default Apache user):
sudo chown www-data:www-data /var/www/html/ilo-fans-controller/presets.json
The tool exposes a simple API that can be used to:
There is also a way to manage the presets (get existing and add new ones) but it's not documented yet.
If you wish to do that, you can check inside the source code how that works
The following examples use cURL to show how to use the API, but you can use any other tool you want.
To use this API you need to add ?api=fans
at the end of the URL.
Example: http://<server ip>/ilo-fans-controller/index.php?api=fans