Skip to content

Overview

This guide shows you how to install, configure and operate your own go-ricochet server. There is no public Ricochet server, so running one is how you and your users get in.

go-ricochet is a store-and-forward server for libp2p networks. Clients connect to it over libp2p, leave data for peers who are offline, and collect what was left for them when they come back. It works like an email MX server: the server holds mail until the recipient picks it up.

It stores:

  • Mailboxes: folders of messages addressed to a peer, with IMAP-style flags. Private, shared and public types.
  • Documents: key-value documents with ETags, conditional writes and merge-patch.
  • Feeds: append-only feeds, optionally open to appends from any peer.
  • Collections: keyed JSON items you can query.
  • Directory: listings that peers publish about themselves and that any peer can search.

It also pushes notifications to clients: over a direct stream for private mailboxes, and over GossipSub for shared and public ones.

Besides serving its own protocols, every server is a full libp2p node:

Role Default Page
Circuit Relay v2 service: relays traffic for peers behind NATs on NAT traversal & relay
Kademlia DHT in server mode, for peer routing on, always DHT & bootstrap peers
GossipSub host: push notifications, presence, service discovery on, always Service discovery
Relay for GossipSub topics it does not use itself off until you list topics Relayed GossipSub topics

The only transport is UDX, a reliable transport over UDP. Clients reach the server at a multiaddr such as /ip4/203.0.113.10/udp/55223/udx/p2p/12D3KooW.... See Transport.

  • The ricochet binary. Release builds exist for Linux, macOS and Windows, plus .deb packages for Debian and Ubuntu. You can also build it with Go 1.25.7 or later. See Install.
  • PostgreSQL 14 or later. All state lives in PostgreSQL. The server does not create its schema; you load schema.sql once. See Database setup.
  • One open UDP port, 55223 by default, reachable by your clients.
  • A data directory for the server’s identity key, unless you supply the key another way. See Identity keys.

The server has no memory setting. It bounds work instead: connections, requests in flight, database pool size and the mailbox cache. Memory follows from those.

Settings come from three layers, each overriding the one before:

  1. A preset: built-in defaults, or --development, --production or --high-capacity. See Presets.
  2. A YAML file: --config, or /etc/ricochet/config.yaml when it exists.
  3. Command-line flags, and RICOCHET_PG_PASSWORD for the database password (applied before the flags).

A key the file leaves out keeps the preset’s value. A file that cannot be read or parsed, or that holds a key the server does not know, stops the server at startup. The full key list is in config.yaml, and every flag is in CLI flags.

Get running

Capacity

Networking

Security

Operations

If you are building an app against a server, start with the Developer guide instead.