Deploy Hatchet

Durable task queue and workflow engine: workers, retries, cron, dashboard

Deploy Hatchet

Just deployed

Just deployed

/var/lib/postgresql/data

Just deployed

Deploy and Host Hatchet on Railway

Deploy on Railway

Hatchet is an open-source task queue and workflow engine: you write tasks in Python, TypeScript, Go or Ruby, run them on your own workers, and Hatchet queues, retries, schedules and records every run, with DAG workflows, durable tasks, cron, rate limits, concurrency control and a dashboard for runs, workers and logs. It is licensed MIT. This template runs Hatchet v0.121.5 on Railway: the dashboard and API, the engine, and Postgres as both the database and the queue, with the first admin ready on the first boot.

This is a community template, not made or supported by the Hatchet authors.

About Hosting Hatchet

Before deploying, set ADMIN_EMAIL on the Hatchet service to your email. Deploy, wait for the green checks (the first boot creates the database, under a minute), and open the Hatchet service's Railway domain. Sign in with ADMIN_EMAIL and the generated ADMIN_PASSWORD, both on the Hatchet service's Variables tab. Change the password under your profile afterwards; the variable is only used on the first boot.

Why the admin is created for you and sign-up is off: on a public address anyone could otherwise register. The template creates the admin and the first tenant from your variables, and keeps SERVER_ALLOW_SIGNUP=false. To add teammates, set it to true for as long as they need to create accounts, invite them under Settings > Members, and set it back.

Connecting workers: in the dashboard open Settings > API Tokens and create a token. The token already carries the engine's public address (the Engine service's TCP proxy, for example trolley.proxy.rlwy.net:39500), so a worker needs only:

HATCHET_CLIENT_TOKEN=‹the token›
HATCHET_CLIENT_TLS_STRATEGY=none

Workers that run as services in the same Railway project can skip the TCP proxy: add HATCHET_CLIENT_HOST_PORT=${{Engine.RAILWAY_PRIVATE_DOMAIN}}:7070 to them.

About TLS: Railway's TCP proxy carries plain TCP, so traffic from workers outside Railway, including the API token, is not encrypted on the way to the engine. Run workers inside the Railway project (private network) when that matters, or put the engine behind your own TLS.

Your data: tenants, workflows, runs, logs and queued tasks are all in the Postgres service, on its volume. Redeploys keep them, and Hatchet's migrations run on every start, so an upgrade migrates the database by itself. The encryption keysets and cookie secrets are generated on the first boot and kept in a railway_hatchet_secrets table in the same database; back it up with the rest.

Custom domain: add it under the Hatchet service's Settings > Networking, set SERVER_URL=https://hatchet.example.com and redeploy both Hatchet services. API tokens made before the change keep the old address, so create new ones.

Common Use Cases

  • Background jobs for a web app: emails, exports, webhooks, image or PDF processing, with retries
  • AI agent and LLM pipelines that must survive crashes and resume where they left off
  • Scheduled and cron jobs with a dashboard showing every run and its logs
  • Fan-out data processing with concurrency limits and rate limits per customer
  • A self-hosted alternative to Celery, BullMQ, Temporal or Inngest with one dashboard

Dependencies for Hatchet Hosting

  • Postgres (included; it is also the task queue, so there is no RabbitMQ to run)
  • Your own workers, built with a Hatchet SDK (Python, TypeScript, Go or Ruby)

Deployment Dependencies

Implementation Details

  • Services: Hatchet (the API and the web dashboard, on the public domain), Engine (the gRPC server workers connect to, the scheduler and the queue, on a TCP proxy) and Postgres 17.
  • Images: one small wrapper built from upstream's pinned ghcr.io/hatchet-dev/hatchet/hatchet-dashboard, hatchet-engine, hatchet-admin and hatchet-migrate v0.121.5 images; HATCHET_SERVICE picks the role.
  • Secrets: the admin password and the database password are template variables; the encryption keysets and cookie secrets are generated by Hatchet's own hatchet-admin keyset on the first boot and shared by both services through Postgres.
  • Never crash-looping on a variable: if DATABASE_URL, SERVER_URL, ADMIN_EMAIL or ADMIN_PASSWORD is wrong, or a migration fails, the service shows a page saying what to fix instead of restarting over and over, and the deploy logs say the same.
  • Memory: at rest the Hatchet service uses about 100-200 MB, the engine about 70 MB and Postgres about 200-300 MB; 200 tasks run 20 at a time stayed under 0.5 GB per service.

Why Deploy Hatchet 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 Hatchet 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
Celery | Web, Worker and Scheduler as Three Services
Web, worker and scheduler wired up: Celery on Redis, outcomes in Postgres.

Templates Guru
0
View Template
smoothmq
A drop-in replacement for AWS SQS

poundifdef
7
View Template
Kafka UI
Kafbat UI — Open-source web UI to monitor and manage Apache Kafka clusters

codestorm
0