| docker | ||
| scripts | ||
| tests | ||
| worrywart | ||
| .gitignore | ||
| poetry.lock | ||
| pyproject.toml | ||
| README.md | ||
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:
- defaults
- yaml
- environment
- 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.