Deploy CouchDB

CouchDB 3.5 document database with Fauxton, a generated admin and a volume

Deploy CouchDB

Just deployed

/opt/couchdb/data

Deploy and Host CouchDB on Railway

Apache CouchDB is an open-source document database that stores JSON documents and serves them over a plain HTTP API. It replicates between servers and devices, so apps built with PouchDB or other CouchDB-compatible clients can work offline and sync later. It ships with Fauxton, a web admin interface.

About Hosting CouchDB

Hosting CouchDB means running the database server with an admin account, keeping its data directory on persistent storage, and finishing the single-node setup that creates the _users and _replicator system databases. This template runs the official CouchDB 3.5.3 image pinned by digest. It creates the admin from a generated password, finishes single-node setup on first start and keeps the data on a Railway volume. Railway's health check uses /_up. Everything else needs a login: anonymous users can't list or create databases, sign up in _users, or read and write documents. CORS for browser and PouchDB clients is off unless you list allowed origins.

Common Use Cases

  • Sync backend for offline-first web and mobile apps built with PouchDB
  • Self-hosted sync server for Obsidian LiveSync and other CouchDB-based tools
  • JSON document store with an HTTP API, views and Mango queries for small and medium apps

Dependencies for CouchDB Hosting

  • A Railway volume mounted at /opt/couchdb/data (created by the template)
  • The official couchdb Docker image (3.5.3)

Deployment Dependencies

Implementation Details

  • Login: open https://YOUR-DOMAIN.up.railway.app/_utils/ for Fauxton. The username is COUCHDB_USER (default admin), and the password is the generated COUCHDB_PASSWORD on the CouchDB service's Variables tab.
  • Changing the password: change COUCHDB_PASSWORD and redeploy. The new value replaces the old one on the next start.
  • Other services on Railway can connect over the private network with http://${{CouchDB.COUCHDB_USER}}:${{CouchDB.COUCHDB_PASSWORD}}@${{CouchDB.RAILWAY_PRIVATE_DOMAIN}}:5984.
  • CORS: to let browser apps connect directly, set COUCHDB_CORS_ORIGINS to a comma-separated list of origins, for example https://app.example.com, and redeploy. Prefer exact origins over *.
  • Config persistence: changes made in Fauxton's Configuration page or through /_node/_local/_config (extra server admins, for example) are saved on the volume and survive redeploys. A setting changed there takes precedence over the template's variables. The one exception is the main admin's password, which always follows COUCHDB_PASSWORD on each start.
  • This is a single-node server. Back up important data with replication to a second CouchDB server.

Why Deploy CouchDB 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 CouchDB 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

More templates in this category

View Template
RustFS | (Just Updated) S3 Object Store, Public URL and Keys Set
S3-compatible object store, keys and public URL preset, volume kept

SuperSlowSloth
0
View Template
TimescaleDB
A PostgreSQL-based time-series database for analytics on Railway.

Rakit
1
View Template
NEW
Neo4j 2026.10 Community
Neo4j graph database with APOC, Browser, Bolt TCP proxy and a volume

My Projects
0