Deploy Hocuspocus | (Just Updated) Yjs Collaboration Server, Token Auth and Storage Included

Yjs realtime collaboration server, token auth and storage generated

Deploy Hocuspocus | (Just Updated) Yjs Collaboration Server, Token Auth and Storage Included

Just deployed

/data

Deploy and Host Hocuspocus on Railway

Hocuspocus is the open-source Yjs collaboration backend from the Tiptap team. This template deploys a ready-to-use Hocuspocus 4.7 server: editors and agents connect over WebSocket, sync Yjs documents in real time, and documents persist on a volume. The access token is generated for you, so nothing needs filling in.

About Hosting Hocuspocus

The image is a small wrapper (source: github.com/bon5co/hocuspocus-railway) around the official @hocuspocus/server package, pinned by digest. It adds what a hosted server needs: token authentication on every connection, SQLite persistence of each document under /data, and a /health endpoint. It runs as a single process.

Why Deploy Hocuspocus on Railway?

  • No manual step: the token is generated, port and health path are wired up.
  • Public HTTPS and WSS endpoint out of the box.
  • Documents survive redeploys because the volume is already mounted.
  • Connections are authenticated from the first message.

Common Use Cases

  • Real-time collaborative text editors built on Tiptap, ProseMirror, Quill or Monaco.
  • Shared state between AI agents and humans in the same document.
  • Multiplayer whiteboards, notes and forms built on Yjs.
  • Self-hosted replacement for Liveblocks or Tiptap Cloud collaboration.

Dependencies for Hocuspocus Hosting

Deployment Dependencies

Machine-readable contract

service: hocuspocus
base_url: https://
health: GET /health -> 200 {"status":"ok","documents":N}
websocket: wss:///   (HocuspocusProvider option token = HOCUSPOCUS_TOKEN; document name = provider name)
credential_variables:
  HOCUSPOCUS_TOKEN  (wrong token -> authentication failed)
optional_variables:
  HOCUSPOCUS_DB     (SQLite path, default /data/hocuspocus/db.sqlite)
volume: /data

Check health:

curl https:///health

Connect a client:

import { HocuspocusProvider } from "@hocuspocus/provider";
import * as Y from "yjs";
const doc = new Y.Doc();
new HocuspocusProvider({ url: "wss://", name: "my-document", document: doc, token: "" });
doc.getText("t").insert(0, "hello");

Template Content

More templates in this category

View Template
Celery | Web, Worker and Scheduler as Three Services
Web, worker and scheduler wired up: Celery on Redis, outcomes in Postgres.

Templates Guru
0
View Template
Redpanda
Redpanda 26.2: Kafka-compatible streaming, single node, with Kafbat UI.

Agaz Self-Host
0
View Template
smoothmq
A drop-in replacement for AWS SQS

poundifdef
7