1
0
mirror of https://github.com/spantaleev/matrix-docker-ansible-deploy.git synced 2025-06-18 22:17:50 +02:00
Files
.github
collections
docs
assets
README.md
alternative-architectures.md
ansible.md
configuring-captcha.md
configuring-dns.md
configuring-playbook-backup-borg.md
configuring-playbook-base-domain-serving.md
configuring-playbook-bot-buscarron.md
configuring-playbook-bot-go-neb.md
configuring-playbook-bot-honoroit.md
configuring-playbook-bot-matrix-registration-bot.md
configuring-playbook-bot-matrix-reminder-bot.md
configuring-playbook-bot-mjolnir.md
configuring-playbook-bridge-appservice-discord.md
configuring-playbook-bridge-appservice-irc.md
configuring-playbook-bridge-appservice-slack.md
configuring-playbook-bridge-appservice-webhooks.md
configuring-playbook-bridge-beeper-linkedin.md
configuring-playbook-bridge-heisenbridge.md
configuring-playbook-bridge-hookshot.md
configuring-playbook-bridge-matrix-bridge-sms.md
configuring-playbook-bridge-mautrix-facebook.md
configuring-playbook-bridge-mautrix-googlechat.md
configuring-playbook-bridge-mautrix-hangouts.md
configuring-playbook-bridge-mautrix-instagram.md
configuring-playbook-bridge-mautrix-signal.md
configuring-playbook-bridge-mautrix-telegram.md
configuring-playbook-bridge-mautrix-twitter.md
configuring-playbook-bridge-mautrix-whatsapp.md
configuring-playbook-bridge-mx-puppet-discord.md
configuring-playbook-bridge-mx-puppet-groupme.md
configuring-playbook-bridge-mx-puppet-instagram.md
configuring-playbook-bridge-mx-puppet-skype.md
configuring-playbook-bridge-mx-puppet-slack.md
configuring-playbook-bridge-mx-puppet-steam.md
configuring-playbook-bridge-mx-puppet-twitter.md
configuring-playbook-client-cinny.md
configuring-playbook-client-element.md
configuring-playbook-client-hydrogen.md
configuring-playbook-dimension.md
configuring-playbook-dynamic-dns.md
configuring-playbook-email.md
configuring-playbook-email2matrix.md
configuring-playbook-etherpad.md
configuring-playbook-external-postgres.md
configuring-playbook-federation.md
configuring-playbook-jitsi.md
configuring-playbook-ldap-auth.md
configuring-playbook-ma1sd.md
configuring-playbook-matrix-corporal.md
configuring-playbook-matrix-registration.md
configuring-playbook-nginx.md
configuring-playbook-own-webserver.md
configuring-playbook-postgres-backup.md
configuring-playbook-prometheus-grafana.md
configuring-playbook-prometheus-postgres.md
configuring-playbook-rest-auth.md
configuring-playbook-riot-web.md
configuring-playbook-s3.md
configuring-playbook-shared-secret-auth.md
configuring-playbook-ssl-certificates.md
configuring-playbook-sygnal.md
configuring-playbook-synapse-admin.md
configuring-playbook-synapse-simple-antispam.md
configuring-playbook-synapse.md
configuring-playbook-telemetry.md
configuring-playbook-turn.md
configuring-playbook.md
configuring-well-known.md
container-images.md
faq.md
getting-the-playbook.md
howto-server-delegation.md
importing-postgres.md
importing-synapse-media-store.md
importing-synapse-sqlite.md
installing.md
maintenance-and-troubleshooting.md
maintenance-checking-services.md
maintenance-migrating.md
maintenance-postgres.md
maintenance-synapse.md
maintenance-upgrading-services.md
prerequisites.md
registering-users.md
self-building.md
uninstalling.md
updating-users-passwords.md
examples
group_vars
inventory
roles
.editorconfig
.gitignore
.yamllint
CHANGELOG.md
LICENSE
README.md
ansible.cfg
setup.yml
matrix-docker-ansible-deploy/docs/configuring-playbook-external-postgres.md

32 lines
2.5 KiB
Markdown
Raw Normal View History

# Using an external PostgreSQL server (optional)
By default, this playbook would set up a PostgreSQL database server on your machine, running in a Docker container.
If that's alright, you can skip this.
If you'd like to use an external PostgreSQL server that you manage, you can edit your configuration file (`inventory/host_vars/matrix.<your-domain>/vars.yml`).
**NOTE**: using **an external Postgres server is currently [not very seamless](https://github.com/spantaleev/matrix-docker-ansible-deploy/issues/1682#issuecomment-1061461683) when it comes to enabling various other playbook services** - you will need to create a new database/credentials for each service and to point each service to its corresponding database using custom `vars.yml` configuration. **For the best experience with the playbook, stick to using the integrated Postgres server**.
If you'd like to use an external Postgres server, use a custom `vars.yml` configuration like this:
```yaml
matrix_postgres_enabled: false
# Rewire Synapse to use your external Postgres server
matrix_synapse_database_host: "your-postgres-server-hostname"
matrix_synapse_database_user: "your-postgres-server-username"
matrix_synapse_database_password: "your-postgres-server-password"
matrix_synapse_database_database: "your-postgres-server-database-name"
# Rewire any other service (each `matrix-*` role) you may wish to use to use your external Postgres server.
# Each service expects to have its own dedicated database on the Postgres server
# and uses its own variable names (see `roles/matrix-*/defaults/main.yml) for configuring Postgres connectivity.
```
The database (as specified in `matrix_synapse_database_database`) must exist and be accessible with the given credentials.
It must be empty or contain a valid Synapse database. If empty, Synapse would populate it the first time it runs.
**Note**: the external server that you specify in `matrix_synapse_database_host` must be accessible from within the `matrix-synapse` Docker container (and possibly other containers too). This means that it either needs to be a publicly accessible hostname or that it's a hostname on the same Docker network where all containers installed by this playbook run (a network called `matrix` by default). Using a local PostgreSQL instance on the host (running on the same machine, but not in a container) is not possible.
The connection to your external Postgres server **will not be SSL encrypted**, as [we don't support that yet](https://github.com/spantaleev/matrix-docker-ansible-deploy/issues/89).