---
title: "Deploy DocuSeal | Signed Documents That Survive a Redeploy, Pinned"
description: "Self-host DocuSeal on Railway — signed documents on a volume, pinned."
category: "Automation"
url: https://railway.com/deploy/docuseal-or-signed-documents-that-surviv
---

# Deploy DocuSeal | Signed Documents That Survive a Redeploy, Pinned

Self-host DocuSeal on Railway — signed documents on a volume, pinned.

**[Deploy DocuSeal | Signed Documents That Survive a Redeploy, Pinned on Railway](https://railway.com/template/docuseal-or-signed-documents-that-surviv)**

Machine-readable deploy manifest (JSON, validated by TemplateCI): https://railway.com/deploy/docuseal-or-signed-documents-that-surviv/manifest.json

- **Creator:** Templates Guru
- **Category:** Automation

## Template content

### DocuSeal

- **Image:** docuseal/docuseal:3.3.0
- **Health check:** /up
- **Public domain:** Yes

### Postgres

- **Image:** postgres:17.11-alpine

## Documentation

# Deploy and Host DocuSeal on Railway

DocuSeal, the open-source alternative to DocuSign, with its documents on a volume so that uploaded templates and signed PDFs survive a redeploy. Pinned, with Postgres on the private network.

Nothing to fill in. Open the domain and create the first account.

## About Hosting DocuSeal

Two services:

- **DocuSeal** `3.3.0`: the app, the signing pages and the API, with a volume at `/data/docuseal` for uploaded and signed documents (public)
- **Postgres 17**: accounts, templates and submissions, on its own volume and on the private network only

Upload a PDF, place the fields, and send it for signature by link or email.

## Common Use Cases

- **Contracts and agreements** signed online, with an audit trail stored on your own server.
- **Onboarding paperwork** for employees or customers, filled in and signed from a link.
- **Signing inside your product** through DocuSeal's API and embeddable signing form.

## Dependencies for DocuSeal Hosting

### Deployment Dependencies

- DocuSeal `docuseal/docuseal:3.3.0` (AGPL-3.0), the official image
- Postgres `postgres:17.11-alpine`

### Implementation Details

- **Documents are on a volume.** DocuSeal stores every uploaded template and every signed PDF on local disk under its working directory, `/data/docuseal/attachments`. The common DocuSeal template has no volume at all, so each redeploy deletes every document while the database still lists them. Here a volume is mounted at `/data/docuseal`.
- **No database password in the image.** The common template's Dockerfile builds `DATABASE_URL` from build arguments, which writes the Postgres password into the image layers. Here the official image is used as is and the connection string is a runtime variable.
- **Pinned**, rather than `latest`, so a redeploy does not upgrade DocuSeal and migrate its database unannounced.
- **A long enough health check.** On a single vCPU the first start, which loads DocuSeal's schema into an empty database, took about four and a half minutes, nearly all of Railway's default five; the window here is fifteen.
- **Links point at the real domain.** `APP_URL` and `HOST` follow the public domain, so links in emails and in the API open the right site.

### Configuration

`SECRET_KEY_BASE` and the Postgres password are generated. To send signing requests by email, configure SMTP in DocuSeal's settings after the first sign-in. To store documents in S3 instead of the volume, set `S3_ATTACHMENTS_BUCKET` and the `AWS_*` variables from DocuSeal's documentation.

### Verification

Deployed from this template into an empty project, both services starting at once: live in under two minutes, `/up` answers 200 and the domain opens DocuSeal's first-run setup. Built with DocuSeal capped at 0.5 GB and 1 vCPU, it started within the limit using about 0.17 GB. That uploads land on the volume follows from DocuSeal's storage configuration (`root: $WORKDIR/attachments`, `WORKDIR=/data/docuseal`); an upload and a redeploy were not part of testing.

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

- [N8N Main + Worker](https://railway.com/deploy/n8n-main-worker) — Deploy and Host N8N with Inactive worker.
- [Evolution API with n8n](https://railway.com/deploy/evolution-api-with-n8n) — Automate WhatsApp workflows with Evolution API, n8n, and Postgres.
- [Postgres Backup](https://railway.com/deploy/postgres-s3-backups) — Cron-based PostgreSQL backup to bucket storage

Open this page in a browser: https://railway.com/deploy/docuseal-or-signed-documents-that-surviv
