Stoat is a free, open source data security & privacy project written in Rust and released under a custom open-source licence. It has 3,439 GitHub stars, 408 forks and 139 open issues, and was last pushed 29 hours ago. On this registry it ranks #12 of 26 tracked projects in Data Security & Privacy, with 5 head-to-head comparisons available. It gained 73 stars over the last 30 tracked days.

What is Stoat?

What it is

Stoat is a Rust backend project that provides the services and libraries powering the Stoat group chat service. The repository is organized around core crates for configuration, database implementation, files, API models, permissions, presence, result types, and a coalesced crate.

The concrete problem it solves is the backend plumbing for a chat service that needs to represent API data, enforce permission rules, track user presence, store files, and persist state. The project lives in the Rust, Revolt, and Stoat chat ecosystem, with topics that point to MongoDB and Redis as supporting services.

Key capabilities

  • The core config crate provides configuration handling for the backend services.
  • The core database crate implements database access for persistent service state.
  • The backend stack includes MongoDB and Redis as indicated by the topics.
  • The core files crate contains S3 and encryption subroutines for file handling.
  • The core models crate defines API models for the service.
  • The core permissions crate contains permission logic for access control.
  • The core presence crate tracks user presence, while the core result crate defines result and error types.

Who uses it and how

  • Operators running Stoat use the repository as the backend layer for the service rather than as a standalone client application.
  • Developers building clients can use the API models and permission logic to understand how the backend represents chat data and access decisions.
  • Teams deploying the stack can connect the backend to MongoDB for persistent data and Redis as an indicated supporting service.
  • Operators who need file storage can use the S3 and encryption subroutines in the files crate as part of their deployment.
  • Contributors can work with the separate core crates to change configuration, database behavior, presence, permissions, or error handling without replacing the whole service.

Getting started

The README excerpt identifies the project as a set of Rust crates under paths such as crates/core/config, crates/core/database, crates/core/files, crates/core/models, crates/core/permissions, crates/core/presence, crates/core/result, and crates/core/coalesced. It does not provide Docker image names, package-manager install commands, or a hosted option in the supplied text.

When to use it — and when not to

Use Stoat when you need a Rust backend for the Stoat chat service and you can operate the supporting services implied by the topics and crates, including MongoDB, Redis, and S3 storage. Do not choose it if you need a documented one-command deployment, a clear license, or a hosted option, because the provided facts show a NOASSERTION license, zero contributors, 139 open issues, and no install or Docker instructions. The project is better suited to operators and contributors who can work from source and validate the current state of the repository.

project readme (upstream, from github) — read inline

Stoat Backend

Stars Forks Pull Requests Issues Contributors License

The services and libraries that power the Stoat service.

Crate Path Description
core/config crates/core/config Core: Configuration Crates.io Version Crates.io Version Crates.io Version Crates.io License
core/database crates/core/database Core: Database Implementation Crates.io Version Crates.io Version Crates.io Version Crates.io License
core/files crates/core/files Core: S3 and encryption subroutines Crates.io Version Crates.io Version Crates.io Version Crates.io License
core/models crates/core/models Core: API Models Crates.io Version Crates.io Version Crates.io Version Crates.io License
core/permissions crates/core/permissions Core: Permission Logic Crates.io Version Crates.io Version Crates.io Version Crates.io License
core/presence crates/core/presence Core: User Presence Crates.io Version Crates.io Version Crates.io Version Crates.io License
core/result crates/core/result Core: Result and Error types Crates.io Version Crates.io Version Crates.io Version Crates.io License
core/coalesced crates/core/coalesced Core: Coalescion service Crates.io Version Crates.io Version Crates.io Version Crates.io License
delta crates/delta REST API server License
bonfire crates/bonfire WebSocket events server License
services/january crates/services/january Proxy server License
services/gifbox crates/services/gifbox Tenor proxy server License
services/autumn crates/services/autumn File server License
daemons/crond crates/daemons/crond Timed data clean up daemon server License
daemons/pushd crates/daemons/pushd Push notification daemon server License

Minimum Supported Rust Version

Rust 1.86.0 or higher.

Development Guide

Before contributing, make yourself familiar with our contribution guidelines and the technical documentation for this project.

Before getting started, you'll want to install:

  • mise
  • Docker
  • Git
  • mold (optional, faster compilation)

A default.nix is available for Nix users! Run nix-shell to activate mise.

As a heads-up, the development environment uses the following ports:

Service Port
MongoDB 27017
Redis 6379
MinIO 14009
Maildev 14025
14080
Revolt Web App 14701
RabbitMQ 5672
15672
crates/delta 14702
crates/bonfire 14703
crates/services/autumn 14704
crates/services/january 14705
crates/services/gifbox 14706

Now you can clone and build the project:

git clone https://github.com/stoatchat/stoatchat stoat-backend
cd stoat-backend
mise install
mise build

[!TIP] You can override BUILDER in your .env file to run cargo with mold if you installed it:

# .env
BUILDER = "mold --run cargo"

A default configuration Revolt.toml is present in this project that is suited for development.

If you'd like to change anything, create a Revolt.overrides.toml file and specify relevant variables.

[!TIP] Use Sentry to catch unexpected service errors:

# Revolt.overrides.toml
[sentry]
api = "https://abc@your.sentry/1"
events = "https://abc@your.sentry/1"
files = "https://abc@your.sentry/1"
proxy = "https://abc@your.sentry/1"

[!TIP] If you have port conflicts on common services, you can try the following:

# compose.override.yml
services:
  redis:
    ports: !override
      - "14079:6379"

  database:
    ports: !override
      - "14017:27017"

  rabbit:
    ports: !override
      - "14072:5672"
      - "14672:15672"

With the corresponding Revolt configuration:

#     Revolt.overrides.toml
# and Revolt.test-overrides.toml
[database]
m
redis = "redis://127.0.0.1:14079/"

[rabbit]
port = 14072

And mise configuration

#.env
DATABASE_PORT = "14017"
RABBIT_PORT = "14072"
REDIS_PORT = "14079"

Then continue:

cp livekit.example.yml livekit.yml

mise start

You can start a web client by doing the following in another terminal:

# if you do not have yarn yet and have a modern Node.js:
corepack enable

# clone the web client and run it:
git clone --recursive https://github.com/stoatchat/for-web stoat-web
cd stoat-web
# refer to stoat-web/README.md for startup, creating an account and loging in

When signing up, go to http://localhost:14080 to find confirmation/password reset emails.

To stop all services, hit (CTRL + c) in the terminal you ran mise start and run mise docker:stop

Deployment Guide

Cutting new crate releases

Begin by bumping crate versions:

just patch # 0.0.X
just minor # 0.X.0
just major # X.0.0

Then commit the changes to package files.

Proceed to publish all the new crates:

just publish

Cutting new binary releases

Tag and push a new release by running:

just release

If you have bumped the crate versions, proceed to GitHub releases to create a changelog.

Testing

First, start the required services:

docker compose up -d

Now run tests for whichever database:

TEST_DB=REFERENCE cargo nextest run
TEST_DB=MONGODB cargo nextest run

License

The Stoat backend is generally licensed under the GNU Affero General Public License v3.0.

Individual crates may supply their own licenses!

Frequently asked questions

Is Stoat free to use?

Stoat is open source. There is no licence fee and no seat count — you can self-host it or, where the project offers one, pay a vendor for a managed version instead.

What does Stoat do?

Group chat for friends and communities, without the baggage

What is Stoat written in?

Stoat is primarily written in Rust. Its source is publicly available at https://github.com/stoatchat/stoatchat, and it has 3,439 GitHub stars.