# Revolt

Open-source, self-hostable Discord alternative. Revolt provides servers, channels, DMs, voice/video chat, roles, permissions, and a rich client experience — without the proprietary lock-in. The platform rebranded to **Stoat** in early 2026; the codebase and Docker images now live under the `stoatchat` GitHub org, but the project is the same.

**Official site:** https://revolt.chat  
**Self-host repo:** https://github.com/revoltchat/self-hosted (mirrors to stoatchat/self-hosted)

---

## Compatible Combos

| Infra | Runtime | Notes |
|-------|---------|-------|
| Ubuntu VPS | Docker Compose + Caddy | Official stack; recommended |
| Any Linux host | Docker Compose | Custom TLS / reverse proxy setup |

---

## Inputs to Collect

### Phase 1 — Planning
- Public domain (e.g. `chat.example.com`) — required for TLS and client URLs
- Server: ≥2 vCPU, ≥2 GB RAM recommended
- SMTP credentials (optional — for email verification)

### Phase 2 — Deployment
- `secrets.env` (generated by `./generate_config.sh your.domain`)
- `Revolt.toml` — main application configuration

---

## Software-Layer Concerns

### Deployment

```bash
git clone https://github.com/revoltchat/self-hosted revolt
cd revolt
chmod +x ./generate_config.sh
./generate_config.sh your.domain
docker compose up -d
```

### Architecture

| Service | Purpose |
|---------|---------|
| `delta` | REST API server |
| `bonfire` | WebSocket events server |
| `january` | Proxy / metadata server |
| `autumn` | File server (uploads, avatars) |
| `caddy` | TLS termination + reverse proxy |
| `mongodb` | Primary database |
| `redis` | Caching and pub/sub |

### Key Config (`Revolt.toml`)
| Section | Key Options |
|---------|------------|
| `[app]` | App URL, API URL |
| `[database]` | MongoDB URI |
| `[redis]` | Redis URI |
| `[smtp]` | SMTP host/port/credentials for email verification |
| `[features.captcha]` | hCaptcha site key / secret |
| `[features.invite_only]` | Restrict signups to invited users only |
| `[s3]` | Custom S3 backend for file storage |

### Secrets File (`secrets.env`)
Generated by `generate_config.sh` — contains JWT secrets, encryption keys. **Back this up.** Losing it means losing access to all encrypted data on the instance.

---

## Upgrade Procedure

```bash
cd revolt
docker compose pull
docker compose up -d
```

Check the [self-hosted releases](https://github.com/revoltchat/self-hosted/releases) and [notices section](https://github.com/revoltchat/self-hosted#notices) before upgrading — breaking migrations are documented there.

---

## Gotchas

- **Rebranded to Stoat (Feb 2026)**: The project/org moved from `revoltchat` → `stoatchat`. If cloning fresh, use `stoatchat/self-hosted`. Existing `revoltchat/self-hosted` repos redirect.
- **`secrets.env` is critical**: Never delete or regenerate it on an existing instance — all stored data (files, encrypted messages) would become inaccessible.
- **Domain required**: The stack uses Caddy for automatic HTTPS; a valid public domain with DNS pointing to the server is required. LAN-only setups require custom TLS.
- **Video requires extra ports**: `7881/tcp` (WebRTC signaling) and `50000-50100/udp` (media) are needed for voice/video but are intentionally excluded from the Caddyfile (handled separately by LiveKit).
- **Invite-only mode**: Set `invite_only = true` in `Revolt.toml` under `[features]` to prevent open registration.
- **MongoDB version**: Use MongoDB 5.0+ or the specified version in the compose file for compatibility.

---

## References
- GitHub (legacy): https://github.com/revoltchat/self-hosted
- GitHub (current): https://github.com/stoatchat/self-hosted
- Backend repo: https://github.com/revoltchat/backend
- Developer docs: https://developers.stoat.chat/
- Client app: https://app.revolt.chat
