---
title: "Deploy eweser-db"
description: "Self-host your personal database"
category: "Storage"
url: https://railway.com/deploy/eweser-db
---

# Deploy eweser-db

Self-host your personal database

**[Deploy eweser-db on Railway](https://railway.com/template/eweser-db)**

- **Creator:** Jacob Cohen-Rosenthal's Projects
- **Category:** Storage
- **Total deploys:** 11

## Template content

### ewe-note

- **Source:** https://github.com/eweser/eweser-db
- **Public domain:** Yes

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

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

### auth-pages

- **Source:** https://github.com/eweser/eweser-db
- **Public domain:** Yes

### sync-server

- **Source:** https://github.com/eweser/eweser-db
- **Public domain:** Yes

### aggregator

- **Source:** https://github.com/eweser/eweser-db
- **Public domain:** Yes

### auth-api

- **Source:** https://github.com/eweser/eweser-db
- **Public domain:** Yes

## Documentation

# Deploy and Host eweser-db on Railway

eweser-db is a local-first, user-owned database stack built on Yjs CRDTs. It lets developers build real-time, offline-capable apps where users own their data instead of being locked into a single platform. This Railway template deploys the full stack: auth API, auth pages, sync server, aggregator, note app, and PostgreSQL.

## About Hosting eweser-db

Hosting eweser-db means deploying the core services that make local-first sync and self-hosted user data possible. On Railway, that includes the auth API, auth pages, Hocuspocus-based sync server, aggregator, note app, and PostgreSQL. The frontend apps connect to the auth and sync services, while the aggregator indexes server-side data for search and discovery. Because this is a monorepo, each Railway service points at the same repository but uses its own Dockerfile and environment variables. Railway handles deployment, networking, restarts, and scaling, while you keep control over the infrastructure and user data.

## Common Use Cases

- Self-hosting a user-owned backend for notes, documents, and collaborative apps
- Building offline-first apps with real-time sync across devices
- Launching interoperable apps that share data over strongly typed Yjs documents

## Dependencies for eweser-db Hosting

- PostgreSQL for auth and server-side application data
- Railway service variables and secrets for auth, sync, and cross-service URLs

### Deployment Dependencies

- [Railway Template Deploy Link](https://railway.com/deploy/JPbli2)
- [Yjs](https://github.com/yjs/yjs)
- [Hocuspocus](https://tiptap.dev/docs/hocuspocus/introduction)
- [Railway](https://railway.com/)
- [eweser-db Repository](https://github.com/eweser/eweser-db)

### Implementation Details

Each Railway service in this template uses the same monorepo root and selects its own Dockerfile via `RAILWAY_DOCKERFILE_PATH`.

```env
RAILWAY_DOCKERFILE_PATH=packages/auth-server-hono/Dockerfile
RAILWAY_DOCKERFILE_PATH=packages/sync-server/Dockerfile
RAILWAY_DOCKERFILE_PATH=packages/aggregator/Dockerfile
RAILWAY_DOCKERFILE_PATH=packages/ewe-note/Dockerfile
RAILWAY_DOCKERFILE_PATH=packages/auth-pages/Dockerfile
Core cross-service environment variables include:
DATABASE_URL=${{Postgres.DATABASE_URL}}
SYNC_AUTH_SECRET=${{auth-api.SYNC_AUTH_SECRET}}
SYNC_SERVER_URL=wss://sync-server-${{RAILWAY_PUBLIC_DOMAIN}}
AUTH_SERVER_URL=https://${{RAILWAY_PUBLIC_DOMAIN}}
```

## Why Deploy eweser-db 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 eweser-db 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

- [Garage S3 Storage](https://railway.com/deploy/garage-s3-storage) — Ultra-light S3 server: fast, open-source, plug-and-play.
- [Redis](https://railway.com/deploy/redis-1) — Self Host Latest Redis with Railway
- [EasyImg](https://railway.com/deploy/easyimg) — Simple self-hostable Nuxt.js personal image hosting system.

Open this page in a browser: https://railway.com/deploy/eweser-db
