No description
Find a file
2025-11-30 20:13:21 -06:00
docker rudimentary dockerfile 2025-11-30 19:56:13 -06:00
scripts Simple linting script 2025-08-10 15:50:03 -05:00
tests Stop testing loading configuration from other sources, this was wrong anyway 2025-09-15 19:57:59 -05:00
worrywart adjust test endpoint to be in test path 2025-11-30 20:13:21 -06:00
.gitignore Update .gitignore 2025-08-10 15:53:55 -05:00
poetry.lock Update mypy to 1.17.1 and use the 'all' extra 2025-09-01 14:28:23 -05:00
pyproject.toml Update mypy to 1.17.1 and use the 'all' extra 2025-09-01 14:28:23 -05:00
README.md Update README for server_signing_keys 2025-09-01 14:28:23 -05:00

Welcome to Worrywart

A Matrix Homeserver written with modern tools:

  • FastAPI
  • Psycopg
  • Httpx
  • And more!

Installation

(Until a dockerfile is provided) Download git directory, and run poetry install --all-extras from the directory with pyproject.toml.

Startup

After setting appropriate environmental variables(of at minimum WW_SERVER_NAME and WW_DB_DSN), run from command line with poetry run fastapi run worrywart/main.py

General Configuration:

Can load settings from the configuration file, ww.yaml, or from the environment variables. Note that loading from ENV assumes formatting as JSON compliant.

Still working on loading secrets from files.

Order of loading precedence:

  1. defaults
  2. yaml
  3. environment
  4. secrets files

Entries will be designated by their yaml key, with the ENV variant just below. Secrets should be files named by their yaml key(no extension) with the value inside.

server_name

ENV: WW_SERVER_NAME

Set the matrix server name. If you are using delegation to redirect from SRV records or well-known, this will be the base domain. For example, if your server is hosted at matrix.example.com, and you have your delegation prepared, this should be example.com.

Required. No default

server_signing_keys

*ENV: WW_SERVER_SIGNING_KEYS

example ENV(note the brackets, as this is list capable):

WW_SERVER_SIGNING_KEYS='["ed25519 a_DOuA ikTaU/tNOKFIbdsi/5JvtSWTP+/i1vx21c6XQu2st/8"]'

example yaml:

server_signing_keys:
  - "ed25519 a_DOuA ikTaU/tNOKFIbdsi/5JvtSWTP+/i1vx21c6XQu2st/8"

Database Configuration

database.dsn

ENV: WW_DB_DSN

Set this as a connection string format recognized by libpq and postgres for connecting to your server's database. See Postgres Docs for better details.

Optional. No default

database.internal_pool_enabled

ENV: WW_DB_INTERNAL_POOL_ENABLED

Enable the internal database pooling system. SeeDatabase Pool Configuration

Optional. Default is True

Database Pool Configuration

Connection pooling capabilities are built into Worrywart. However, you may wish to use an external database pooling solution(such as pgbouncer or pgcat). In those instances, the internal database pool can be disabled.