---
title: "Deploy Huginn"
description: "Self-hosted agents that watch the web and act for you, like IFTTT or Zapier"
category: "Automation"
url: https://railway.com/deploy/huginn-1
---

# Deploy Huginn

Self-hosted agents that watch the web and act for you, like IFTTT or Zapier

**[Deploy Huginn on Railway](https://railway.com/template/huginn-1)**

Machine-readable deploy manifest (JSON, validated by TemplateCI): https://railway.com/deploy/huginn-1/manifest.json

- **Creator:** Agaz Self-Host
- **Category:** Automation

## Template content

### Huginn https://cdn.jsdelivr.net/gh/homarr-labs/dashboard-icons/svg/huginn.svg

- **Image:** huginn/huginn:v2026.11.09@sha256:d606052ab888c4c9fff5eb7b56146f00e3e30853c1ef766531fffae786bfd7d0
- **Start command:** `/bin/bash -c 'echo IyEvYmluL2Jhc2gKIyBIdWdpbm4gb24gUmFpbHdheTogd2ViIChwdW1hKSBhbmQgdGhlIGJhY2tncm91bmQgd29ya2VyIHJ1biBpbiB0aGlzIG9uZQojIGNvbnRhaW5lciB1bmRlciBmb3JlbWFuLiBJZiBlaXRoZXIgZXhpdHMsIHRoZSBjb250YWluZXIgZXhpdHMgYW5kIFJhaWx3YXkKIyByZXN0YXJ0cyBpdC4gRXZlcnkgZGVmYXVsdCBiZWxvdyBjYW4gYmUgb3ZlcnJpZGRlbiB3aXRoIGEgc2VydmljZSB2YXJpYWJsZS4Kc2V0IC1lCmV4cG9ydCBTRUVEX1VTRVJOQU1FPSIke1NFRURfVVNFUk5BTUU6LWFkbWlufSIKZXhwb3J0IFNFRURfRU1BSUw9IiR7U0VFRF9FTUFJTDotYWRtaW5AZXhhbXBsZS5jb219IgpleHBvcnQgVElNRVpPTkU9IiR7VElNRVpPTkU6LVVUQ30iCmV4cG9ydCBTS0lQX0lOVklUQVRJT05fQ09ERT0iJHtTS0lQX0lOVklUQVRJT05fQ09ERTotZmFsc2V9IgpjZCAvYXBwCnJtIC1mIC9hcHAvdG1wL3BpZHMvc2VydmVyLnBpZApzb3VyY2UgL3NjcmlwdHMvc2V0dXBfZW52CiMgV2FpdCBmb3IgdGhlIGRhdGFiYXNlICh1cHN0cmVhbSdzIERBVEFCQVNFX0lOSVRJQUxfQ09OTkVDVF9NQVhfUkVUUklFUyBjaGVjawojIGFsd2F5cyBmYWlscyB3aXRoIFBvc3RncmVzIGJlY2F1c2UgaXRzIHBpbmcgdGFzayBhbHNvIGxvYWRzIG15c3FsMikuCmZvciBpIGluICQoc2VxIDEgNjApOyBkbwogIChleGVjIDM8PiIvZGV2L3RjcC8ke0RBVEFCQVNFX0hPU1R9LyR7REFUQUJBU0VfUE9SVH0iKSAyPi9kZXYvbnVsbCAmJiBicmVhawogIGVjaG8gIldhaXRpbmcgZm9yIHRoZSBkYXRhYmFzZSBhdCAke0RBVEFCQVNFX0hPU1R9OiR7REFUQUJBU0VfUE9SVH0gKCR7aX0vNjApIjsgc2xlZXAgMgpkb25lCmlmIFsgLW4gIiR7RE9fTk9UX1JVTl9KT0JTfSIgXTsgdGhlbiBzZWQgLWkgLWUgJ3MvXmpvYnM6LyNqb2JzOi8nIC9hcHAvUHJvY2ZpbGU7IGZpCmlmIFsgIiR7RU5BQkxFX1NNT0tFU0NSRUVOfSIgPSAidHJ1ZSIgXSB8fCBbICIke1NUQVJUX1NNT0tFU0NSRUVOfSIgPSAidHJ1ZSIgXTsgdGhlbgogIGVjaG8gIlN0YXJ0aW5nIFNtb2tlc2NyZWVuIGVncmVzcyBwcm94eS4uLiIKICAvc2NyaXB0cy9zbW9rZXNjcmVlbiAmCmZpCmV4ZWMgL3NjcmlwdHMvZm9yZW1hbi5zaAo= | base64 -d > /tmp/railway-start.sh && exec /bin/bash /tmp/railway-start.sh'`
- **Health check:** /
- **Public domain:** Yes

### Postgres https://devicons.railway.app/i/postgresql.svg

- **Image:** ghcr.io/railwayapp-templates/postgres-ssl:18.6@sha256:4fc833b43d2aaf6ecc9b18615f5533602b723a32d0e2efe2dae8ca0f7217c863

## Documentation

# Deploy and Host Huginn on Railway

Huginn is an open-source system for building agents that perform automated tasks for you online. Agents watch websites, RSS feeds, APIs and inboxes, create events when something changes, and pass those events to other agents that filter, format, merge or send them on by email, webhook or chat. It is a self-hosted alternative to IFTTT and Zapier.

## About Hosting Huginn

Huginn is a Ruby on Rails app with two parts: the web interface and a background worker that runs scheduled agents and processes events. Both need the same database, and both must run all the time, or scheduled agents stop. This template runs the official Huginn image with the web server and the worker in one service, connected to a Railway PostgreSQL database over the private network. A secret token, the admin password and an invitation code are generated at deploy time, and migrations run on every start. Huginn keeps all its data in PostgreSQL, so the app service needs no volume. Outgoing email (SMTP) is optional.

## Common Use Cases

* Watch websites, RSS feeds or APIs and get a digest or alert when something changes
* Chain agents: fetch data on a schedule, filter and reformat it, then post it to a webhook, Slack, Telegram or email
* Receive webhooks from other services and turn them into events, feeds or notifications

## Dependencies for Huginn Hosting

* PostgreSQL (Railway's PostgreSQL 18 service, included)
* Optional: an SMTP account for email digests, password resets and invitations

### Deployment Dependencies

* Huginn source and docs: https://github.com/huginn/huginn
* Release used: https://github.com/huginn/huginn/releases/tag/v2026.11.09
* Docker image docs: https://github.com/huginn/huginn/blob/master/docker/multi-process/README.md
* Configuration reference (.env.example): https://github.com/huginn/huginn/blob/master/.env.example

### Implementation Details

* Image: `huginn/huginn:v2026.11.09`, pinned by digest. It runs the web server (puma) and the background worker (`jobs`) under foreman. A short start script waits for the database, runs migrations and seeding, and starts foreman directly, so if either process stops, the container exits and Railway restarts it.
* First sign-in: username `admin`, with the password from the Huginn service's `SEED_PASSWORD` variable. Change it under Account after you sign in. The admin is created only when the database has no users.
* Sign-up needs the invitation code in the `INVITATION_CODE` variable, so a fresh deploy can't be claimed by strangers. Share the code only with people you trust: Huginn agents can make requests from your server.
* Optional variables you can add to the Huginn service: `SMTP_SERVER`, `SMTP_PORT`, `SMTP_USER_NAME`, `SMTP_PASSWORD`, `SMTP_DOMAIN` and `EMAIL_FROM_ADDRESS` for email; `TIMEZONE` (default `UTC`); `SEED_USERNAME` and `SEED_EMAIL` for the first admin; `ENABLE_SMOKESCREEN=true` to block agent requests to private addresses. Any setting from Huginn's `.env.example` works as a variable.
* Railway already redirects HTTP to HTTPS at its edge. Leave `FORCE_SSL` unset: Huginn would then redirect Railway's plain-HTTP health check and the deploy would never go live.
* The Postgres driver gem is installed when the container starts, so the first start takes about a minute.

## Why Deploy Huginn on Railway?


Railway is a singular platform to deploy your infrastructure stack. Railway will host your infrastructure so you don't have to deal with configuration, while allowing you to vertically and horizontally scale it.

By deploying Huginn on Railway, you are one step closer to supporting a complete full-stack application with minimal burden. Host your servers, databases, AI agents, and more on Railway.



## Similar templates

- [N8N Main + Worker](https://railway.com/deploy/n8n-main-worker) — Deploy and Host N8N with Inactive worker.
- [Evolution API with n8n](https://railway.com/deploy/evolution-api-with-n8n) — Automate WhatsApp workflows with Evolution API, n8n, and Postgres.
- [Postgres Backup](https://railway.com/deploy/postgres-s3-backups) — Cron-based PostgreSQL backup to bucket storage

Open this page in a browser: https://railway.com/deploy/huginn-1
