5 Commits

Author SHA1 Message Date
Declan Chidlow
fee288fc19 chore: update many references to Revolt to reference Stoat 2026-02-16 13:31:32 +08:00
Declan Chidlow
88838c350f chore: move to latest images 2026-02-16 13:25:45 +08:00
stoat-tofu[bot]
340484159e chore: modify .github/workflows/validate-pr-title.yml 2025-11-14 20:25:00 +00:00
Declan Chidlow
31ff9e81c0 chore: move to latest stoat stuff 2025-10-06 09:59:17 +08:00
Declan Chidlow
1a426356b5 docs: Switch name to Stoat 2025-10-06 09:03:07 +08:00
5 changed files with 96 additions and 51 deletions

20
.github/workflows/validate-pr-title.yml vendored Normal file
View File

@@ -0,0 +1,20 @@
name: "Lint PR"
on:
pull_request_target:
types:
- opened
- reopened
- edited
- synchronize
jobs:
main:
name: Validate PR title
runs-on: ubuntu-latest
permissions:
pull-requests: read
steps:
- uses: amannn/action-semantic-pull-request@v6
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

View File

@@ -27,5 +27,12 @@
}
}
route /gifbox* {
uri strip_prefix /gifbox
reverse_proxy http://gifbox:14706 {
header_down Location "^/" "/gifbox/"
}
}
reverse_proxy http://web:5000
}

View File

