Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merge #3

Merged
merged 156 commits into from
Dec 24, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
156 commits
Select commit Hold shift + click to select a range
fe7bed5
Upgrade appservice-discord
spantaleev Nov 10, 2020
6dbb902
Mention and recommend enabling usePrivilegedIntents
spantaleev Nov 13, 2020
d64ad91
Add some notes about recent Jitsi changes
spantaleev Nov 30, 2020
90078dd
Add matrix_services_autostart_enabled variable for preventing service…
spantaleev Nov 30, 2020
04da1bd
Update matrix-mautrix-facebook config a bit
spantaleev Dec 1, 2020
694e6fe
Create FUNDING.yml
spantaleev Dec 1, 2020
06ade5e
Add donation and support room badges
spantaleev Dec 1, 2020
edd4081
Update matrix-appservice-discord to v1.0.0 final
spantaleev Dec 3, 2020
05cecb5
Merge branch 'discord-v1.0'
spantaleev Dec 3, 2020
b3d91ed
Fix passing of matrix_appservice_discord_auth_usePrivilegedIntents
spantaleev Dec 3, 2020
a5ae7e9
Add self-building support to matrix-corporal
spantaleev Dec 3, 2020
ec2a9d4
Remove the recording button from the Jitsi UI if recording is disabled.
hardye Dec 6, 2020
cc683a8
Merge pull request #744 from hardye/jitsi-recording
spantaleev Dec 6, 2020
7372480
Properly serialize some ma1sd configuration values
spantaleev Dec 6, 2020
9713ac9
fixes config.js
wabuMike Dec 6, 2020
1e0777f
Merge pull request #745 from wabuMike/patch-1
spantaleev Dec 6, 2020
d556aa9
Update docker-ce.repo to not hardcode $releasever=7
spantaleev Dec 7, 2020
8c02f7b
Upgrade services
spantaleev Dec 7, 2020
c07c927
Automatically enable openid listeners when ma1sd enabled
spantaleev Dec 8, 2020
ad92c61
updated matrix-sms-bridge
benkuly Dec 9, 2020
f453d28
Merge pull request #747 from benkuly/master
spantaleev Dec 9, 2020
aa86e0d
Upgrade Synapse (v1.23.0 -> v1.24.0)
spantaleev Dec 9, 2020
245b749
Upgrade Synapse for ARM (v1.23.0 -> v1.24.0)
spantaleev Dec 9, 2020
673e19f
Correct inabillity for appservice-discord to connect
jgoerzen Dec 10, 2020
327ca84
Merge pull request #748 from jgoerzen/patch-1
spantaleev Dec 10, 2020
d08b277
Fix systemd services autostart problem with Docker 20.10
spantaleev Dec 10, 2020
d9f4914
WIP: postgres: create databases for all services
jdreichmann Nov 29, 2020
7593d96
Make matrix-mailer not occupy matrix_server_fqn_matrix
spantaleev Dec 10, 2020
eae4f67
Mention Docker 20.10 in the changelog
spantaleev Dec 10, 2020
3c2a644
Upgrade synapse-admin (v0.5.0 -> 0.6.1)
aaronraimist Dec 10, 2020
7f1f3fd
Merge pull request #749 from aaronraimist/synapse-admin-0.6.1
spantaleev Dec 10, 2020
0a91097
Use latest/master version of matrix-registration
spantaleev Dec 11, 2020
86988ae
Switch matrix-registration to v0.7.1
spantaleev Dec 11, 2020
47613e5
Remove synapse-janitor support
spantaleev Dec 11, 2020
d96d7f2
Adding jitsi as well
chagai95 Dec 11, 2020
bae4113
Mention that we possibly obtain a Jitsi certificate
spantaleev Dec 11, 2020
9dc023c
Merge pull request #750 from chagai95/patch-1
spantaleev Dec 11, 2020
77a5c7c
Merge branch 'master' into postgres-per-default
spantaleev Dec 13, 2020
dac0d3a
Add default matrix_postgres_additional_databases
spantaleev Dec 13, 2020
527d5f5
Relocate Postgres additional database creation logic
spantaleev Dec 13, 2020
0641106
Allow username of additional Postgres databases to be different
spantaleev Dec 13, 2020
d251764
Fix syntax issues in matrix_postgres_additional_databases
spantaleev Dec 13, 2020
f47e8a9
Make use of matrix_host_command_docker instead of hardcoding
spantaleev Dec 13, 2020
e2952f1
Determine matrix-postgres IP address without relying on jq
spantaleev Dec 13, 2020
c765ceb
Prevent weird loop error
spantaleev Dec 13, 2020
bbc09d0
Do not execute additional databases creation code if not necessary
spantaleev Dec 13, 2020
da4cb2f
Do not use the postgresql_user/postgresql_db modules
spantaleev Dec 13, 2020
3a037a5
Ensure additional databases contain all the keys that we expect
spantaleev Dec 13, 2020
46a4034
Use "password" for additional Postgres databases, not "pass"
spantaleev Dec 13, 2020
a374d30
Make appservice-discord support both SQLite and Postgres
spantaleev Dec 13, 2020
183d2a1
Ensure matrix-postgres.service is started before creating additional …
spantaleev Dec 13, 2020
dd99499
Simplify password for additional Postgres databases
spantaleev Dec 13, 2020
b87b754
Fail if appservice-discord wants Postgres, but has leftover SQLite data
spantaleev Dec 13, 2020
6e1dfb6
Rename some doc files and commands related to importing
spantaleev Dec 13, 2020
c66c084
Merge branch 'master' into postgres-per-default
spantaleev Dec 13, 2020
cb969c6
Add --tags=import-generic-sqlite-db (pgloader import)
spantaleev Dec 14, 2020
4617984
Add (SQLite -> Postgres) migration instructions
spantaleev Dec 14, 2020
b217a2e
postgres: set default in playbook to postgres but fallback to sqlite
jdreichmann Dec 14, 2020
f1e85f7
Don't mention Postgres roles, just say users
spantaleev Dec 14, 2020
d91aa5a
Do not introduce sub-variables exposing implementation details
spantaleev Dec 14, 2020
c0edacb
Fix matrix_postgres_additional_databases syntax problems
spantaleev Dec 14, 2020
2a99e84
Rename Postgres-related variables (`matrix*database_*` -> `matrix*pos…
spantaleev Dec 14, 2020
5dba0c0
Make --tags=import-generic-sqlite-db commands not pass a sensitive co…
spantaleev Dec 14, 2020
2d99ade
Add (Postgres + SQLite) support to matrix-mautrix-facebook bridge
spantaleev Dec 14, 2020
a3406a1
Move some things around
spantaleev Dec 14, 2020
9bf8ce8
Add (Postgres + SQLite) support to matrix-mautrix-telegram bridge
spantaleev Dec 14, 2020
05dd091
Rename `_database_hostname` to `_postgres_hostname`
spantaleev Dec 14, 2020
6a2dd80
Fix typo (matrix_telegram_facebook_postgres_hostname -> matrix_mautri…
spantaleev Dec 14, 2020
2848322
Remove some remaining `_database_password` usage in favor of `_postgr…
spantaleev Dec 14, 2020
6c77eae
Add (Postgres + SQLite) support to matrix-mautrix-whatsapp bridge
spantaleev Dec 14, 2020
43d6ff2
Fix sqlite usage for mautrix-facebook/mautrix-telegram
spantaleev Dec 14, 2020
ce21ea3
Add (Postgres + SQLite) support to matrix-mautrix-hangouts bridge
spantaleev Dec 14, 2020
087dbe4
Rename `matrix_*_postgres_*` back to `matrix_*_database_*`
spantaleev Dec 14, 2020
5d70bc1
add postgres support for mx-puppet-* with fallback to sqlite in role …
jdreichmann Dec 14, 2020
b9a04a7
Rename some remaining `matrix_*_postgres_*` vars back to `matrix_*_da…
spantaleev Dec 14, 2020
aa828ff
Separate matrix-reminder-bot install/uninstall tasks
spantaleev Dec 14, 2020
dde1c9f
Fix indentation causing YAML syntax error
spantaleev Dec 14, 2020
e3a0c9a
Add (Postgres + SQLite) support to matrix-reminder-bot
spantaleev Dec 14, 2020
54da61f
add postgres support mx-appservice-[slack|irc] with fallback to nedb …
jdreichmann Dec 14, 2020
bc376c2
Add database migration utility to matrix-postgres role
spantaleev Dec 14, 2020
dc7850e
Fix wording and variable names a bit
spantaleev Dec 14, 2020
ac37091
Enable automatic (SQLite -> Postgres) migration for matrix-reminder-bot
spantaleev Dec 14, 2020
c1431b2
Make use of matrix_postgres_db_migration_request.caller
spantaleev Dec 14, 2020
bbc0872
Enable automatic (SQLite -> Postgres) migration for matrix-mautrix-fa…
spantaleev Dec 14, 2020
3ba8520
Enable automatic (SQLite -> Postgres) migration for matrix-mautrix-ha…
spantaleev Dec 14, 2020
86a8091
Enable automatic (SQLite -> Postgres) migration for matrix-mautrix-te…
spantaleev Dec 14, 2020
13f84e2
Enable automatic (SQLite -> Postgres) migration for matrix-mautrix-wh…
spantaleev Dec 14, 2020
cba973d
Enable automatic (SQLite -> Postgres) migration for matrix-appservice…
spantaleev Dec 14, 2020
7248eb3
Fix syntax error in roles/matrix-bridge-appservice-irc/defaults/main.yml
spantaleev Dec 14, 2020
0ca48f3
Separate matrix-ma1sd install/uninstall tasks
spantaleev Dec 14, 2020
af3ea67
Add (SQLite + Postgres) support and automatic migration to matrix-ma1sd
spantaleev Dec 14, 2020
3ab7dd1
Potentially add matrix-postgres.service as required for bridges, etc.
spantaleev Dec 14, 2020
13d8a9b
hint supported automatic migration nedb->postgres
jdreichmann Dec 14, 2020
516ccb2
Separate matrix-registration install/uninstall tasks
spantaleev Dec 14, 2020
8d74593
Prepare matrix-registation for (SQLite + Postgres) support
spantaleev Dec 14, 2020
374f437
Separate matrix-dimension install/uninstall tasks
spantaleev Dec 14, 2020
0790a7b
Add support for matrix_dimension_systemd_{required,wanted}_services_list
spantaleev Dec 14, 2020
2a502db
Add (SQLite + Postgres) support and automatic migration to matrix-dim…
spantaleev Dec 14, 2020
dd797ba
Fix Postgres database importing/upgrading conflicts
spantaleev Dec 14, 2020
e2ba46b
Fix Jinja2 syntax error (else if -> elif)
spantaleev Dec 14, 2020
6a3f6fb
Missing ` in traefik domains instructions
straend Dec 15, 2020
6ebebca
Merge pull request #754 from straend/patch-1
spantaleev Dec 15, 2020
69f71f4
Upgrade matrix-registration (v0.7.1 -> 0.7.2) and use official image
spantaleev Dec 15, 2020
3289298
Merge branch 'master' into postgres-per-default
spantaleev Dec 15, 2020
1bd5c24
Add support for executing additional DB migration statements
spantaleev Dec 15, 2020
a197968
Make matrix-registration use Postgres by default
spantaleev Dec 15, 2020
a4b8bae
Fix inability to send (Matrix -> Discord) messages via appservice-dis…
spantaleev Dec 16, 2020
0f4649a
Merge branch 'master' into postgres-per-default
spantaleev Dec 16, 2020
db69a51
Do not recommend usePrivilegedIntents for appservice-discord
spantaleev Dec 16, 2020
e2e6cfa
Document Ansible's Python interpreter discovery some more
spantaleev Dec 16, 2020
ed159cc
Move matrix_architecture to matrix-base
spantaleev Dec 17, 2020
55f252a
Do not hardcode amd64 in setup_debian.yml
spantaleev Dec 17, 2020
f545de5
Do not hardcode "ubuntu" for the Docker APT key URL
spantaleev Dec 17, 2020
a09ed58
Ensure gnupg installed on Raspbian
spantaleev Dec 17, 2020
349fbb6
Do not hardcode armhf for Raspbian
spantaleev Dec 17, 2020
8748f3d
Move python{,3}-docker installation to another task
spantaleev Dec 17, 2020
d0ee86e
Fix matrix_corporal_docker_image_name_prefix referencing matrix_synap…
spantaleev Dec 21, 2020
dcd4716
add option to disable nginx access log
0x46616c6b Dec 20, 2020
ca06621
Merge pull request #757 from 0x46616c6b/disable-nginx-logging-option
spantaleev Dec 21, 2020
6488e11
Relocate some tasks
spantaleev Dec 22, 2020
9b4bf73
Fix undefined variable reference
spantaleev Dec 22, 2020
149872e
Add support for automatic (Postgres -> SQLite) migration to mx-puppet…
spantaleev Dec 22, 2020
e64758c
Add missing restart task
spantaleev Dec 22, 2020
44c9f4d
Add support for automatic (Postgres -> SQLite) migration to mx-puppet…
spantaleev Dec 22, 2020
d135cd9
Ensure mx-puppet-discord directories are created before attempting mi…
spantaleev Dec 22, 2020
10e0fa1
Update nginx (1.19.5 -> 1.19.6)
thedanbob Dec 22, 2020
c180fa4
Merge pull request #760 from thedanbob/nginx-1.19.6
spantaleev Dec 22, 2020
c3b63c6
Update element-web (1.7.15 -> 1.7.16)
thedanbob Dec 22, 2020
e49eb07
Add support for automatic (Postgres -> SQLite) migration to mx-puppet…
spantaleev Dec 22, 2020
a80b5b2
Merge pull request #761 from thedanbob/element-1.7.16
spantaleev Dec 22, 2020
262a25f
Add support for automatic (Postgres -> SQLite) migration to mx-puppet…
spantaleev Dec 22, 2020
69cc214
Add support for automatic (Postgres -> SQLite) migration to mx-puppet…
spantaleev Dec 22, 2020
ab6563c
Add support for automatic (Postgres -> SQLite) migration to mx-puppet…
spantaleev Dec 22, 2020
15f4cc9
Rename variables (_database_db_name -> _database_name)
spantaleev Dec 22, 2020
815a80c
Fix alignment issues
spantaleev Dec 22, 2020
715bdf2
Add support for automatic (nedb -> Postgres) migration to mx-appservi…
spantaleev Dec 22, 2020
9b95e19
Auto-restart matrix-appservice-irc after (nedb -> Postgres) migration
spantaleev Dec 22, 2020
8675ded
Add support for automatic (nedb -> Postgres) migration to matrix-apps…
spantaleev Dec 22, 2020
ad1425e
Add pgloader self-building support (for ARM)
spantaleev Dec 23, 2020
f19b298
Merge pull request #740 from jdreichmann/postgres-per-default
spantaleev Dec 23, 2020
3475b98
Announce the big move to all-on-Postgres
spantaleev Dec 23, 2020
4fe1248
Update changelog entry to be more informative
spantaleev Dec 23, 2020
c5f8b1f
Fix mautrix-whatsapp Postgres connection string to not use SSL by def…
spantaleev Dec 23, 2020
4675c8a
Update updating-users-passwords.md
KloolK Dec 23, 2020
9f00970
Do not use salts longer than 16 characters
spantaleev Dec 23, 2020
f3fc832
Merge pull request #764 from KloolK/patch-1
spantaleev Dec 23, 2020
8b61747
Fixup Dimension database schema a bit after pgloader import
spantaleev Dec 23, 2020
ea804f2
Do not use underscore in salts passed to sha512
spantaleev Dec 23, 2020
be0c599
Feed more slashes to mautrix bridges when using SQLite
spantaleev Dec 23, 2020
019a4d7
Use role relative paths for things
Cadair Dec 23, 2020
a284b6f
Merge pull request #765 from Cadair/fix-db
spantaleev Dec 23, 2020
21662af
Archive database only after additional_psql_statements_list had executed
spantaleev Dec 23, 2020
80c7261
Fixup all Dimension boolean fields after pgloader import
spantaleev Dec 23, 2020
a2a4218
Make mautrix-python-based bridges E2EE happier
spantaleev Dec 23, 2020
befffa9
Fix concatenation of additional databases
lxp Dec 23, 2020
067f12b
Merge pull request #766 from lxp/fix-postgres-upgrade
spantaleev Dec 23, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# These are supported funding model platforms

# https://liberapay.com/s.pantaleev/
liberapay: s.pantaleev
88 changes: 88 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,91 @@
# 2020-12-23

## The big move to all-on-Postgres (potentially dangerous)

**TLDR**: all your bridges (and other services) will likely be auto-migrated from SQLite/nedb to Postgres, hopefully without trouble. You can opt-out (see how below), if too worried about breakage.

Until now, we've only used Postgres as a database for Synapse. All other services (bridges, bots, etc.) were kept simple and used a file-based database (SQLite or nedb).

Since [this huge pull request](https://github.com/spantaleev/matrix-docker-ansible-deploy/pull/740), **all of our services now use Postgres by default**. Thanks to [Johanna Dorothea Reichmann](https://github.com/jdreichmann) for starting the work on it and for providing great input!

Moving all services to Postgres brings a few **benefits** to us:

- **improved performance**
- **improved compatibility**. Most bridges are deprecating SQLite/nedb support or offer less features when not on Postgres.
- **easier backups**. It's still some effort to take a proper backup (Postgres dump + various files, keys), but a Postgres dump now takes you much further.
- we're now **more prepared to introduce other services** that need a Postgres database - [Dendrite](https://github.com/matrix-org/dendrite), the [mautrix-signal](https://github.com/tulir/mautrix-signal) bridge (existing [pull request](https://github.com/spantaleev/matrix-docker-ansible-deploy/pull/686)), etc.

### Key takeway

- existing installations that use an [external Postgres](https://github.com/spantaleev/matrix-docker-ansible-deploy/blob/master/docs/configuring-playbook-external-postgres.md) server should be unaffected (they remain on SQLite/nedb for all services, except Synapse)

- for existing installations which use our integrated Postgres database server (`matrix-postgres`, which is the default), **we automatically migrate data** from SQLite/nedb to Postgres and **archive the database files** (`something.db` -> `something.db.backup`), so you can restore them if you need to go back (see how below).

### Opting-out of the Postgres migration

This is a **very large and somewhat untested change** (potentially dangerous), so **if you're not feeling confident/experimental, opt-out** of it for now. Still, it's the new default and what we (and various bridges) will focus on going forward, so don't stick to old ways for too long.

You can remain on SQLite/nedb (at least for now) by adding a variable like this to your `vars.yml` file for each service you use: `matrix_COMPONENT_database_engine: sqlite` (e.g. `matrix_mautrix_facebook_database_engine: sqlite`).

Some services (like `appservice-irc` and `appservice-slack`) don't use SQLite, so use `nedb`, instead of `sqlite` for them.

### Going back to SQLite/nedb if things went wrong

If you went with the Postgres migration and it went badly for you (some bridge not working as expected or not working at all), do this:

- stop all services (`ansible-playbook -i inventory/hosts setup.yml --tags=stop`)
- SSH into the server and rename the old database files (`something.db.backup` -> `something.db`). Example: `mv /matrix/mautrix-facebook/data/mautrix-facebook.db.backup /matrix/mautrix-facebook/data/mautrix-facebook.db`
- switch the affected service back to SQLite (e.g. `matrix_mautrix_facebook_database_engine: sqlite`). Some services (like `appservice-irc` and `appservice-slack`) don't use SQLite, so use `nedb`, instead of `sqlite` for them.
- re-run the playbook (`ansible-playbook -i inventory/hosts setup.yml --tags=setup-all,start`)
- [get in touch](README.md#support) with us


# 2020-12-11

## synapse-janitor support removed

We've removed support for the unmaintained [synapse-janitor](https://github.com/xwiki-labs/synapse_scripts) script. There's been past reports of it corrupting the Synapse database. Since there hasn't been any new development on it and it doesn't seem too useful nowadays, there's no point in including it in the playbook.

If you need to clean up or compact your database, consider using the Synapse Admin APIs directly. See our [Synapse maintenance](docs/maintenance-synapse.md) and [Postgres maintenance](docs/maintenance-postgres.md) documentation pages for more details.


## Docker 20.10 is here

(No need to do anything special in relation to this. Just something to keep in mind)

Docker 20.10 got released recently and your server will likely get it the next time you update.

This is the first major Docker update in a long time and it packs a lot of changes.
Some of them introduced some breakage for us initially (see [here](https://github.com/spantaleev/matrix-docker-ansible-deploy/commit/d08b27784f222effcbce2abf924bf07bbe0893be) and [here](https://github.com/spantaleev/matrix-docker-ansible-deploy/commit/7593d969e316cc0144bce378a5be58c76c2c37ee)), but it should be all good now.


# 2020-12-08

## openid APIs exposed by default on the federation port when federation disabled

We've changed some defaults. People running with our default configuration (federation enabled), are not affected at all.

If you are running an unfederated server (`matrix_synapse_federation_enabled: false`), this may be of interest to you.

When federation is disabled, but ma1sd or Dimension are enabled, we'll now expose the `openid` APIs on the federation port.
These APIs are necessary for some ma1sd features to work. If you'd like to prevent this, you can: `matrix_synapse_federation_port_openid_resource_required: false`.


# 2020-11-27

## Recent Jitsi updates may require configuration changes

We've recently [updated from Jitsi build 4857 to build 5142](https://github.com/spantaleev/matrix-docker-ansible-deploy/pull/719), which brings a lot of configuration changes.

**If you use our default Jitsi settings, you won't have to do anything.**

People who have [fine-tuned Jitsi](docs/configuring-playbook-jitsi.md#optional-fine-tune-jitsi) may find that some options got renamed now, others are gone and yet others still need to be defined in another way.

The next time you run the playbook [installation](docs/installing.md) command, our validation logic will tell you if you're using some variables like that and will recommend a migration path for each one.

Additionally, we've recently disabled transcriptions (`matrix_jitsi_enable_transcriptions: false`) and recording (`matrix_jitsi_enable_recording: false`) by default. These features did not work anyway, because we don't install the required dependencies for them (Jigasi and Jibri, respectively). If you've been somehow pointing your Jitsi installation to some manually installed Jigasi/Jibri service, you may need to toggle these flags back to enabled to have transcriptions and recordings working.


# 2020-11-23

## Breaking change matrix-sms-bridge
Expand Down
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
[![Support room on Matrix](https://img.shields.io/matrix/matrix-docker-ansible-deploy:devture.com.svg?label=%23matrix-docker-ansible-deploy%3Adevture.com&logo=matrix&style=for-the-badge&server_fqdn=matrix.devture.com)](https://matrix.to/#/#matrix-docker-ansible-deploy:devture.com) [![donate](https://liberapay.com/assets/widgets/donate.svg)](https://liberapay.com/s.pantaleev/donate)

# Matrix (An open network for secure, decentralized communication) server setup using Ansible and Docker

## Purpose
Expand Down
6 changes: 3 additions & 3 deletions docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,13 @@

- [Installing](installing.md)

- **Importing data from another Synapse server installation**
- **Importing data from another server installation**

- [Importing an existing SQLite database (from another installation)](importing-sqlite.md) (optional)
- [Importing an existing SQLite database (from another Synapse installation)](importing-synapse-sqlite.md) (optional)

- [Importing an existing Postgres database (from another installation)](importing-postgres.md) (optional)

- [Importing `media_store` data files from an existing installation](importing-media-store.md) (optional)
- [Importing `media_store` data files from an existing Synapse installation](importing-synapse-media-store.md) (optional)

- [Registering users](registering-users.md)

Expand Down
8 changes: 4 additions & 4 deletions docs/configuring-playbook-bridge-appservice-discord.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,10 @@ matrix_appservice_discord_client_id: "YOUR DISCORD APP CLIENT ID"
matrix_appservice_discord_bot_token: "YOUR DISCORD APP BOT TOKEN"
```

4. If you've already installed Matrix services using the playbook before, you'll need to re-run it (`--tags=setup-all,start`). If not, proceed with [configuring other playbook services](configuring-playbook.md) and then with [Installing](installing.md). Get back to this guide once ready.
5. Retrieve Discord invite link from the `{{ matrix_appservice_discord_config_path }}/invite_link` file on the server (this defaults to `/matrix/appservice-discord/config/invite_link`). You need to peek at the file on the server via SSH, etc., because it's not available via HTTP(S).
6. Invite the Bot to Discord servers you wish to bridge. Administrator permission is recommended.
7. Room addresses follow this syntax: `#_discord_guildid_channelid`. You can easily find the guild and channel ids by logging into Discord in a browser and opening the desired channel. The URL will have this format: `discordapp.com/channels/guild_id/channel_id`. Once you have figured out the appropriate room addrss, you can join by doing `/join #_discord_guildid_channelid` in your Matrix client.
5. If you've already installed Matrix services using the playbook before, you'll need to re-run it (`--tags=setup-all,start`). If not, proceed with [configuring other playbook services](configuring-playbook.md) and then with [Installing](installing.md). Get back to this guide once ready.
6. Retrieve Discord invite link from the `{{ matrix_appservice_discord_config_path }}/invite_link` file on the server (this defaults to `/matrix/appservice-discord/config/invite_link`). You need to peek at the file on the server via SSH, etc., because it's not available via HTTP(S).
7. Invite the Bot to Discord servers you wish to bridge. Administrator permission is recommended.
8. Room addresses follow this syntax: `#_discord_guildid_channelid`. You can easily find the guild and channel ids by logging into Discord in a browser and opening the desired channel. The URL will have this format: `discordapp.com/channels/guild_id/channel_id`. Once you have figured out the appropriate room addrss, you can join by doing `/join #_discord_guildid_channelid` in your Matrix client.

Other configuration options are available via the `matrix_appservice_discord_configuration_extension_yaml` variable.

Expand Down
5 changes: 4 additions & 1 deletion docs/configuring-playbook-dimension.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@
**[Dimension](https://dimension.t2bot.io) can only be installed after Matrix services are installed and running.**
If you're just installing Matrix services for the first time, please continue with the [Configuration](configuring-playbook.md) / [Installation](installing.md) flow and come back here later.

**Note**: enabling Dimension, means that the `openid` API endpoints will be exposed on the Matrix Federation port (usually `8448`), even if [federation](configuring-playbook-federation.md) is disabled. It's something to be aware of, especially in terms of firewall whitelisting (make sure port `8448` is accessible).


## Prerequisites

This playbook now supports running [Dimension](https://dimension.t2bot.io) in both a federated and an [unfederated](https://github.com/turt2live/matrix-dimension/blob/master/docs/unfederated.md) environment. This is handled automatically based on the value of `matrix_synapse_federation_enabled`.
Expand Down Expand Up @@ -48,7 +51,7 @@ To get an access token for the Dimension user, you can follow one of two options
3. Copy the highlighted text to your configuration.
4. Close the private browsing session. **Do not log out**. Logging out will invalidate the token, making it not work.

*With CURL*
*With CURL*

```
curl -X POST --header 'Content-Type: application/json' -d '{
Expand Down
10 changes: 10 additions & 0 deletions docs/configuring-playbook-federation.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,3 +37,13 @@ matrix_synapse_federation_enabled: false
```

With that, your server's users will only be able to talk among themselves, but not to anyone who is on another server.

**Disabling federation does not necessarily disable the federation port** (`8448`). Services like [Dimension](configuring-playbook-dimension.md) and [ma1sd](configuring-playbook-ma1sd.md) normally rely on `openid` APIs exposed on that port. Even if you disable federation and only if necessary, we may still be exposing the federation port and serving the `openid` APIs there. To override this and completely disable Synapse's federation port use:

```yaml
# This stops the federation port on the Synapse side (normally `matrix-synapse:8048` on the container network).
matrix_synapse_federation_port_enabled: false

# This removes the `8448` virtual host from the matrix-nginx-proxy reverse-proxy server.
matrix_nginx_proxy_proxy_matrix_federation_api_enabled: false
```
2 changes: 1 addition & 1 deletion docs/configuring-playbook-jitsi.md
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ matrix_jitsi_web_custom_config_extension: |

config.disableAudioLevels = true;

# Limit the number of video feeds forwarded to each client
// Limit the number of video feeds forwarded to each client
config.channelLastN = 4;

matrix_jitsi_web_config_resolution_width_ideal_and_max: 480
Expand Down
7 changes: 6 additions & 1 deletion docs/configuring-playbook-ma1sd.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@ By default, this playbook configures an [ma1sd](https://github.com/ma1uta/ma1sd)

This server is private by default, potentially at the expense of user discoverability.

ma1sd is a fork of [mxisd](https://github.com/kamax-io/mxisd) which was pronounced end of life 2019-06-21.
*ma1sd is a fork of [mxisd](https://github.com/kamax-io/mxisd) which was pronounced end of life 2019-06-21.*

**Note**: enabling ma1sd (which is also the default), means that the `openid` API endpoints will be exposed on the Matrix Federation port (usually `8448`), even if [federation](configuring-playbook-federation.md) is disabled. It's something to be aware of, especially in terms of firewall whitelisting (make sure port `8448` is accessible).


## Disabling ma1sd
Expand Down Expand Up @@ -50,6 +52,9 @@ To use the [Registration](https://github.com/ma1uta/ma1sd/blob/master/docs/featu

- `matrix_ma1sd_configuration_extension_yaml` - to configure ma1sd as required. See the [Registration feature's docs](https://github.com/ma1uta/ma1sd/blob/master/docs/features/registration.md) for inspiration. Also see the [Additional features](#additional-features) section below to learn more about how to use `matrix_ma1sd_configuration_extension_yaml`.

**Note**: For this to work, either the homeserver needs to [federate](configuring-playbook-federation.md) or the `openid` APIs need to exposed on the federation port. When federation is disabled and ma1sd is enabled, we automatically expose the `openid` APIs (only!) on the federation port. Make sure the federation port (usually `https://matrix.DOMAIN:8448`) is whitelisted in your firewall (even if you don't actually use/need federation).


## Authentication

[Authentication](https://github.com/ma1uta/ma1sd/blob/master/docs/features/authentication.md) provides the possibility to use your own [Identity Stores](https://github.com/ma1uta/ma1sd/blob/master/docs/stores/README.md) (for example LDAP) to authenticate users on your Homeserver. The following configuration can be used to authenticate against an LDAP server:
Expand Down
9 changes: 8 additions & 1 deletion docs/configuring-playbook-nginx.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,18 @@ matrix_nginx_proxy_proxy_matrix_nginx_status_allowed_addresses:
- 1.1.1.1
```


## Synapse + OpenID Connect for Single-Sign-On

If you want to use OpenID Connect as an SSO provider (as per the [Synapse OpenID docs](https://github.com/matrix-org/synapse/blob/develop/docs/openid.md)), you need to use the following configuration (in your `vars.yml` file) to instruct nginx to forward `/_synapse/oidc` to Synapse:

```yaml
matrix_nginx_proxy_proxy_matrix_client_api_forwarded_location_synapse_oidc_api_enabled: true
```

## Disable Nginx access logs

This will disable the access logging for nginx.

```yaml
matrix_nginx_proxy_access_log_enabled: false
```
2 changes: 1 addition & 1 deletion docs/configuring-playbook-own-webserver.md
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ matrix_nginx_proxy_container_extra_arguments:
- '--label "traefik.enable=true"'

# The Nginx proxy container will receive traffic from these subdomains
- '--label "traefik.http.routers.matrix-nginx-proxy.rule=Host(`{{ matrix_server_fqn_matrix }}`,`{{ matrix_server_fqn_element }}`,`{{ matrix_server_fqn_dimension }},`{{ matrix_server_fqn_jitsi }}`)"'
- '--label "traefik.http.routers.matrix-nginx-proxy.rule=Host(`{{ matrix_server_fqn_matrix }}`,`{{ matrix_server_fqn_element }}`,`{{ matrix_server_fqn_dimension }}`,`{{ matrix_server_fqn_jitsi }}`)"'

# (The 'web-secure' entrypoint must bind to port 443 in Traefik config)
- '--label "traefik.http.routers.matrix-nginx-proxy.entrypoints=web-secure"'
Expand Down
2 changes: 2 additions & 0 deletions docs/configuring-playbook-ssl-certificates.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ By default, it obtains certificates for:
- possibly for `element.<your-domain>`, unless you have disabled the [Element client component](configuring-playbook-client-element.md) using `matrix_client_element_enabled: false`
- possibly for `riot.<your-domain>`, if you have explicitly enabled Riot to Element redirection (for background compatibility) using `matrix_nginx_proxy_proxy_riot_compat_redirect_enabled: true`
- possibly for `dimension.<your-domain>`, if you have explicitly [set up Dimension](configuring-playbook-dimension.md).
- possibly for `jitsi.<your-domain>`, if you have explicitly [set up Jitsi](configuring-playbook-jitsi.md).
- possibly for your base domain (`<your-domain>`), if you have explicitly configured [Serving the base domain](configuring-playbook-base-domain-serving.md)

If you are hosting other domains on the Matrix machine, you can make the playbook obtain and renew certificates for those other domains too.
Expand All @@ -80,6 +81,7 @@ matrix_ssl_domains_to_obtain_certificates_for:
- '{{ matrix_server_fqn_matrix }}'
- '{{ matrix_server_fqn_element }}'
- '{{ matrix_server_fqn_dimension }}'
- '{{ matrix_server_fqn_jitsi }}'
- '{{ matrix_domain }}'
```

Expand Down
4 changes: 2 additions & 2 deletions docs/importing-postgres.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Importing an existing Postgres database from another installation (optional)

Run this if you'd like to import your database from a previous installation of Synapse.
(don't forget to import your `media_store` files as well - see [the importing-media-store guide](importing-media-store.md)).
Run this if you'd like to import your database from a previous installation.
(don't forget to import your Synapse `media_store` files as well - see [the importing-synape-media-store guide](importing-synapse-media-store.md)).


## Prerequisites
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Importing `media_store` data files from an existing installation (optional)
# Importing `media_store` data files from an existing Synapse installation (optional)

Run this if you'd like to import your `media_store` files from a previous installation of Synapse.

Expand All @@ -17,6 +17,6 @@ As an alternative, you can perform a manual restore using the [AWS CLI tool](htt

Run this command (make sure to replace `<server-path-to-media_store>` with a path on your server):

ansible-playbook -i inventory/hosts setup.yml --extra-vars='server_path_media_store=<server-path-to-media_store>' --tags=import-media-store
ansible-playbook -i inventory/hosts setup.yml --extra-vars='server_path_media_store=<server-path-to-media_store>' --tags=import-synapse-media-store

**Note**: `<server-path-to-media_store>` must be a file path to a `media_store` directory on the server (not on your local machine!).
Loading