---
title: "Deploy Papermark (No SaaS Keys)"
description: "Open-source DocSend: share PDFs with page-by-page analytics, no SaaS keys"
category: "Other"
url: https://railway.com/deploy/papermark-no-saas-keys
---

# Deploy Papermark (No SaaS Keys)

Open-source DocSend: share PDFs with page-by-page analytics, no SaaS keys

**[Deploy Papermark (No SaaS Keys) on Railway](https://railway.com/template/papermark-no-saas-keys)**

Machine-readable deploy manifest (JSON, validated by TemplateCI): https://railway.com/deploy/papermark-no-saas-keys/manifest.json

- **Creator:** Auromations
- **Category:** Other

## Template content

### Redis https://devicons.railway.app/i/redis.svg

- **Image:** redis:8.2.1
- **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

### papermark https://www.papermark.com/apple-touch-icon.png

- **Image:** ghcr.io/hmseeb/papermark-railway:bb93cfd-r4
- **Health check:** /api/health
- **Public domain:** Yes

### redis-http https://devicons.railway.app/i/redis.svg

- **Image:** hiett/serverless-redis-http:0.0.10

## Buckets

- **papermark-files**

## Documentation

# Deploy and Host Papermark on Railway

Papermark is an open-source alternative to DocSend. Upload a PDF, share it as a link, and see who opened it and how long they spent on every page. This template runs the whole thing on Railway: no Vercel, Trigger.dev, Tinybird or Upstash accounts, and no API keys to collect before your first deploy.

## About Hosting Papermark

Upstream Papermark is built for Vercel plus five hosted services: Trigger.dev for background jobs, Tinybird for analytics, Upstash for Redis and queues, and Vercel Blob or S3 for files. This template builds Papermark from source with small patches so all of that runs inside your Railway project:

- **Background jobs** (rendering PDF pages, notifications, exports) run inside the Papermark service.
- **Page analytics** are stored in the same Postgres database.
- **Redis** sits behind serverless-redis-http, the REST proxy Upstash publishes for plain Redis.
- **Documents** go to a private Railway bucket and are served through short-lived signed URLs.

You sign in with an admin email and a generated password, so the app works before you configure any email provider.

## Common Use Cases

- Send a pitch deck to investors and see which slides they read and for how long
- Share sales proposals and contracts with a tracked link instead of an email attachment
- Publish a PDF behind a link you can turn off at any time

## Dependencies for Papermark Hosting

- Postgres (app data and page analytics)
- Redis plus serverless-redis-http (rate limits, viewer sessions, upload locks)
- A Railway bucket (uploaded documents and rendered pages)

### Deployment Dependencies

- Upstream source: https://github.com/papermark/papermark
- Image source and patches: https://github.com/hmseeb/papermark-railway
- Optional: a [Resend](https://resend.com) API key and a verified sender domain for email sign-in links, viewer verification and view notifications

### Implementation Details

**First sign-in.** The deploy form asks for `ADMIN_EMAIL`. After the deploy finishes, open the Papermark service's public URL, type that email, and type the value of `ADMIN_PASSWORD`. Copy it from the papermark service's Variables tab; it is generated per deploy. Your team is created on first sign-in.

**Sharing a document.** Upload a PDF on the Documents page. Pages are rendered in the background, and the upload bar shows the progress. Then create a link and send it. Each visit records time spent per page, and the document page shows the results.

**Email (optional).** Set `RESEND_API_KEY` and `EMAIL_FROM` (for example `Papermark `, on a domain you verified in Resend), then redeploy. That turns on email sign-in links for other users, viewer email verification and notifications. Anyone with an email address can then sign up, so leave email unset if only you should have access. Delete `ADMIN_PASSWORD` to turn password sign-in off once email works.

**Google sign-in (optional).** Set `GOOGLE_CLIENT_ID` and `GOOGLE_CLIENT_SECRET`, with the redirect URI `https:///api/auth/callback/google`.

**Custom domain.** Add it under the papermark service's Settings, set `APP_HOST` to the bare hostname (for example `docs.example.com`), and redeploy. Links you create afterwards use the new domain. Share links from a domain you own rather than the default `*.up.railway.app` address.

**Limits you should know about:**
- This is Papermark's free plan, as upstream ships it for self-hosting: 50 documents, 50 links and 1 user per team. Uploads accept PDFs, spreadsheets and images. Data rooms, Office files, custom domains on links and team members are paid features that upstream gates by plan, and this template leaves those gates alone.
- The image is pinned to upstream commit `bb93cfd` (April 2026), the newest commit that builds from the public repository. Later upstream commits import modules that were never published.
- Background jobs run in memory. A job still waiting when the service restarts (for example a delayed notification) is dropped. The daily cleanup of expired exports does not run.
- Bulk ZIP downloads and AI features need AWS Lambda and OpenAI and are not wired up.

**Troubleshooting**
- *Boot log says a `NEXT_PRIVATE_UPLOAD_*` variable is empty:* Railway occasionally fails to resolve bucket references on a template's first deploy. Open the papermark service's Variables, re-save each `NEXT_PRIVATE_UPLOAD_*` and `NEXT_PRIVATE_ARCHIVE_BUCKET` variable unchanged, then redeploy.
- *"Wrong email or password":* the email must equal `ADMIN_EMAIL` (case does not matter) and the password must equal `ADMIN_PASSWORD` exactly.
- *Upload bar stays on "Converting document":* check the papermark logs for `[trigger-shim]` lines. Each page is logged as it renders.

**Upgrading.** Change the papermark service's image tag when a new `ghcr.io/hmseeb/papermark-railway` tag is published. Migrations run on boot.

## Why Deploy Papermark 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 Papermark 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/papermark-no-saas-keys
