4 Commits

Author SHA1 Message Date
d241581856 Stupid Caddyfile 2026-02-04 22:21:43 -06:00
ddcf2b3634 Update to new stoat name new docker config options 2026-02-04 22:11:11 -06:00
bd354e4e29 Added docker-compose.yml 2026-02-04 22:06:37 -06:00
490ff5686a Add .env 2026-02-04 22:05:55 -06:00
5 changed files with 224 additions and 39 deletions

2
.env Normal file
View File

@@ -0,0 +1,2 @@
HOSTNAME=http://local.revolt.chat
REVOLT_PUBLIC_URL=http://local.revolt.chat/api

View File

@@ -2,12 +2,12 @@
<h1>
Stoat Self-Hosted
[![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)
[![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)
</h1>
Self-hosting Stoat using Docker
</div>
@@ -22,13 +22,13 @@ This repository contains configurations and instructions that can be used for de
> A list of security advisories is [provided at the bottom](#security-advisories).
> [!NOTE]
> 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.
> Please consult _[What can I do with Stoat, 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.
> [!NOTE]
> amd64 builds are not currently available for the web client.
> [!NOTE]
> 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.
> 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.
## Table of Contents
@@ -52,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=stoatchat
> 👉 https://www.hostinger.com/vps-hosting?REFERRALCODE=REVOLTCHAT
>
> 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.
@@ -141,7 +141,7 @@ apt-get install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docke
Now, we can pull in the configuration for Stoat:
```bash
git clone https://github.com/stoatchat/self-hosted stoat
git clone https://github.com/revoltchat/self-hosted stoat
cd stoat
```
@@ -152,7 +152,7 @@ chmod +x ./generate_config.sh
./generate_config.sh your.domain
```
You can find [more options here](https://github.com/stoatchat/stoatchat/blob/stable/crates/core/config/Revolt.toml), some noteworthy configuration options:
You can find [more options here](https://github.com/revoltchat/backend/blob/stable/crates/core/config/Revolt.toml), some noteworthy configuration options:
- Email verification
- Captcha
@@ -187,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/stoatchat/stoatchat/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/revoltchat/backend/blob/df074260196f5ed246e6360d8e81ece84d8d9549/crates/core/config/Revolt.toml) and your `Revolt.toml` to compare changes.
Then pull all the latest images:
@@ -213,7 +213,7 @@ Prerequisites before continuing:
Clone this repository.
```bash
git clone https://github.com/stoatchat/self-hosted stoat
git clone https://github.com/revoltchat/self-hosted stoat
cd stoat
```
@@ -225,7 +225,7 @@ Create `.env.web` and download `Revolt.toml`, then modify them according to your
```bash
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
wget -O Revolt.toml https://raw.githubusercontent.com/revoltchat/backend/main/crates/core/config/Revolt.toml
```
Then start Stoat:
@@ -361,7 +361,7 @@ db.invites.insertOne({ _id: "enter_an_invite_code_here" })
> ```
> [!IMPORTANT]
> If you deployed Stoat before [2023-04-21](https://github.com/stoatchat/stoatchat/commit/32542a822e3de0fc8cc7b29af46c54a9284ee2de), you may have to flush your Redis database.
> If you deployed Stoat before [2023-04-21](https://github.com/revoltchat/backend/commit/32542a822e3de0fc8cc7b29af46c54a9284ee2de), you may have to flush your Redis database.
>
> ```bash
> # for stock Redis and older KeyDB images:
@@ -418,7 +418,7 @@ db.invites.insertOne({ _id: "enter_an_invite_code_here" })
## Security Advisories
- (`2024-06-21`) [GHSA-f26h-rqjq-qqjq stoatchat/stoatchat: Unrestricted account creation.](https://github.com/stoatchat/stoatchat/security/advisories/GHSA-f26h-rqjq-qqjq)
- (`2024-06-21`) [GHSA-f26h-rqjq-qqjq revoltchat/backend: Unrestricted account creation.](https://github.com/revoltchat/backend/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 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)
- (`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)

View File

@@ -4,7 +4,6 @@ services:
# MongoDB: Database
database:
image: docker.io/mongo
container_name: stoat-database
restart: always
volumes:
- ./data/db:/data/db
@@ -18,13 +17,11 @@ 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
@@ -41,7 +38,6 @@ services:
# MinIO: S3-compatible storage server
minio:
image: docker.io/minio/minio
container_name: stoat-storage
command: server /data
volumes:
- ./data/minio:/data
@@ -65,8 +61,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"
@@ -77,8 +73,7 @@ services:
# API server
api:
image: ghcr.io/stoatchat/api:v0.11.3
container_name: stoat-api
image: ghcr.io/revoltchat/server:20250930-2
depends_on:
database:
condition: service_healthy
@@ -94,8 +89,7 @@ services:
# Events service
events:
image: ghcr.io/stoatchat/events:v0.11.3
container_name: stoat-events
image: ghcr.io/revoltchat/bonfire:20250930-2
depends_on:
database:
condition: service_healthy
@@ -107,10 +101,15 @@ 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/stoatchat/file-server:v0.11.3
container_name: stoat-file-server
image: ghcr.io/revoltchat/autumn:20250930-2
depends_on:
database:
condition: service_healthy
@@ -124,8 +123,7 @@ services:
# Metadata and image proxy
january:
image: ghcr.io/stoatchat/proxy:v0.11.3
container_name: stoat-proxy
image: ghcr.io/revoltchat/january:20250930-2
volumes:
- type: bind
source: ./Revolt.toml
@@ -134,8 +132,7 @@ services:
# Tenor proxy
gifbox:
image: ghcr.io/stoatchat/gifbox:v0.11.3
container_name: stoat-gifbox
image: ghcr.io/revoltchat/gifbox:20250930-2
volumes:
- type: bind
source: ./Revolt.toml
@@ -144,8 +141,7 @@ services:
# Regular task daemon
crond:
image: ghcr.io/stoatchat/crond:v0.11.3
container_name: stoat-crond
image: ghcr.io/revoltchat/crond:20250930-2
depends_on:
database:
condition: service_healthy
@@ -159,8 +155,7 @@ services:
# Push notification daemon
pushd:
image: ghcr.io/stoatchat/pushd:v0.11.3
container_name: stoat-pushd
image: ghcr.io/revoltchat/pushd:20250930-2
depends_on:
database:
condition: service_healthy
@@ -177,7 +172,6 @@ services:
# Create buckets for minio.
createbuckets:
image: docker.io/minio/mc
container_name: stoat-create-buckets
depends_on:
- minio
entrypoint: >

189
docker-compose.yml Normal file
View File

@@ -0,0 +1,189 @@
name: stoat
services:
# MongoDB: Database
database:
image: docker.io/mongo
restart: always
volumes:
- ./data/db:/data/db
healthcheck:
test: echo 'db.runCommand("ping").ok' | mongosh localhost:27017/test --quiet
interval: 10s
timeout: 10s
retries: 5
start_period: 10s
# Redis: Event message broker & KV store
redis:
image: docker.io/eqalpha/keydb
restart: always
# RabbitMQ: Internal message broker
rabbit:
image: docker.io/rabbitmq:4
restart: always
environment:
RABBITMQ_DEFAULT_USER: rabbituser
RABBITMQ_DEFAULT_PASS: rabbitpass
volumes:
- ./data/rabbit:/var/lib/rabbitmq
healthcheck:
test: rabbitmq-diagnostics -q ping
interval: 10s
timeout: 10s
retries: 3
start_period: 20s
# MinIO: S3-compatible storage server
minio:
image: docker.io/minio/minio
command: server /data
volumes:
- ./data/minio:/data
environment:
MINIO_ROOT_USER: minioautumn
MINIO_ROOT_PASSWORD: minioautumn
MINIO_DOMAIN: minio
networks:
default:
aliases:
- revolt-uploads.minio
# legacy support:
- attachments.minio
- avatars.minio
- backgrounds.minio
- icons.minio
- banners.minio
- emojis.minio
restart: always
# Caddy: Web server
caddy:
image: docker.io/caddy
restart: always
environment:
- HOSTNAME=${HOSTNAME}
- REVOLT_PUBLIC_URL={REVOLT_PUBLIC_URL}
ports:
- "8880:80"
- "8443:443"
volumes:
- ./Caddyfile:/etc/caddy/Caddyfile
- ./data/caddy-data:/data
- ./data/caddy-config:/config
# API server
api:
image: ghcr.io/revoltchat/server:20250930-2
depends_on:
database:
condition: service_healthy
redis:
condition: service_started
rabbit:
condition: service_healthy
volumes:
- type: bind
source: ./Revolt.toml
target: /Revolt.toml
restart: always
# Events service
events:
image: ghcr.io/revoltchat/bonfire:20250930-2
depends_on:
database:
condition: service_healthy
redis:
condition: service_started
volumes:
- type: bind
source: ./Revolt.toml
target: /Revolt.toml
restart: always
# Web App
web:
image: ghcr.io/revoltchat/client:master
restart: always
environment:
- HOSTNAME=${HOSTNAME}
- REVOLT_PUBLIC_URL={REVOLT_PUBLIC_URL}
# File server
autumn:
image: ghcr.io/revoltchat/autumn:20250930-2
depends_on:
database:
condition: service_healthy
createbuckets:
condition: service_started
volumes:
- type: bind
source: ./Revolt.toml
target: /Revolt.toml
restart: always
# Metadata and image proxy
january:
image: ghcr.io/revoltchat/january:20250930-2
volumes:
- type: bind
source: ./Revolt.toml
target: /Revolt.toml
restart: always
# Tenor proxy
gifbox:
image: ghcr.io/revoltchat/gifbox:20250930-2
volumes:
- type: bind
source: ./Revolt.toml
target: /Revolt.toml
restart: always
# Regular task daemon
crond:
image: ghcr.io/revoltchat/crond:20250930-2
depends_on:
database:
condition: service_healthy
minio:
condition: service_started
volumes:
- type: bind
source: ./Revolt.toml
target: /Revolt.toml
restart: always
# Push notification daemon
pushd:
image: ghcr.io/revoltchat/pushd:20250930-2
depends_on:
database:
condition: service_healthy
redis:
condition: service_started
rabbit:
condition: service_healthy
volumes:
- type: bind
source: ./Revolt.toml
target: /Revolt.toml
restart: always
# Create buckets for minio.
createbuckets:
image: docker.io/minio/mc
depends_on:
- minio
entrypoint: >
/bin/sh -c "
while ! /usr/bin/mc ready minio; do
/usr/bin/mc alias set minio http://minio:9000 minioautumn minioautumn;
echo 'Waiting minio...' && sleep 1;
done;
/usr/bin/mc mb minio/revolt-uploads;
exit 0;
"

View File

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