---
title: "Deploy Form.io"
description: "Deploy Form.io: form builder and REST API with MongoDB"
category: "Other"
url: https://railway.com/deploy/formio-1
---

# Deploy Form.io

Deploy Form.io: form builder and REST API with MongoDB

**[Deploy Form.io on Railway](https://railway.com/template/formio-1)**

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

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

## Template content

### Form.io https://raw.githubusercontent.com/formio/formio/v4.11.0/portal/public/favicon.png

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

### MongoDB https://devicons.railway.app/i/mongodb.svg

- **Image:** ghcr.io/railwayapp-templates/mongo-ha/mongo:8.0
- **Start command:** `docker-entrypoint.sh mongod --ipv6 --bind_ip ::,0.0.0.0 --setParameter diagnosticDataCollectionEnabled=false`

## Documentation

# Deploy and Host Form.io on Railway

Form.io Community Edition is an open-source form and API platform. You build forms and data resources in a drag-and-drop builder, and each one becomes a REST API that validates and stores its submissions in MongoDB. It includes roles, permissions and user login, and serves forms to any web or mobile app.

## About Hosting Form.io

Hosting Form.io means running its Node.js server, which serves both the admin portal and the API, next to a MongoDB database that holds every form, submission, user and setting. The server needs a MongoDB connection string, a secret for login tokens and a key that encrypts project settings. On the first boot against an empty database it imports the default project and creates the admin account. This template builds Form.io 4.11.1 from a small GitHub wrapper repo, attaches Railway's MongoDB on a volume, generates all secrets and the admin password, and asks you only for the admin email. Updates arrive through the repo.

## Common Use Cases

* Build data-collection forms (signups, surveys, applications, inspections) with a visual builder and store the results
* Give a web or mobile app a form-driven REST API with validation, roles and user accounts
* Self-host form submissions so the data stays in your own database

## Dependencies for Form.io Hosting

* MongoDB (Railway's MongoDB service, data on a volume)
* Form.io server image `formio/formio:4.11.1`, built from the template repo

### Deployment Dependencies

* Form.io Community Edition: https://github.com/formio/formio
* Form.io release notes: https://github.com/formio/formio/blob/main/CHANGELOG.md
* Template repo (Dockerfile, start script, changelog): https://github.com/aalfath/formio-railway-template

### Implementation Details

* **First login:** open the service's public URL and sign in with the `ROOT_EMAIL` you entered and the generated `ROOT_PASSWORD` from the Form.io service's Variables tab. Change the password afterwards under Resources → Admin → View Data. `ROOT_PASSWORD` is only read on the first boot.
* **Secrets:** `JWT_SECRET`, `DB_SECRET` and `ROOT_PASSWORD` are generated. Keep `DB_SECRET` unchanged after the first boot, because it encrypts project settings already stored in MongoDB.
* **Public registration:** like every Form.io install, the default project has a "User Register" form that anonymous visitors can submit to create a basic (non-admin) user. Remove it or change its access in the portal if you don't want sign-ups.
* **Email and file storage:** not set up by default. Configure email or storage providers in the portal if your forms need them.
* **Health check:** the server listens only after MongoDB is connected, and Railway checks `/`.
* **Updates:** new Form.io versions land as commits to the template repo's `main` branch, and Railway shows them as "update available" in your project. Read the repo's CHANGELOG and back up the MongoDB volume before applying a major upgrade.

## Why Deploy Form.io 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 Form.io 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/formio-1
