
Deploy SnapOtter
Self-hosted file toolbox: convert and compress images, PDFs and documents
SnapOtter
Just deployed
/data
Redis
Just deployed
/data
Just deployed
/var/lib/postgresql/data
Deploy and Host SnapOtter on Railway
SnapOtter is an open-source (AGPL-3.0) self-hosted file toolbox. In one web app it compresses, resizes, crops and converts images, edits and merges PDFs, converts documents, spreadsheets and presentations, and processes audio and video, with user accounts, teams, API keys and saved pipelines. Files stay on your own server. This template deploys SnapOtter 2.3.0.
About Hosting SnapOtter
SnapOtter 2.x needs a Node.js app server, PostgreSQL for users, settings and file records, Redis for its job queue, and disk space for uploaded and processed files. This template builds the official snapotter/snapotter:2.3.0 image, pinned by digest, from a public GitHub repo, and removes the NVIDIA CUDA libraries (Railway has no GPUs), which brings the image from 8 GB to 3.7 GB so it fits every Railway plan. Railway's Postgres and Redis run next to it on the private network. The admin account is created on the first boot with a generated password, and files, logs and the Python tool environment live on a volume at /data.
Common Use Cases
- Compress, resize and convert photos and screenshots (JPEG, PNG, WebP, AVIF, HEIC) without uploading them to an online service
- Merge, split, compress, rotate and convert PDFs, and convert Word, OpenDocument, spreadsheet and presentation files
- Give a team one private, self-hosted toolbox with accounts, API keys and repeatable pipelines
Dependencies for SnapOtter Hosting
- PostgreSQL (Railway's Postgres service, included)
- Redis (Railway's Redis service, included)
Deployment Dependencies
- SnapOtter: https://github.com/snapotter-hq/SnapOtter (release v2.3.0)
- Official image: https://hub.docker.com/r/snapotter/snapotter (
2.3.0, pinned by digest) - Template source: https://github.com/aalfath/snapotter-railway-template
Implementation Details
Services
| Service | What it does |
|---|---|
SnapOtter (public) | The web app and API on port 1349, with its image, PDF, document and media tools and the background job workers. Health check /api/v1/health. Volume at /data (uploaded and processed files, logs, the Python tool environment and optional AI models). |
Postgres | Railway's PostgreSQL with its own volume. Holds users, teams, settings, file records and job history. |
Redis | Railway's Redis with its own volume. Holds the background job queue, job progress and login throttling. |
After deploying
- Open the
SnapOtterservice's public URL. The first boot takes about a minute while it copies its Python environment to the volume and sets up the database. - Sign in with the user
adminand the password in theDEFAULT_PASSWORDvariable of theSnapOtterservice. SnapOtter asks you to choose a new password on this first sign-in. - Add users, teams and API keys under Settings. Changing
DEFAULT_USERNAMEorDEFAULT_PASSWORDlater has no effect: they are used only to create the first admin.
Variables
| Variable | Default | What it is |
|---|---|---|
DEFAULT_USERNAME | admin | Username of the first admin, created on the first boot only. |
DEFAULT_PASSWORD | generated | Password of the first admin, used once: you choose a new one on the first sign-in. |
DATABASE_URL | reference to Postgres | Database connection over the private network. |
REDIS_URL | reference to Redis | Job-queue connection over the private network (family=0 lets it use Railway's IPv6 network). |
EXTERNAL_URL | https:// + the public domain | The app's public address, used for secure cookies and links. |
PORT | 1349 | Port the app listens on; the public domain points at it. |
The image also sets CONCURRENT_JOBS=1, MAX_WORKER_THREADS=1 and VIPS_CONCURRENCY=1 so small plans don't run out of memory; raise them on larger plans by adding the variables to the SnapOtter service. Product telemetry is off (SNAPOTTER_TELEMETRY=off). Optional features such as SSO (OIDC), S3 storage and upload limits are set with further variables listed in SnapOtter's configuration docs.
Resources. SnapOtter idles at about 360 MB. Image and PDF tools work with 0.5 GB RAM (tested with a 12-megapixel photo), but document, spreadsheet and presentation conversions start LibreOffice and need about 1 GB: on a 0.5 GB plan such a conversion stops the app, which then restarts by itself. Postgres and Redis each need well under 0.5 GB.
Updates. Railway shows an update notice when this template's repository gets a new SnapOtter version. Read CHANGELOG.md first, take a volume backup of the SnapOtter and Postgres services, then apply it: SnapOtter migrates its database on start.
Left out. SnapOtter's optional AI feature bundles (background removal, upscaling, OCR, transcription and more) download 1 to 7 GB each into /data/ai from the app's Settings page and are built for GPUs; they need far more RAM and disk than small plans give, so none are installed. The CUDA libraries are removed, so AI tools you install run on the CPU.
Why Deploy SnapOtter 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 SnapOtter 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.
Template Content
SnapOtter
aalfath/snapotter-railway-templateRedis
redis:8.2