---
title: "Deploy Paperless-ngx Exporter"
description: "Full archive exports and restores with document_exporter"
category: "Storage"
url: https://railway.com/deploy/deploy-paperless-ngx-document-exporter
---

# Deploy Paperless-ngx Exporter

Full archive exports and restores with document_exporter

**[Deploy Paperless-ngx Exporter on Railway](https://railway.com/template/deploy-paperless-ngx-document-exporter)**

Machine-readable deploy manifest (JSON, validated by TemplateCI): https://railway.com/deploy/deploy-paperless-ngx-document-exporter/manifest.json

- **Creator:** onepush
- **Category:** Storage

## Template content

### paperless-ngx

- **Image:** ghcr.io/paperless-ngx/paperless-ngx:3.3.0
- **Public domain:** Yes

### 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"`

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

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

## Documentation

# Deploy and Host self hosted Paperless-ngx Exporter (Open-Source Document Archive with Full Exports) on Railway

This template runs Paperless-ngx with a clear way to export and restore your whole archive.

## About Hosting Paperless-ngx Exporter open-source software on Railway (self hosted Paperless-ngx backups with document_exporter template)

Paperless-ngx is a GPL-3.0 document management system that OCRs your scans, files them under tags and correspondents, and keeps the originals.

## Why Deploy Paperless-ngx Exporter, the DocuWare alternative on Railway (Railway Free Trial)

DocuWare is a commercial cloud DMS, so if you want a self-hosted archive with an export you can restore yourself, Paperless-ngx on Railway gives you more control and usually a lower bill.

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 Paperless-ngx Exporter 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.

### Railway vs Other Hosting Providers and VPS for Paperless-ngx Exporter self hosting

Paperless-ngx needs a web app, Postgres, Redis and a volume holding every document.

| Provider | What You Get with Railway | What You Get with the Other Provider |
| --- | --- | --- |
| DigitalOcean | The app, Postgres and Redis from one template, with exports pulled off the volume via railway ssh. | A Droplet with root access, but you handle updates, backups and restores. |
| AWS | Managed services wired by environment variables, with no VPC setup for a personal archive. | Finer control over encryption and snapshots, with a steeper learning curve. |
| Hetzner | A hosted stack you can redeploy in a few clicks, with export zips copied off when needed. | Low cost per gigabyte, but you run the OS and backup schedule yourself. |

A VPS suits full server control. Railway suits restoring an archive without server admin.

## Common Use Cases for hosted Paperless-ngx Exporter

- **Nightly zip export copied off-site:** Run document_exporter with -z on a schedule and pull the zip somewhere that is not the Railway volume. A cron job or a Railway scheduled task can do the export, and you copy the result out with your own tool.
- **Migrating from a home server to Railway:** Export from the old Paperless-ngx, then run document_importer against a completely empty new instance. Tags, correspondents, custom fields and notes come across with the documents.
- **Moving between Paperless versions:** Export before a major upgrade so you have a restorable copy if the new version misbehaves. Matching versions on import is the safest route.
- **A portable archive you can read without Paperless:** The export holds the original files plus manifest.json with all the metadata. You can still find and open a document if the app is gone.
- **Restore drills:** Import the latest export into a throwaway instance every few months and open a sample of documents. An export you have never restored is only a hope.

## Dependencies for Paperless-ngx Exporter Docker hosted on Railway

This template runs the Paperless-ngx web app with the services it needs, so an export reads a consistent database.

### Deployment Dependencies for Managed Paperless-ngx Exporter Service (Document Archive Backups)

- **paperless-ngx service:** runs ghcr.io/paperless-ngx/paperless-ngx:3.3.0 on public port 8000, with a volume at /usr/src/paperless/data.
- **Postgres:** stores documents, tags, correspondents and notes, reached through PAPERLESS_DBHOST and related variables.
- **Redis:** the Celery broker for OCR and indexing, set through PAPERLESS_REDIS.
- **Secrets:** PAPERLESS_SECRET_KEY and PAPERLESS_ADMIN_PASSWORD are generated, and database credentials should come from ${{secret()}}.
- **Public URL:** PAPERLESS_URL must be your https domain, or CSRF checks fail.

### Implementation Details for Paperless-ngx Exporter (Using Paperless-ngx official docker image)

Set PAPERLESS_ADMIN_USER to admin, PAPERLESS_ADMIN_MAIL to your address and PAPERLESS_DBENGINE to postgresql.

## How does Paperless-ngx Exporter compare against other ways to back up a document archive

### Paperless-ngx vs DocuWare (Commercial Cloud DMS Alternative)

- **Cost and lock-in:** Paperless-ngx is GPL-3.0 and free, and an export is a folder of originals plus a manifest.json you can read without the app. DocuWare is a paid product that keeps your archive on its platform.
- **Where DocuWare wins:** Enterprise integrations, vendor support contracts and polished scanning workflows suit large offices better than a single-user archive.

### Paperless-ngx vs Mayan EDMS (Open-Source Django EDMS Alternative)

- **Scope:** Mayan EDMS is a heavier enterprise system with a broader workflow engine. Paperless-ngx stays focused on scanned personal and small business paperwork.
- **Where Mayan EDMS wins:** Its approval chains and formal retention rules go deeper if you need records management.
- **Restore story:** Paperless-ngx has one built-in export and import pair, which is simpler to rehearse on a fresh server.

### Paperless-ngx vs Docspell (Open-Source Scala Alternative)

- **Automation style:** Docspell leans toward automated processing pipelines. Paperless-ngx leans toward manual tagging, matching rules and ML auto-tagging.
- **Where Docspell wins:** Its automation handles large batch intake well.
- **Community size:** Paperless-ngx has a much larger community and more third-party mobile apps for odd edge cases.

### Paperless-ngx vs Google Drive (Cloud Storage Alternative)

- **Structure:** Google Drive offers OCR search but no structured metadata like correspondents or custom fields. Paperless-ngx keeps that metadata and exports it alongside the files.
- **Where Google Drive wins:** Sharing, sync and mobile access are far more polished, and you run nothing yourself.
- **Ownership:** Your export is a zip or folder you control and can copy off Railway, while a Drive archive depends on the provider's account and terms.

## How to use Paperless-ngx Exporter (the OSS document management system)?

Run these steps once the stack is up and you have logged in as admin.

1. Open a shell on the paperless-ngx service with railway ssh.
2. Export to a folder on the volume, zipped with -z.
3. List the result to confirm the zip exists and looks the right size.
4. Download it, for example by streaming through railway ssh with tar, or push it to S3 with your own tool.
5. On a fresh instance with empty database and media folders, unpack the zip and run document_importer on the folder.

```
cd /usr/src/paperless/src
document_exporter ../export -z
ls -lh ../export
unzip ../export/export-*.zip -d ../import
document_importer ../import
```

## How to self host Paperless-ngx Exporter on other VPS Services (Paperless-ngx self hosting guide)

This guide runs the same stack on a plain VPS with Docker Compose.

### Clone the Repository

Get the official source and compose file so you track upstream fixes.

```bash
git clone https://github.com/paperless-ngx/paperless-ngx.git
cd paperless-ngx/docker/compose
```

### Install Dependencies

You need Docker and the Compose plugin. Confirm both work before continuing.

```bash
docker --version
docker compose version
```

### Configure Environment Variables

Copy the example env file and set real values. PAPERLESS_URL must be your public https address, or CSRF checks fail.

```bash
cp docker-compose.env.example docker-compose.env
# set PAPERLESS_SECRET_KEY, PAPERLESS_URL=https://your-domain.example.com,
# PAPERLESS_ADMIN_USER and PAPERLESS_ADMIN_PASSWORD
```

### Start the Paperless-ngx Exporter Application

Bring the stack up, then run a first export to confirm the exporter works before you rely on it.

```bash
docker compose up -d
docker compose exec -T webserver document_exporter ../export -z
```

Railway handles the reverse proxy, TLS certificates and volume provisioning for you, which you otherwise set up yourself on a VPS.

## Official Pricing of Paperless-ngx Exporter (Paperless-ngx pricing)

Paperless-ngx is free and open source under GPL-3.0, and the project does not sell an official paid cloud.

## Paperless-ngx Exporter cloud vs self hosted comparison (Pricing, features, costs, and more)

Self hosting means you pay for compute and storage directly, and you own the backup problem too.

### Monthly cost of self hosting Paperless-ngx Exporter on Railway

On Railway, a small personal archive usually lands around $5 to $15 per month. Volume cost grows with document count.

### System Requirements for Hosting Paperless-ngx Exporter on a VPS

Paperless-ngx runs on a Raspberry Pi, but OCR is slow on weak CPUs, so a small modern VPS feels much better.

## Frequently Asked Questions (FAQs)

### What does a document_exporter run contain?

Every original file, plus archived PDFs and thumbnails unless you pass -na or -nt, and a manifest.json holding tags, correspondents, document types, custom fields, notes, users, groups, permissions, saved views and workflows.

### Can I import into a newer Paperless-ngx version?

Often yes, since importing from an older version may work, but matching versions is recommended.

### Does the export include users and permissions?

Yes. Keep the export private because it contains account data.

### How big does the export get?

It scales with your archive, since originals and archived PDFs dominate. Use -z for a single zip. Budget roughly the size of your media folder for each full export.

### Is the passphrase required?

No, it is optional.

### Should I also dump Postgres?

Yes. The export is a logical backup, while a Postgres dump plus the media folder is a physical one. Keep both copies off the Railway volume for the safer habit.


## Similar templates

- [RustFS | (Just Updated) S3 Object Store, Public URL and Keys Set](https://railway.com/deploy/rustfs-or-just-updated-s3-object-store-p) — S3-compatible object store, keys and public URL preset, volume kept
- [TimescaleDB](https://railway.com/deploy/timescaledb-railway-template) — A PostgreSQL-based time-series database for analytics on Railway.
- [Garage S3 Storage](https://railway.com/deploy/garage-s3-storage) — Ultra-light S3 server: fast, open-source, plug-and-play.

Open this page in a browser: https://railway.com/deploy/deploy-paperless-ngx-document-exporter