@@ -1,36 +1,37 @@
<div align="center">
<h1>
Revolt Self-Hosted
Stoat Self-Hosted
[![Stars](https://img.shields.io/github/stars/revoltchat/self-hosted?style=flat-square&logoColor=white)](https://github.com/revoltchat/self-hosted/stargazers)
[![Forks](https://img.shields.io/github/forks/revoltchat/self-hosted?style=flat-square&logoColor=white)](https://github.com/revoltchat/self-hosted/network/members)
[![Pull Requests](https://img.shields.io/github/issues-pr/revoltchat/self-hosted?style=flat-square&logoColor=white)](https://github.com/revoltchat/self-hosted/pulls)
[![Issues](https://img.shields.io/github/issues/revoltchat/self-hosted?style=flat-square&logoColor=white)](https://github.com/revoltchat/self-hosted/issues)
[![Contributors](https://img.shields.io/github/contributors/revoltchat/self-hosted?style=flat-square&logoColor=white)](https://github.com/revoltchat/self-hosted/graphs/contributors)
[![License](https://img.shields.io/github/license/revoltchat/self-hosted?style=flat-square&logoColor=white)](https://github.com/revoltchat/self-hosted/blob/main/LICENSE)
[![Stars](https://img.shields.io/github/stars/stoatchat/self-hosted?style=flat-square&logoColor=white)](https://github.com/stoatchat/self-hosted/stargazers)
[![Forks](https://img.shields.io/github/forks/stoatchat/self-hosted?style=flat-square&logoColor=white)](https://github.com/stoatchat/self-hosted/network/members)
[![Pull Requests](https://img.shields.io/github/issues-pr/stoatchat/self-hosted?style=flat-square&logoColor=white)](https://github.com/stoatchat/self-hosted/pulls)
[![Issues](https://img.shields.io/github/issues/stoatchat/self-hosted?style=flat-square&logoColor=white)](https://github.com/stoatchat/self-hosted/issues)
[![Contributors](https://img.shields.io/github/contributors/stoatchat/self-hosted?style=flat-square&logoColor=white)](https://github.com/stoatchat/self-hosted/graphs/contributors)
[![License](https://img.shields.io/github/license/stoatchat/self-hosted?style=flat-square&logoColor=white)](https://github.com/stoatchat/self-hosted/blob/main/LICENSE)
</h1>
Self-hosting Revolt using Docker
Self-hosting Stoat using Docker
</div>
<br/>
This repository contains configurations and instructions that can be used for deploying Revolt.
This repository contains configurations and instructions that can be used for deploying a full instance of Stoat, including the back-end, web front-end, file server, and metadata and image proxy.
> [!WARNING]
> If you are updating an instance from before November 28, 2024, please see the [notices section](#notices) at the bottom of this README!
> If you are updating an instance from before November 28, 2024, please consult the [notices section](#notices) at the bottom.
> [!IMPORTANT]
> A list of security advisories is [provided at the bottom](#security-advisories).
> [!NOTE]
> Please consult _[What can I do with Revolt, and how do I self-host?](https://developers.revolt.chat/faq.html#admonition-what-can-i-do-with-revolt-and-how-do-i-self-host)_ on our developer site for information about licensing and brand use.
> Please consult _[What can I do with Stoat and how do I self-host?](https://developers.stoat.chat/faq)_ on our developer site for information about licensing and brand use.
> [!NOTE]
> amd64 builds are not currently available for the web client.
> [!NOTE]
> This guide does not include working voice channels ([#138](https://github.com/revoltchat/self-hosted/pull/138#issuecomment-2762682655)). A [rework](https://github.com/revoltchat/backend/issues/313) is currently in progress.
> This guide does not include working voice channels ([#138](https://github.com/stoatchat/self-hosted/pull/138#issuecomment-2762682655)). A [rework](https://github.com/stoatchat/stoatchat/issues/313) is currently in progress.
## Table of Contents
- [Deployment](#deployment)
- [Updating](#updating)
- [Advanced Deployment](#advanced-deployment)
@@ -51,7 +52,7 @@ To get started, find yourself a suitable server to deploy onto, we recommend sta
>
> **We've partnered with Hostinger to bring you a 20% discount off VPS hosting!**
>
> 👉 https://www.hostinger.com/vps-hosting?REFERRALCODE=REVOLTCHAT
> 👉 https://www.hostinger.com/vps-hosting?REFERRALCODE=stoatchat
>
> We recommend using the _KVM 2_ plan at minimum!\
> Our testing environment for self-hosted currently sits on a KVM 2 instance, and we are happy to assist with issues.
@@ -137,11 +138,11 @@ apt-get update
apt-get install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin
```
Now, we can pull in the configuration for Revolt:
Now, we can pull in the configuration for Stoat:
```bash
git clone https://github.com/revoltchat/self-hosted revolt
cd revolt
git clone https://github.com/stoatchat/self-hosted stoat
cd stoat
```
Generate a configuration file by running:
@@ -151,7 +152,7 @@ chmod +x ./generate_config.sh
./generate_config.sh your.domain
```
You can find [more options here](https://github.com/revoltchat/backend/blob/stable/crates/core/config/Revolt.toml), some noteworthy configuration options:
You can find [more options here](https://github.com/stoatchat/stoatchat/blob/stable/crates/core/config/Revolt.toml), some noteworthy configuration options:
- Email verification
- Captcha
@@ -164,7 +165,7 @@ If you'd like to edit the configuration, just run:
micro Revolt.toml
```
Finally, we can start up Revolt. First, run it in the foreground with:
Finally, we can start up Stoat. First, run it in the foreground with:
```bash
docker compose up
@@ -186,7 +187,7 @@ Pull the latest version of this repository:
git pull
```
Check if your configuration file is correct by opening [the reference config file](https://github.com/revoltchat/backend/blob/df074260196f5ed246e6360d8e81ece84d8d9549/crates/core/config/Revolt.toml) and your `Revolt.toml` to compare changes.
Check if your configuration file is correct by opening [the reference config file](https://github.com/stoatchat/stoatchat/blob/df074260196f5ed246e6360d8e81ece84d8d9549/crates/core/config/Revolt.toml) and your `Revolt.toml` to compare changes.
Then pull all the latest images:
@@ -212,8 +213,8 @@ Prerequisites before continuing:
Clone this repository.
```bash
git clone https://github.com/revoltchat/self-hosted revolt
cd revolt
git clone https://github.com/stoatchat/self-hosted stoat
cd stoat
```
Create `.env.web` and download `Revolt.toml`, then modify them according to your requirements.
@@ -222,12 +223,12 @@ Create `.env.web` and download `Revolt.toml`, then modify them according to your
> The default configurations are intended exclusively for testing and will only work locally. If you wish to deploy to a remote server, you **must** edit the URLs in `.env.web` and `Revolt.toml`. Please reference the section below on [configuring a custom domain](#custom-domain).
```bash
echo "HOSTNAME=http://local.revolt.chat" > .env.web
echo "REVOLT_PUBLIC_URL=http://local.revolt.chat/api" >> .env.web
wget -O Revolt.toml https://raw.githubusercontent.com/revoltchat/backend/main/crates/core/config/Revolt.toml
echo "HOSTNAME=http://local.stoat.chat" > .env.web
echo "REVOLT_PUBLIC_URL=http://local.stoat.chat/api" >> .env.web
wget -O Revolt.toml https://raw.githubusercontent.com/stoatchat/stoatchat/main/crates/core/config/Revolt.toml
```
Then start Revolt:
Then start Stoat:
```bash
docker compose up -d
@@ -244,21 +245,22 @@ chmod +x ./generate_config.sh
./generate_config.sh your.domain
```
Or alternatively do it manually, you will need to replace *all* instances of `local.revolt.chat` in `Revolt.toml` and `.env.web` to your chosen domain (here represented as `example.com`), like so:
Or alternatively do it manually, you will need to replace _all_ instances of `local.stoat.chat` in `Revolt.toml` and `.env.web` to your chosen domain (here represented as `example.com`), like so:
```diff
# .env.web
- REVOLT_PUBLIC_URL=http://local.revolt.chat/api
- REVOLT_PUBLIC_URL=http://local.stoat.chat/api
+ REVOLT_PUBLIC_URL=http://example.com/api
```
```diff
# Revolt.toml
- app = "http://local.revolt.chat"
- app = "http://local.stoat.chat"
+ app = "http://example.com"
```
In the case of `HOSTNAME`, you must strip the protocol prefix:
```diff
# .env.web
- HOSTNAME=http://example.com
@@ -284,7 +286,7 @@ You will likely also want to change the protocols to enable HTTPS:
### Placing Behind Another Reverse-Proxy or Another Port
If you'd like to place Revolt behind another reverse proxy or on a non-standard port, you'll need to edit `compose.yml`.
If you'd like to place Stoat behind another reverse proxy or on a non-standard port, you'll need to edit `compose.yml`.
Override the port definitions on `caddy`:
@@ -352,14 +354,14 @@ db.invites.insertOne({ _id: "enter_an_invite_code_here" })
## Notices
> [!IMPORTANT]
> If you deployed Revolt before [2022-10-29](https://github.com/minio/docs/issues/624#issuecomment-1296608406), you may have to tag the `minio` image release if it's configured in "fs" mode.
> If you deployed Stoat before [2022-10-29](https://github.com/minio/docs/issues/624#issuecomment-1296608406), you may have to tag the `minio` image release if it's configured in "fs" mode.
>
> ```yml
> image: minio/minio:RELEASE.2022-10-24T18-35-07Z
> ```
> [!IMPORTANT]
> If you deployed Revolt before [2023-04-21](https://github.com/revoltchat/backend/commit/32542a822e3de0fc8cc7b29af46c54a9284ee2de), you may have to flush your Redis database.
> If you deployed Stoat before [2023-04-21](https://github.com/stoatchat/stoatchat/commit/32542a822e3de0fc8cc7b29af46c54a9284ee2de), you may have to flush your Redis database.
>
> ```bash
> # for stock Redis and older KeyDB images:
@@ -403,19 +405,20 @@ db.invites.insertOne({ _id: "enter_an_invite_code_here" })
> [!IMPORTANT]
> As of November 28, 2024, the following breaking changes have been applied:
>
> - Rename config section `api.vapid` -> `pushd.vapid`
> - Rename config section `api.fcm` -> `pushd.fcm`
> - Rename config section `api.apn` -> `pushd.apn`
>
> These will NOT automatically be applied to your config and must be changed/added manually.
>
>
> The following components have been added to the compose file:
> - Added `rabbit` (RabbitMQ) and `pushd` (Revolt push daemon)
>
> - Added `rabbit` (RabbitMQ) and `pushd` (Stoat push daemon)
## Security Advisories
- (`2024-06-21`) [GHSA-f26h-rqjq-qqjq revoltchat/backend: Unrestricted account creation.](https://github.com/revoltchat/backend/security/advisories/GHSA-f26h-rqjq-qqjq)
- (`2024-06-21`) [GHSA-f26h-rqjq-qqjq stoatchat/stoatchat: Unrestricted account creation.](https://github.com/stoatchat/stoatchat/security/advisories/GHSA-f26h-rqjq-qqjq)
- (`2024-12-17`) [GHSA-7f9x-pm3g-j7p4 revoltchat/january: January service can call itself recursively, causing heavy load.](https://github.com/revoltchat/january/security/advisories/GHSA-7f9x-pm3g-j7p4)
- (`2025-02-10`) [GHSA-8684-rvfj-v3jq revoltchat/backend: Webhook tokens are freely accessible for users with read permissions.](https://github.com/revoltchat/backend/security/advisories/GHSA-8684-rvfj-v3jq)
- (`2025-02-10`) [GHSA-h7h6-7pxm-mc66 revoltchat/backend: Nearby message fetch requests can be crafted to fetch entire message history.](https://github.com/revoltchat/backend/security/advisories/GHSA-h7h6-7pxm-mc66)
- (`2025-02-10`) [GHSA-8684-rvfj-v3jq stoatchat/stoatchat: Webhook tokens are freely accessible for users with read permissions.](https://github.com/stoatchat/stoatchat/security/advisories/GHSA-8684-rvfj-v3jq)
- (`2025-02-10`) [GHSA-h7h6-7pxm-mc66 stoatchat/stoatchat: Nearby message fetch requests can be crafted to fetch entire message history.](https://github.com/stoatchat/stoatchat/security/advisories/GHSA-h7h6-7pxm-mc66)

View File

@@ -1,9 +1,10 @@
name: revolt
name: stoat
services:
# MongoDB: Database
database:
image: docker.io/mongo
container_name: stoat-database
restart: always
volumes:
- ./data/db:/data/db
@@ -17,11 +18,13 @@ services:
# Redis: Event message broker & KV store
redis:
image: docker.io/eqalpha/keydb
container_name: stoat-redis
restart: always
# RabbitMQ: Internal message broker
rabbit:
image: docker.io/rabbitmq:4
container_name: stoat-rabbitmq
restart: always
environment:
RABBITMQ_DEFAULT_USER: rabbituser
@@ -38,6 +41,7 @@ services:
# MinIO: S3-compatible storage server
minio:
image: docker.io/minio/minio
container_name: stoat-storage
command: server /data
volumes:
- ./data/minio:/data
@@ -61,8 +65,8 @@ services:
# Caddy: Web server
caddy:
image: docker.io/caddy
container_name: stoat-caddy
restart: always
env_file: .env.web
ports:
- "80:80"
- "443:443"
@@ -73,7 +77,8 @@ services:
# API server
api:
image: ghcr.io/revoltchat/server:20250210-1
image: ghcr.io/stoatchat/api:v0.11.3
container_name: stoat-api
depends_on:
database:
condition: service_healthy
@@ -89,7 +94,8 @@ services:
# Events service
events:
image: ghcr.io/revoltchat/bonfire:20250210-1
image: ghcr.io/stoatchat/events:v0.11.3
container_name: stoat-events
depends_on:
database:
condition: service_healthy
@@ -101,15 +107,10 @@ services:
target: /Revolt.toml
restart: always
# Web App
web:
image: ghcr.io/revoltchat/client:master
restart: always
env_file: .env.web
# File server
autumn:
image: ghcr.io/revoltchat/autumn:20250210-1
image: ghcr.io/stoatchat/file-server:v0.11.3
container_name: stoat-file-server
depends_on:
database:
condition: service_healthy
@@ -123,7 +124,18 @@ services:
# Metadata and image proxy
january:
image: ghcr.io/revoltchat/january:20250210-1
image: ghcr.io/stoatchat/proxy:v0.11.3
container_name: stoat-proxy
volumes:
- type: bind
source: ./Revolt.toml
target: /Revolt.toml
restart: always
# Tenor proxy
gifbox:
image: ghcr.io/stoatchat/gifbox:v0.11.3
container_name: stoat-gifbox
volumes:
- type: bind
source: ./Revolt.toml
@@ -132,7 +144,8 @@ services:
# Regular task daemon
crond:
image: ghcr.io/revoltchat/crond:20250210-1-debug
image: ghcr.io/stoatchat/crond:v0.11.3
container_name: stoat-crond
depends_on:
database:
condition: service_healthy
@@ -146,7 +159,8 @@ services:
# Push notification daemon
pushd:
image: ghcr.io/revoltchat/pushd:20250210-1
image: ghcr.io/stoatchat/pushd:v0.11.3
container_name: stoat-pushd
depends_on:
database:
condition: service_healthy
@@ -163,6 +177,7 @@ services:
# Create buckets for minio.
createbuckets:
image: docker.io/minio/mc
container_name: stoat-create-buckets
depends_on:
- minio
entrypoint: >

View File

@@ -1,4 +1,4 @@
// THIS FILE IS TAILORED TO REVOLT PRODUCTION
// THIS FILE IS TAILORED TO STOAT PRODUCTION
// MIGRATING FROM A BACKUP & EXISTING CDN NODE
// INTO BACKBLAZE B2
//