Huginn
Huginn is a system for building agents that perform automated tasks online. Agents read the web, watch for events and act on your behalf. They produce and consume events that travel along a directed graph. The upstream project describes it as a hackable version of IFTTT or Zapier that you run on your own server.
Announcement and talks
The Huginn app announcement TBA
Huginn is a community application from the tebbiworld repository. Documentation and source can be found on Github
What you can do with it
Typical uses named by the upstream project:
- Scrape web pages and get an e-mail when they change
- Watch RSS feeds, weather, prices or travel offers and act on a change
- Send and receive WebHooks
- Send digest e-mails at fixed times of day
- Detect spikes in the frequency of an event and raise an alert
- Chain agents together, so the output of one becomes the input of the next
Huginn ships a large set of agent types. The upstream wiki documents them and explains how to write your own.
Architecture
The module runs two rootless containers in one Podman pod, so both share a network namespace and Huginn reaches the database on 127.0.0.1:
| Container | Image | Purpose |
|---|---|---|
huginn-app | ghcr.io/huginn/huginn | Web interface and background workers. Runs the database migrations at start. |
huginn-db | docker.io/library/mariadb:11.4 | Database, stored in the named volume huginn-mysql. |
The pod publishes container port 3000 on the node loopback only. Traefik publishes it on the configured host name, with optional Let's Encrypt certificate and HTTP to HTTPS redirection.
The application container waits for the database health check before it starts, so the migrations do not run against a database that is still initialising.
Installation
On the NethServer 8 cluster leader:
add-module ghcr.io/tebbiworld/huginn:1.2.0 1
Configure it, replacing the host name:
api-cli run module/huginn1/configure-module --data '{ "host": "huginn.example.org", "lets_encrypt": true, "http2https": true, "timezone": "Europe/Zurich" }'
Read the configuration back, including the generated initial administrator password:
api-cli run module/huginn1/get-configuration --data '{}'
Log in with the user admin and the password returned above, then change it immediately.
Settings
All settings are available on the settings page of the module and through configure-module.
| Setting | Description |
|---|---|
| Host name | FQDN under which Huginn is published. |
| Let's Encrypt certificate | Requests a certificate for the host name. Requires that ports 80 and 443 of this name reach this node. |
| HTTP to HTTPS redirection | Redirects HTTP to HTTPS. |
| Timezone | IANA time zone used by Huginn, for example Europe/Zurich. Relevant for scheduled agents. |
Outgoing mail
Many agents send e-mail. If the cluster has a smarthost configured, the module uses it automatically and re-reads the setting when it changes. Without a cluster smarthost, enter a mail relay manually: server, port, user name, password, STARTTLS, sender address and whether the TLS certificate of the relay is verified.
The certificate check defaults differ on purpose. With a cluster smarthost the check is off, because that relay is reached over an address its certificate is not valid for. Without one, the check is on, because a public relay presents a valid certificate.
Registration
| Setting | Description |
|---|---|
| Invitation code | Code required to register a new account. Huginn's own default is publicly known, so the module generates a random code at installation. Read or change it on the settings page and hand it to the people who may sign up. An empty field keeps the current code. This cannot be set from inside Huginn; it is read at start-up. |
| Require confirmed email | New users must confirm their address before they can log in. Requires a working mail relay. |
Security-sensitive features
Both are off by default and can be switched on individually. Changing either one restarts the application container.
- Insecure agents — unlocks the
ShellCommandAgentandLocalFileAgent. These run arbitrary shell commands and read or write files inside the container. Any user of the instance can then use them. Only switch this on for an instance whose users you trust completely. - Second-precision schedules — allows second-level fields in the cron expression of the
SchedulerAgent. Schedules are limited to minute precision otherwise.
OpenAI agents
Huginn brings agents for LLM, image, speech and video. The settings page holds a global API key and a base address used as a fallback; the key can also be set per agent. The base address can point at any compatible endpoint, for example a local Ollama instance at http://host:11434/v1. Leave it empty for OpenAI itself.
Custom agents
Huginn builds its list of usable agent types by scanning its own agent directory at start-up, so an agent placed anywhere else is rejected as an invalid type. The module works around this: it mounts a directory for administrator-supplied agents into the container and registers the classes found there at boot.
On the Custom agents page of the module you can upload, list and remove Ruby agent files. An upload is syntax-checked inside the running container and rejected if the check fails. After a successful upload the application container restarts so the class is loaded.
Two agents are bundled with the module and are available without an upload: a payload agent and a timed e-mail agent.
Writing agents is documented upstream under Creating a new agent. Note that agents distributed as gems (the ADDITIONAL_GEMS mechanism of Huginn) are not covered by this module; that variable is not exposed.
Backup
The module does not list its volume for the NS8 backup; there is no state-include.conf. An NS8 backup of this module contains the module environment only, not the database in huginn-mysql with your agents, scenarios and events, and not the uploaded custom agents. Back these up separately until this is added to the module.
Updates
The module references the upstream tag huginn:latest. Which Huginn version runs therefore depends on when the image was pulled. The last tagged upstream release dates from 2022, while the project keeps developing on its main branch.
Links
- Huginn wiki — agent types, examples, tutorials
- Huginn on Github (MIT licence)
Disclaimer
Private hobby project, shared as-is. No warranty, no guaranteed support, use at your own risk. Unofficial community package, not affiliated with or endorsed by the Huginn project. The module's own code is licensed GPL-3.0-or-later.