---
title: "Deploy OpnForm"
description: "OpnForm 2.8.4: open-source form builder, self-hosted Typeform alternative"
category: "Other"
url: https://railway.com/deploy/opnform-1
---

# Deploy OpnForm

OpnForm 2.8.4: open-source form builder, self-hosted Typeform alternative

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

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

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

## Template content

### Redis https://cdn.sanity.io/images/sy1jschh/production/0ce0bfdcfbdbf69662b1116671f97c2dd788b655-157x157.svg

- **Image:** redis:8.2
- **Start command:** `/bin/sh -c "rm -rf $RAILWAY_VOLUME_MOUNT_PATH/lost+found/ && exec docker-entrypoint.sh redis-server --requirepass $REDIS_PASSWORD --save 60 1 --dir $RAILWAY_VOLUME_MOUNT_PATH"`

### OpnForm https://cdn.jsdelivr.net/gh/homarr-labs/dashboard-icons/png/opnform.png

- **Source:** https://github.com/aalfath/opnform-railway-template
- **Health check:** /api/healthcheck
- **Public domain:** Yes

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

- **Image:** ghcr.io/railwayapp-templates/postgres-ssl:18

### opnform-client https://cdn.jsdelivr.net/gh/homarr-labs/dashboard-icons/png/opnform.png

- **Source:** https://github.com/aalfath/opnform-railway-template
- **Health check:** /login

## Documentation

# Deploy and Host OpnForm on Railway

OpnForm is an open-source form builder, a self-hosted alternative to Typeform and Google Forms. You build forms in a drag-and-drop editor, share them as links or embeds, and collect submissions with conditional logic, file uploads, webhooks and integrations. It runs as a Laravel API with a Nuxt front end.

## About Hosting OpnForm

Self-hosting OpnForm means running several parts together: the Laravel API on PHP-FPM, a queue worker and a scheduler for background jobs (notifications, exports, cleanups), the Nuxt server-side rendered front end, PostgreSQL for forms and submissions, Redis for cache, sessions and the job queue, and a reverse proxy that sends `/api` to Laravel and everything else to the front end. Uploaded files and OAuth keys need persistent storage, and the app needs its public URL and matching secrets on both the API and the front end. This template wires all of that up, generates the secrets, runs database migrations on start and keeps uploads on a volume.

## Common Use Cases

* Contact, feedback, registration and order forms for a website or product, embedded or shared as a link
* Surveys and questionnaires with conditional logic, kept on your own infrastructure
* Internal request forms that send submissions to email, Slack, Discord or webhooks

## Dependencies for OpnForm Hosting

* PostgreSQL (Railway's PostgreSQL service, included)
* Redis (Railway's Redis service, included)

### Deployment Dependencies

* OpnForm source and releases: https://github.com/OpnForm/OpnForm/releases (this template runs 2.8.4)
* Docker self-hosting guide: https://docs.opnform.com/deployment/docker
* Environment variables: https://docs.opnform.com/configuration/environment-variables
* Template repository: https://github.com/aalfath/opnform-railway-template

### Implementation Details

The template has four services:

* **OpnForm** (public): the official `jhumanj/opnform-api` image with Caddy as the front proxy. It runs PHP-FPM, the queue worker and the scheduler in one container so they share the storage volume at `/usr/share/nginx/html/storage`.
* **opnform-client** (private): the official `jhumanj/opnform-client` Nuxt image, reached over Railway's private network.
* **Postgres** and **Redis**.

No values are needed at deploy time: `APP_KEY`, `JWT_SECRET` and the shared API secret are generated, and the URLs come from the service's Railway domain.

After the deploy finishes, open the public URL. OpnForm sends you to a setup page to create the admin account. After that, public sign-up is closed and you invite other users from the admin account. OpnForm's free self-hosted edition allows 2 users; an Enterprise license from OpnForm raises the limit.

To send emails (invitations, password resets, submission notifications), add SMTP variables to the OpnForm service: `MAIL_MAILER=smtp`, `MAIL_HOST`, `MAIL_PORT`, `MAIL_USERNAME`, `MAIL_PASSWORD`, `MAIL_ENCRYPTION` and `MAIL_FROM_ADDRESS`. Until then, emails are only written to the logs.

If you add a custom domain, set `APP_URL` and `FRONT_URL` on OpnForm and `NUXT_PUBLIC_APP_URL` and `NUXT_PUBLIC_API_BASE` (the domain followed by /api) on opnform-client to the new address.

Updates: the services build from the template's GitHub repository. When a new OpnForm version is pinned there, Railway shows an update for your project; read the repository's CHANGELOG.md before applying it.

## 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) — Self-hosted virtual tabletop for role-playing games (license required)
- [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-1
