Pi-hole icon

Pi-hole

Get information from Pi-hole API

Actions10

Overview

This n8n node interacts with the Pi-hole API to retrieve information about the software versions installed on a Pi-hole instance. Specifically, when configured with Resource: Version and Operation: Get, it queries the Pi-hole server for version details, which can help administrators determine if updates are available or verify the current installation state.

Common scenarios:

  • Monitoring Pi-hole installations for outdated components.
  • Automating update checks as part of a larger network management workflow.
  • Integrating Pi-hole status into dashboards or alerting systems.

Practical example:
A system administrator could use this node in an n8n workflow that runs daily, checking all managed Pi-hole instances for available updates and sending notifications if any are found.

Properties

Name Type Meaning
API Url String The base URL of the Pi-hole API endpoint (e.g., http://localhost/admin/api.php). This is required and specifies where requests will be sent.

Output

The node returns a JSON object containing the version information for the Pi-hole software and its components. The exact structure may vary depending on the Pi-hole API version, but typically includes fields such as:

{
  "core_update": "available",
  "web_update": "not available",
  "FTL_update": "available",
  "core_current": "v5.7",
  "web_current": "v5.4",
  "FTL_current": "v5.11",
  "core_latest": "v5.8",
  "web_latest": "v5.5",
  "FTL_latest": "v5.12"
}
  • Each field indicates the current and latest versions of different Pi-hole components, and whether updates are available.

Dependencies

  • Pi-hole API: A running Pi-hole instance with its API accessible at the specified API Url.
  • No authentication required by default, but if your Pi-hole instance requires authentication, you may need to configure credentials in n8n.
  • n8n configuration: Ensure outbound HTTP(S) access from n8n to the Pi-hole server.

Troubleshooting

Common issues:

  • Incorrect API Url: If the API Url is wrong or unreachable, the node will fail with a connection error. Double-check the URL and network connectivity.
  • API not enabled: If the Pi-hole API is disabled or restricted, you may receive authorization errors or empty responses.
  • Unexpected output structure: If the Pi-hole API changes, the output fields may differ from expectations.

Error messages and resolutions:

  • "ECONNREFUSED" or "ENOTFOUND": The API Url is incorrect or the Pi-hole server is down. Verify the address and server status.
  • "401 Unauthorized" or similar: The API requires authentication. Configure credentials in n8n if needed.

Links and References

Discussion