README.md 3 KB
Newer Older
jaywink's avatar
jaywink committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14
# Dendrite

Deploy a Dendrite (monolithic) Matrix server using Docker.

https://github.com/matrix-org/dendrite

Targeting Ubuntu 20.04, contributions welcome for a larger set of platforms.

## Requirements

Developed and tested on Ansible 2.9.6.

## Usage

jaywink's avatar
jaywink committed
15 16 17 18 19 20
You can install this role from Ansible Galaxy with:

```bash
ansible-galaxy install jaywink.ansible_dendrite
```

jaywink's avatar
jaywink committed
21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51
The Dendrite container exposes an HTTP endpoint on localhost port 8008. You will need to
set up a reverse proxy to handle TLS and proxy any `_matrix` path traffic to the container.

A PostgreSQL database is also required.

Set the required variables for your play.

Generate a signing key as follows. You'll need a Golang binary in your path.

```bash
go get github.com/matrix-org/dendrite/cmd/generate-keys
go run github.com/matrix-org/dendrite/cmd/generate-keys --private-key=matrix_key.pem
```

Copy the contents of the generated `matrix_key.pem` file into the `dendrite_matrix_key_pem` variable.

Now you can run the play and get a fresh Dendrite.

## Role Variables

### Required

* `dendrite_server_name` - Dendrite server name (ie `domain.tld`)
* `dendrite_matrix_key_pem` - The signing key
* `dendrite_db_host` - Database hostname to use (PostgreSQL)
* `dendrite_db_password` - Database password to use

### Optional

* `dendrite_name` - The name of the instance and user on the host to use, will be created (default: `dendrite`)
* `dendrite_container_name` - Name to use for the Docker container (defaults to value of `dendrite_name` variable)
jaywink's avatar
jaywink committed
52
* `dendrite_docker_image` - Docker image to use (defaults to: `matrixdotorg/dendrite-monolith:v0.3.11`)
jaywink's avatar
jaywink committed
53 54 55 56 57 58 59
* `dendrite_db_name` - Database name to use (defaults to value of `dendrite_name` variable)
* `dendrite_db_username` - Database user to use (defaults to value of `dendrite_name` variable)
* `dendrite_db_sslmode` - Database SSL mode, set to `false` if your database is within an internal network (defaults to `true`)
* `dendrite_metrics_enabled` - Whether to enable Prometheus metrics endpoint (default `false`)
* `dendrite_metrics_basic_auth_username` - Username for basic auth of metrics (defaults to empty - no basic auth)
* `dendrite_metrics_basic_auth_password` - Password for basic auth of metrics (defaults to empty - must be set if username is set)
* `dendrite_client_api_registration_enabled` - Whether to allow registrations (defaults to `true`)
60
* `dendrite_client_api_registration_shared_secret` - Registration shared secret for registering users (defaults to empty)
61 62
* `dendrite_container_labels` - Labels to add to the container (defaults to empty dictionary)
* `dendrite_docker_networks` - Additional docker networks to connect to (defaults to empty list)
63
* `dendrite_enabled_mscs` - A list of MSC's to enable (defaults to empty, list should have lowercase items, for example `msc2836`)
jaywink's avatar
jaywink committed
64 65 66 67 68

### Dependencies

None

jaywink's avatar
jaywink committed
69 70 71 72
## contributions

Contributions welcome here or the GitHub mirror at https://github.com/jaywink/ansible-dendrite

jaywink's avatar
jaywink committed
73 74 75 76 77 78 79
## License

BSD

## Author Information

Jason Robinson / `@jaywink:federator.dev` / https://jasonrobinson.me