Skip to content

About

No description, website, or topics provided.

Resources

Stars

49 stars

Watchers

4 watching

Forks

Repository files navigation

Automerge Repo Sync Server

A very simple automerge-repo synchronization server. It pairs with the websocket client protocol found in @automerge/automerge-repo-network-websocket.

The server is an unsecured Express app. It is partly for demonstration purposes but it's also a reasonable way to run a public sync server.

Running the sync server

npx @automerge/automerge-repo-sync-server

Or you can run it locally:

pnpm i
pnpm start

The server is configured with environment variables. There are two options:

  • PORT - the port to listen for websocket connections on
  • DATA_DIR - the directory to store saved documents in

Running in Docker

Run in docker using image hosted by GitHub container registry:

docker run -d --name syncserver -p 3030:3030 ghcr.io/automerge/automerge-repo-sync-server:main

cleanup after:

docker stop syncserver
docker rm syncserver

Publishing releases

Publishing a GitHub release triggers .github/workflows/release.yaml, which installs locked dependencies, runs the tests, and publishes to npm using trusted publishing.

Contributors

Originally written by @pvh.

About

No description, website, or topics provided.

Resources

Stars

49 stars

Watchers

4 watching

Forks

Releases

Packages

Used by

Contributors

Languages