{"id":13622078,"url":"https://github.com/alex3025/ilo-fans-controller","last_synced_at":"2025-10-07T01:50:51.582Z","repository":{"id":41483599,"uuid":"436593394","full_name":"alex3025/ilo-fans-controller","owner":"alex3025","description":"Easily manage your HP server's fans speeds, anywhere!","archived":false,"fork":false,"pushed_at":"2024-12-31T10:05:50.000Z","size":336,"stargazers_count":180,"open_issues_count":3,"forks_count":14,"subscribers_count":9,"default_branch":"main","last_synced_at":"2025-05-24T18:05:17.614Z","etag":null,"topics":["alpinejs","hpe","ilo4","php8","tailwindcss"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/alex3025.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":"alex3025","patreon":null,"open_collective":null,"ko_fi":null,"tidelift":null,"community_bridge":null,"liberapay":null,"issuehunt":null,"otechie":null,"custom":null}},"created_at":"2021-12-09T11:35:07.000Z","updated_at":"2025-05-20T18:35:28.000Z","dependencies_parsed_at":"2024-05-17T14:43:03.762Z","dependency_job_id":"aa2df037-5fb1-4046-aa50-3d0ca51f4ba6","html_url":"https://github.com/alex3025/ilo-fans-controller","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/alex3025/ilo-fans-controller","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alex3025%2Filo-fans-controller","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alex3025%2Filo-fans-controller/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alex3025%2Filo-fans-controller/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alex3025%2Filo-fans-controller/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/alex3025","download_url":"https://codeload.github.com/alex3025/ilo-fans-controller/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alex3025%2Filo-fans-controller/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":278708031,"owners_count":26031932,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-06T02:00:05.630Z","response_time":65,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["alpinejs","hpe","ilo4","php8","tailwindcss"],"created_at":"2024-08-01T21:01:13.685Z","updated_at":"2025-10-07T01:50:51.533Z","avatar_url":"https://github.com/alex3025.png","language":"PHP","funding_links":["https://github.com/sponsors/alex3025","https://paypal.me/alex3025"],"categories":["PHP"],"sub_categories":[],"readme":"\u003ch1 align=\"center\"\u003eiLO Fans Controller\u003c/h1\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003cimg width=\"800\" src=\"screenshot.png\" alt=\"Webpage Screenshot\"\u003e\n  \u003cbr\u003e\n  \u003ci\u003eEasily manage your HP's server fans speeds, anywhere!\u003c/i\u003e\n\u003c/p\u003e\n\n---\n\n\u003ch3 align=\"center\"\u003e 🎉 Thank you so much for the \u003ccode\u003e1.000+\u003c/code\u003e container pulls! 🎉 \u003c/h3\u003e\n\n\u003e ℹ **NOTE:** The v1.0.0 is a **complete rewrite** of the tool, so any feedback is appreciated!\u003cbr\u003e\n\u003e If you find any bug or have any suggestion, please [open an issue](https://github.com/alex3025/ilo-fans-controller/issues). Thanks! 😄\n\n## FAQ\n\n### How does it work? 🛠\n\nThis 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](#can-i-use-this-tool-with-my-hp-server-%EF%B8%8F).** 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](https://alpinejs.dev/) and [TailwindCSS](https://tailwindcss.com/).\n\n### Can I use this tool with my HP server? 🖥️\n\nThis 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](https://www.reddit.com/r/homelab/comments/sx3ldo/hp_ilo4_v277_unlocked_access_to_fan_controls/).\n\nAs of now, the patch (and so this tool) only works for **Gen8 \u0026 Gen9 servers with iLO 4.**\n\n\u003e Gen10 servers with iLO 5 are not supported at the moment.\n\n### I prefer the _original version™_, can I still use it?\n\nSure, although I spent a lot of time rewriting the tool from scratch so I would recommend using this version instead.\n\nAnyway, you can download the _original version™_ from the [GitHub releases](https://github.com/alex3025/ilo-fans-controller/releases/tag/0.0.1) page.\n\n### Why PHP? And why a single file? 📄\n\n**Answer #1:**\nIn 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).\n\n**Answer #2:**\nI wanted to make this tool as easy as possible to install and use, so I decided to put everything in a single file.\n\n### Why did you make this? 🤔\n\nSee my [original comment on r/homelab](https://www.reddit.com/r/homelab/comments/rcel73/comment/hnu3iyp/?utm_source=share\u0026utm_medium=web2x\u0026context=3) to know the story behind this tool!\n\n### How can I offer you a coffee? ☕\n\nIf you found this tool useful, consider offering me a coffee using [PayPal](https://paypal.me/alex3025) or via [GitHub Sponsors](hhttps://github.com/sponsors/alex3025) to support my work! Thank you so much! 🙏\n\n---\n\n## Use with Docker / Docker Compose\n\nIf 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):\n\n```sh\ndocker run -d --name ilo-fans-controller --restart always \\\n    -p 8000:80 \\\n    -e ILO_HOST='your-ilo-address' \\\n    -e ILO_USERNAME='your-ilo-username' \\\n    -e ILO_PASSWORD='your-ilo-password' \\\n    ghcr.io/alex3025/ilo-fans-controller:latest\n```\n\nOr if you prefer, you can use `docker compose`, as the [docker-compose.yaml](https://github.com/alex3025/ilo-fans-controller/blob/main/docker-compose.yaml) file is provided as well.\n\n---\n\n\u003e ⚠ **IMPORTANT!** ⚠\n\u003e\n\u003e Again, this tool works thanks to a **[patched iLO firmware](#can-i-use-this-tool-with-my-hp-server-%EF%B8%8F)** that expose to the iLO SSH interface some commands to manipulate the fans speeds.\n\u003e\n\u003e **This patch is required to use this tool!**\n\n## Manual installation\n\n### The following guide was run on\n\n* An **HP DL380e G8** server\n* **Patched iLO 4** Advanced **v2.77** (07 December 2020)\n* A Proxmox container (LXC) running **Ubuntu 22.04**\n* **Apache 2** \u0026 **PHP 8.1**\n\n### Preparing the environment\n\n1. Update the system:\n\n    ```sh\n    sudo apt-get update \u0026\u0026 sudo apt-get upgrade\n    ```\n\n2. Install the required packages (`apache2`, `php8.1`, `php8.1-curl` and `php8.1-ssh2`):\n\n    ```sh\n    sudo apt-get install apache2 php8.1 php8.1-curl php8.1-ssh2\n    ```\n\n### Downloading the tool\n\n1. Download and extract the latest source code using `wget` and `tar`:\n\n    ```sh\n    wget -qL https://github.com/alex3025/ilo-fans-controller/archive/refs/tags/1.0.0.tar.gz -O - | tar -xz\n    ```\n\n2. Enter the directory:\n\n    ```sh\n    cd ilo-fans-controller-1.0.0\n    ```\n\n### Configuring and installing the tool\n\n1. Open the `config.inc.php` file you favourite text editor and change the variables according to your configuration.\n\n    \u003e ℹ **NOTE:** Remember that `$ILO_HOST` is the IP address of your iLO interface, not of the server itself.\n\n    \u003e ℹ **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).\n\n    Here is an example:\n\n    ```php\n    \u003c?php\n\n    /*\n    ILO ACCESS CREDENTIALS\n    --------------\n    These are used to connect to the iLO\n    interface and manage the fan speeds.\n    */\n\n    $ILO_HOST = '192.168.1.69';\n    $ILO_USERNAME = 'Administrator';\n    $ILO_PASSWORD = 'AdministratorPassword1234';\n\n    ?\u003e\n    ```\n\n2. 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:\n\n    ```sh\n    sudo mkdir /var/www/html/ilo-fans-controller\n    sudo cp config.inc.php ilo-fans-controller.php favicon.ico /var/www/html/ilo-fans-controller/\n    ```\n\n    Then rename `ilo-fans-controller.php` to `index.php` (to make it work without specifying the filename in the URL):\n\n    ```sh\n    sudo mv /var/www/html/ilo-fans-controller/ilo-fans-controller.php /var/www/html/ilo-fans-controller/index.php\n    ```\n\n3. That's it! Now you can reach the tool at `http://\u003cyour-server-ip\u003e/ilo-fans-controller/` (or `http://\u003cyour-server-ip\u003e/ilo-fans-controller/index.php` for API requests).\n\n\u003e ℹ **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_.\n\n---\n\n## Troubleshooting\n\nThe first thing to do when you encounter a problem is to **check the logs**.\n\n\u003e If you are using Apache, PHP errors are logged in the `/var/log/apache2/error.log` file.\n\nIf you think you found a bug, please [open an issue](https://github.com/alex3025/ilo-fans-controller/issues) and I'll take a look.\n\nBelow you can find some common problems and their solutions.\n\n### The presets are not saved\n\nIf you see the following error in the logs when you create a new preset:\n\n```log\nPHP Warning:  file_put_contents(presets.json): Failed to open stream: Permission denied in .../index.php on line X\n```\n\nThis is probably because the `presets.json` file is not writable by the web server user.\u003cbr\u003e\nTo fix this, run the following command to change the file owner to `www-data` (the default Apache user):\n\n```sh\nsudo chown www-data:www-data /var/www/html/ilo-fans-controller/presets.json\n```\n\n---\n\n## API Documentation (WIP)\n\nThe tool exposes a simple API that can be used to:\n\n* Get the current fan speeds from iLO\n* Set the fan speeds\n\n_There is also a way to manage the presets (get existing and add new ones) but it's not documented yet._\u003cbr\u003e\n_If you wish to do that, you can check inside the source code how that works_\n\n\u003e The following examples use cURL to show how to use the API, but you can use any other tool you want.\n\n### Get the fan speeds (GET)\n\nTo use this API you need to add `?api=fans` at the end of the URL.\u003cbr\u003e\n**Example: `http://\u003cserver ip\u003e/ilo-fans-controller/index.php?api=fans`**\n\n\u003cdetails\u003e\n\u003csummary\u003eJSON structure (response)\u003c/summary\u003e\n\n```json\n{\n    \"Fan 1\": 85,\n    \"Fan 2\": 48,\n    \"Fan 3\": 69,\n    \"Fan 4\": 18,\n    \"Fan 5\": 44,\n    \"Fan 6\": 96\n}\n```\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003ecURL example:\u003c/summary\u003e\n\n```sh\ncurl http://\u003cserver ip\u003e/ilo-fans-controller/index.php?api=fans\n```\n\n\u003c/details\u003e\n\n### Set the fan speeds (POST)\n\n\u003cdetails\u003e\n\u003csummary\u003eJSON structure example\u003c/summary\u003e\n\n```json\n{\n    \"action\": \"fans\",\n    // You can use either an object or a single number value (that will be applied to all fans):\n    // Example: `fans: { ... }` or `fans: 50`\n    \"fans\": {\n        \"Fan 1\": 40,\n        \"Fan 2\": 23,\n        \"Fan 5\": 70\n        // ...\n    }\n}\n```\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003ecURL example\u003c/summary\u003e\n\n```sh\ncurl -X POST http://\u003cserver ip\u003e/ilo-fans-controller/index.php -H 'Content-Type: application/json' -d '{\"action\": \"fans\", \"fans\": 50}'\n```\n\nThis command will set all fans to 50%.\u003cbr\u003e\n_I personally use this command to slow down the fans automatically when my server boots._\n\u003c/details\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falex3025%2Filo-fans-controller","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Falex3025%2Filo-fans-controller","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falex3025%2Filo-fans-controller/lists"}