2022-03-24 12:25:45 +00:00
# Dendrite
2022-05-11 14:39:36 +00:00
2022-03-24 12:25:45 +00:00
[![Build status ](https://github.com/matrix-org/dendrite/actions/workflows/dendrite.yml/badge.svg?event=push )](https://github.com/matrix-org/dendrite/actions/workflows/dendrite.yml) [![Dendrite ](https://img.shields.io/matrix/dendrite:matrix.org.svg?label=%23dendrite%3Amatrix.org&logo=matrix&server_fqdn=matrix.org )](https://matrix.to/#/#dendrite:matrix.org) [![Dendrite Dev ](https://img.shields.io/matrix/dendrite-dev:matrix.org.svg?label=%23dendrite-dev%3Amatrix.org&logo=matrix&server_fqdn=matrix.org )](https://matrix.to/#/#dendrite-dev:matrix.org)
2017-01-20 18:25:51 +00:00
2020-10-08 16:45:55 +00:00
Dendrite is a second-generation Matrix homeserver written in Go.
2021-06-07 09:10:29 +00:00
It intends to provide an **efficient** , **reliable** and **scalable** alternative to [Synapse ](https://github.com/matrix-org/synapse ):
2022-03-04 16:20:23 +00:00
- Efficient: A small memory footprint with better baseline performance than an out-of-the-box Synapse.
- Reliable: Implements the Matrix specification as written, using the
2022-04-24 18:26:20 +00:00
[same test suite ](https://github.com/matrix-org/sytest ) as Synapse as well as
a [brand new Go test suite ](https://github.com/matrix-org/complement ).
2022-03-04 16:20:23 +00:00
- Scalable: can run on multiple machines and eventually scale to massive homeserver deployments.
2020-10-08 16:45:55 +00:00
2022-09-20 13:10:30 +00:00
Dendrite is **beta** software, which means:
2022-03-04 16:20:23 +00:00
2023-05-30 08:02:53 +00:00
- Dendrite is ready for early adopters. We recommend running Dendrite with a PostgreSQL database.
2022-09-20 13:10:30 +00:00
- Dendrite has periodic releases. We intend to release new versions as we fix bugs and land significant features.
2020-10-08 16:45:55 +00:00
- Dendrite supports database schema upgrades between releases. This means you should never lose your messages when upgrading Dendrite.
This does not mean:
2022-03-04 16:20:23 +00:00
- Dendrite is bug-free. It has not yet been battle-tested in the real world and so will be error prone initially.
2022-08-05 09:44:08 +00:00
- Dendrite is feature-complete. There may be client or federation APIs that are not implemented.
2023-05-30 08:02:53 +00:00
- Dendrite is ready for massive homeserver deployments. There is no high-availability/clustering support.
2020-10-08 16:45:55 +00:00
Currently, we expect Dendrite to function well for small (10s/100s of users) homeserver deployments as well as P2P Matrix nodes in-browser or on mobile devices.
2017-01-20 18:25:51 +00:00
2020-12-07 10:20:19 +00:00
If you have further questions, please take a look at [our FAQ ](docs/FAQ.md ) or join us in:
2020-08-25 11:09:34 +00:00
2020-10-01 14:27:16 +00:00
- **[#dendrite:matrix.org](https://matrix.to/#/#dendrite:matrix.org)** - General chat about the Dendrite project, for users and server admins alike
- **[#dendrite-dev:matrix.org](https://matrix.to/#/#dendrite-dev:matrix.org)** - The place for developers, where all Dendrite development discussion happens
- **[#dendrite-alerts:matrix.org](https://matrix.to/#/#dendrite-alerts:matrix.org)** - Release notifications and important info, highly recommended for all Dendrite server admins
2020-10-08 16:45:55 +00:00
## Requirements
2022-08-05 09:44:08 +00:00
See the [Planning your Installation ](https://matrix-org.github.io/dendrite/installation/planning ) page for
more information on requirements.
2022-07-11 13:31:31 +00:00
To build Dendrite, you will need Go 1.18 or later.
2020-10-08 16:45:55 +00:00
For a usable federating Dendrite deployment, you will also need:
2022-03-04 16:20:23 +00:00
- A domain name (or subdomain)
2020-10-08 16:45:55 +00:00
- A valid TLS certificate issued by a trusted authority for that domain
- SRV records or a well-known file pointing to your deployment
Also recommended are:
2022-03-04 16:20:23 +00:00
2020-10-08 16:45:55 +00:00
- A PostgreSQL database engine, which will perform better than SQLite with many users and/or larger rooms
2023-06-12 08:51:26 +00:00
- A reverse proxy server, such as nginx, configured [like this sample ](https://github.com/matrix-org/dendrite/blob/main/docs/nginx/dendrite-sample.conf )
2020-10-08 16:45:55 +00:00
The [Federation Tester ](https://federationtester.matrix.org ) can be used to verify your deployment.
## Get started
2022-05-13 10:52:42 +00:00
If you wish to build a fully-federating Dendrite instance, see [the Installation documentation ](https://matrix-org.github.io/dendrite/installation ). For running in Docker, see [build/docker ](build/docker ).
2020-07-14 11:58:00 +00:00
2020-10-08 16:45:55 +00:00
The following instructions are enough to get Dendrite started as a non-federating test deployment using self-signed certificates and SQLite databases:
2020-07-14 11:58:00 +00:00
```bash
$ git clone https://github.com/matrix-org/dendrite
$ cd dendrite
2023-05-30 08:02:53 +00:00
$ go build -o bin/ ./cmd/...
2020-07-14 11:58:00 +00:00
2020-10-26 22:09:13 +00:00
# Generate a Matrix signing key for federation (required)
2020-11-18 15:11:48 +00:00
$ ./bin/generate-keys --private-key matrix_key.pem
2020-07-14 11:58:00 +00:00
2020-10-26 22:09:13 +00:00
# Generate a self-signed certificate (optional, but a valid TLS certificate is normally
# needed for Matrix federation/clients to work properly!)
2020-11-18 15:11:48 +00:00
$ ./bin/generate-keys --tls-cert server.crt --tls-key server.key
2020-10-26 22:09:13 +00:00
# Copy and modify the config file - you'll need to set a server name and paths to the keys
# at the very least, along with setting up the database connection strings.
2023-03-03 09:20:53 +00:00
$ cp dendrite-sample.yaml dendrite.yaml
2020-07-14 11:58:00 +00:00
2020-10-26 22:09:13 +00:00
# Build and run the server:
2023-03-03 09:20:53 +00:00
$ ./bin/dendrite --tls-cert server.crt --tls-key server.key --config dendrite.yaml
2022-04-29 08:00:28 +00:00
# Create an user account (add -admin for an admin user).
# Specify the localpart only, e.g. 'alice' for '@alice:domain.com'
2022-10-07 05:32:27 +00:00
$ ./bin/create-account --config dendrite.yaml --username alice
2020-07-14 11:58:00 +00:00
```
2020-10-26 22:09:13 +00:00
Then point your favourite Matrix client at `http://localhost:8008` or `https://localhost:8448` .
2020-07-14 11:58:00 +00:00
2022-08-05 09:44:08 +00:00
## Progress
2020-07-14 11:58:00 +00:00
2023-05-30 08:02:53 +00:00
We use a script called "Are We Synapse Yet" which checks Sytest compliance rates. Sytest is a black-box homeserver
2020-07-14 11:58:00 +00:00
test rig with around 900 tests. The script works out how many of these tests are passing on Dendrite and it
2023-02-08 07:56:16 +00:00
updates with CI. As of January 2023, we have 100% server-server parity with Synapse, and the client-server parity is at 93% , though check
2020-07-14 11:58:00 +00:00
CI for the latest numbers. In practice, this means you can communicate locally and via federation with Synapse
2022-10-07 05:32:27 +00:00
servers such as matrix.org reasonably well, although there are still some missing features (like SSO and Third-party ID APIs).
2020-07-14 11:58:00 +00:00
We are prioritising features that will benefit single-user homeservers first (e.g Receipts, E2E) rather
2022-08-12 11:55:45 +00:00
than features that massive deployments may be interested in (OpenID, Guests, Admin APIs, AS API).
2020-07-14 11:58:00 +00:00
This means Dendrite supports amongst others:
2017-08-21 16:34:05 +00:00
2022-03-04 16:20:23 +00:00
- Core room functionality (creating rooms, invites, auth rules)
2022-05-30 10:11:21 +00:00
- Room versions 1 to 10 supported
2022-03-04 16:20:23 +00:00
- Backfilling locally and via federation
2022-05-30 10:11:21 +00:00
- Accounts, profiles and devices
2022-03-04 16:20:23 +00:00
- Published room lists
- Typing
- Media APIs
- Redaction
- Tagging
- Context
- E2E keys and device lists
- Receipts
- Push
- Guests
2022-04-06 14:23:09 +00:00
- User Directory
- Presence
2022-10-07 05:32:27 +00:00
- Fulltext search
2017-08-21 16:34:05 +00:00
2020-10-01 14:27:16 +00:00
## Contributing
2017-01-20 18:25:51 +00:00
2020-08-25 07:11:41 +00:00
We would be grateful for any help on issues marked as
[Are We Synapse Yet ](https://github.com/matrix-org/dendrite/labels/are-we-synapse-yet ). These issues
all have related Sytests which need to pass in order for the issue to be closed. Once you've written your
code, you can quickly run Sytest to ensure that the test names are now passing.
2022-08-05 09:44:08 +00:00
If you're new to the project, see our
[Contributing page ](https://matrix-org.github.io/dendrite/development/contributing ) to get up to speed, then
2020-08-25 07:11:41 +00:00
look for [Good First Issues ](https://github.com/matrix-org/dendrite/labels/good%20first%20issue ). If you're
familiar with the project, look for [Help Wanted ](https://github.com/matrix-org/dendrite/labels/help-wanted )
issues.