RChat is a semi-anonymous chat app with a layout like Discord. It runs on your own machine. It uses no external services, no email and no tracking.
Browsers: current Chrome, Edge and Firefox. Safari and iOS need version 16.4 or newer.
- Servers with text channels, voice channels, threads, categories and roles
- Direct messages, friends and blocking
- Voice, video and screen share, in channels and in DMs
- P2P contacts, DMs, servers, calls and files, kept on the members' devices
- Replies, mentions, reactions, pins, forwarding, polls and link previews
- Uploads, or a text only mode
- Restricted channels, slow mode, server passwords and invite links
- Moderation, a profanity filter and a site admin panel
- Guests who read public servers without an account, and post or talk where the site and server allow it
- Chat and voice channels that other sites can embed, set up in Server Settings
- Sensitive channels that ask before they open, marked by a manager or on your own device
- Spoilers and hidden previews that show where you click them
- Accounts with no email or phone number
- Search, a command palette, notification settings and settings sync
- Dark and light themes, a PWA, and desktop and mobile apps
- Many instances, each with its own name and identity
You need:
- Rust (stable)
- Bun 1.4 or newer
- just 1.37 or newer
cp .env.local.example .env.local
just src install
just src devOpen http://localhost:3000. The first account you register is the site admin.
just --list src shows every other command (tests, builds, formatting). The recipes are in jfiles/.
- From source:
just src prodbuilds everything and serves it onSERVER_PORT. - Docker:
docker run -p 3000:3000 -v rchat-data:/data ghcr.io/robbyv2/rchat:latest(latestis the newest stable release,weeklythe newest weekly build).docker compose upbuilds the image locally. - Docker Compose with nginx, many copies: put hex passwords (
openssl rand -hex 24) forPOSTGRES_PASSWORDandVALKEY_PASSWORDindeploy/.env, thendocker compose -f deploy/compose.scale.yml up -d(serves on port 8080). - Kubernetes: copy
deploy/k8s/secrets.env.exampletodeploy/k8s/secrets.envand fill it in, replace theREPLACEvalues indeploy/k8s/config.yamlandchat.example.comindeploy/k8s/ingress.yaml, thenkubectl apply -k deploy/k8s.
A proxy in front needs one domain on port 443. It sends every path to SERVER_PORT and passes the WebSocket upgrade for /api/ws and /peerjs.
For indexed channel search on Postgres, install btree_gist and intarray or allow the server to create them.
Never run an older release on a database that a newer release upgraded.
For more load, run many copies of the same image on one Postgres database and one Redis server, and give each copy its roles with RCHAT_ROLES. Set REDIS_URL on every copy and PEERJS_BUILTIN=false, and send /peerjs to one separate PeerJS server (deploy/peer). Both examples above do this. Upgrade all copies together. With WS_SOCKETS_MAX set, run the gateway role on copies of its own: a full copy answers /api/ready with 503.
Settings live in .env.local or in the environment (docker run -e NAME=value). The scaled Compose example reads RCHAT_* values such as RCHAT_PUBLIC_URL from deploy/.env, and Kubernetes reads deploy/k8s/config.yaml. .env.local.example lists every setting with its default and range. These are the ones almost everyone sets:
| Variable | Default | What it does |
|---|---|---|
APP_MODE |
full |
full serves the API and the app. api-only serves only the API. |
HOST |
127.0.0.1 |
The address the server listens on. Use 0.0.0.0 for remote access. |
SERVER_PORT |
3000 |
The public port. |
DATABASE_URL |
rchat.db |
A sqlite file, or a postgres:// URL. |
PUBLIC_URL |
none | The address people open, for example https://chat.example.com. |
INSTANCE_NAME |
RChat |
The name people see for your instance. |
AUTH_REGISTRATION |
open |
Who can sign up with a password: open, sso or closed. Keep it open until your own account exists. |
FEATURE_FILE_UPLOADS |
on |
File uploads to this instance, on or off. |
UPLOAD_MAX_MIB |
25 |
The largest upload in MiB. Raise your proxy's body size limit to match. |
S3_ENDPOINT |
none | Stores uploads in an S3 bucket, with S3_BUCKET, S3_ACCESS_KEY and S3_SECRET_KEY. |
TRUSTED_PROXIES |
none | Proxy addresses to trust for the real client address. Set it behind a proxy. |
Other instances accept this instance's identity assertions only when its public address uses port 443.
Build the apps with just src desktop-build (installers in target/release/bundle/), just src mobile-init android then just src android-build, and just src mobile-init ios then just src ios-sideload (on a Mac). They need the Tauri prerequisites for your platform.
Stable releases and weekly pre-releases (weekly-YYYY-MM-DD, every Monday) are on GitHub Releases. Each release has:
- Windows:
.msiand-setup.exeinstallers. - macOS 11 or newer:
RChat_<version>_universal.dmg. - Linux (glibc 2.35 or newer):
.deband.AppImage, plus.rpmin stable releases. - Android 7.0 or newer:
RChat_<version>_android.apk. - iOS 16.4 or newer: an unsigned developer build,
RChat_<version>_ios_sideload.ipa. - The server:
rchat-server_<version>_<platform>archives (the API alone, forAPP_MODE=api-only) for Linux x86_64 and aarch64 (glibc 2.35 or newer), macOS and Windows x86_64, and the Docker imageghcr.io/robbyv2/rchat. SHA256SUMS.
MIT. See LICENSE.

