---
title: "Deploy OpnForm"
description: "Open-source form builder (Typeform alternative) with PostgreSQL"
category: "Other"
url: https://railway.com/deploy/opnform
---

# Deploy OpnForm

Open-source form builder (Typeform alternative) with PostgreSQL

**[Deploy OpnForm on Railway](https://railway.com/template/opnform)**

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

- **Creator:** Youssef Siam
- **Category:** Other

## Template content

### client

- **Image:** jhumanj/opnform-client:2.5.0@sha256:8862ee89453fdf10ec1c652b94a2dfb28abd16fe0af1d67e982bcc780dcca68e

### opnform

- **Image:** ghcr.io/youssefsiam38/opnform-railway:1.0.0@sha256:549cd20a56c8f0f65b137d6363eac37081b0e4fbab6c2aa34af9632c0f035992
- **Health check:** /api/healthcheck
- **Public domain:** Yes

### redis

- **Image:** valkey/valkey:8.1.10-alpine@sha256:081c2f5cb575efc901aa80ff9cdbd1ec6a301682fd35e1ebb4b0990a4a4a8507
- **Start command:** `valkey-server --appendonly yes --protected-mode no`

### db

- **Image:** postgres:16.15@sha256:65b16a8b326e0cfbdf33fa7e783f2a0cb352a61448616ccccfd616ef42aa0f65

## Documentation

# Deploy and Host OpnForm on Railway

OpnForm is an open-source form builder, an alternative to Typeform, Tally and Google Forms: build forms with a
drag-and-drop editor, share them by link or embed them on your site, and collect and export the responses. This
template deploys a complete self-hosted OpnForm with PostgreSQL and a Redis-compatible cache; your admin account is
created from the email you enter and a generated password, so nobody can claim the instance first. It is a
community-maintained template and is not affiliated with the OpnForm project.

## About Hosting OpnForm

OpnForm is a Laravel API (php-fpm), a Nuxt web app, PostgreSQL and Redis, plus a queue worker and a scheduler.
Here the API, worker, scheduler and an nginx front run in one service (`opnform`, the only public one) so they share
one storage volume for uploads; the Nuxt app, PostgreSQL and Valkey (Redis-compatible) stay on Railway's private
network. Forms and responses live in PostgreSQL on a Railway volume.

Stock self-hosted OpnForm lets the first visitor register and become admin, which is a race on a fresh public URL.
This template creates the first user from your email and a generated password before the app starts listening;
after that OpnForm only accepts new users by invitation.

## Common Use Cases

- Contact, feedback, survey and event-registration forms you host yourself
- Lead capture and order forms embedded on your website, with conditional logic and file uploads
- Internal request forms (IT, HR, purchasing) with responses in a shared table and CSV export
- Replacing a paid Typeform or Tally plan while keeping the data in your own database

## Dependencies for OpnForm Hosting

- PostgreSQL 16: included, private, with its own volume
- Valkey 8 (Redis-compatible): included, private, for cache, queue and sessions
- Optional: an SMTP account for email notifications, invitations and password resets
- Optional: an OpenAI API key for AI form generation

### Deployment Dependencies

- OpnForm (AGPL-3.0): https://github.com/JhumanJ/OpnForm
- Template source, wrapper image and tests: https://github.com/youssefsiam38/opnform-railway

### Implementation Details

**First sign-in:** enter your email as `ADMIN_EMAIL` when deploying. When the services are green, copy
`ADMIN_PASSWORD` from the `opnform` service's Variables and sign in at the `opnform` domain. Invite teammates from
the workspace settings (the free community edition allows 2 users).

**What's configured for you:** the official OpnForm API and client images pinned by digest and unmodified; a small
wrapper on the API adding nginx (the upstream ingress config), the queue worker and the scheduler; generated
`APP_KEY`, `JWT_SECRET`, server-to-server secret, admin and database passwords; migrations on every start; a health
check on `/api/healthcheck` (PostgreSQL + Redis); public URLs set from the Railway domain.

**Optional settings** on `opnform`: `MAIL_MAILER=smtp` with `MAIL_HOST`, `MAIL_PORT`, `MAIL_USERNAME`,
`MAIL_PASSWORD`, `MAIL_ENCRYPTION`, `MAIL_FROM_ADDRESS`; `OPEN_AI_API_KEY`; `OPNFORM_ANONYMOUS_TELEMETRY_DISABLED=true`
to opt out of upstream's anonymous usage statistics. If you add a custom domain, update `APP_URL`/`FRONT_URL` on
`opnform` and `NUXT_PUBLIC_APP_URL`/`NUXT_PUBLIC_API_BASE` on `client`.

Tested on a live deployment of this template over HTTPS: admin sign-in, refused sign-up and anonymous API access,
creating a form, an anonymous visitor submitting it, reading the response back, and all of it surviving a redeploy.

## Why Deploy OpnForm 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 OpnForm 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

- [Rocky Linux](https://railway.com/deploy/rocky-linux) — Hosted Rocky Linux 9 workspace with SSH and persistent storage. 🚀
- [Foundry Virtual Tabletop](https://railway.com/deploy/X5tR6G) — A Self-Hosted & Modern Roleplaying Platform
- [Letta Code Remote](https://railway.com/deploy/letta-code-remote) — Run a Letta Code agent 24/7. No inbound ports, just deploy.

Open this page in a browser: https://railway.com/deploy/opnform
