Deploy Huginn

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

Deploy Huginn

Just deployed

/var/lib/postgresql/data

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

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.


Template Content

More templates in this category

View Template
N8N Main + Worker
Deploy and Host N8N with Inactive worker.

jakemerson
120
View Template
Evolution API with n8n
Automate WhatsApp workflows with Evolution API, n8n, and Postgres.

codestorm
110
View Template
Postgres Backup
Cron-based PostgreSQL backup to bucket storage

Railway Templates
868