From 7ba7c19699b5ae9e5116b480a9691d61929d8327 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julian-Samuel=20Geb=C3=BChr?= Date: Fri, 5 Aug 2022 14:44:04 +0200 Subject: [PATCH] Add automatic config for ext nginx, adjust docs --- docs/configuring-playbook-bot-maubot.md | 12 ++++++++++++ group_vars/matrix_servers | 2 ++ 2 files changed, 14 insertions(+) diff --git a/docs/configuring-playbook-bot-maubot.md b/docs/configuring-playbook-bot-maubot.md index d74cfb2fc..8d1af01c7 100644 --- a/docs/configuring-playbook-bot-maubot.md +++ b/docs/configuring-playbook-bot-maubot.md @@ -62,8 +62,20 @@ You can expand "Access token" to copy it. **IMPORTANT**: once you copy the token, just close the Matrix client window/tab. Do not "log out", as that would invalidate the token. +## External nginx +To use the management interface with an [external nginx webserver](configuring-playbook-own-webserver.md) the configuration will default to +a http bind port at `127.0.0.1:29316`. If you need to use a different interface add the following to your `vars.yml` (e.g. with `0.0.0.0`). +```yaml +# Controls whether the maubot container exposes its HTTP management interface port (tcp/29316 in the container). +# +# Takes an ":" or "" value (e.g. "127.0.0.1:29316"), or empty string to not expose. +# If you'll be setting this at all, it should be defined in terms of `matrix_bot_maubot_management_interface_port`. +# Example: +# matrix_bot_maubot_management_interface_http_bind_port: "127.0.0.1:{{ matrix_bot_maubot_management_interface_port }}" +matrix_bot_maubot_management_interface_http_bind_port: '0.0.0.0:{{ matrix_bot_maubot_management_interface_port }}' +``` diff --git a/group_vars/matrix_servers b/group_vars/matrix_servers index 52f89cec6..a89e2e9b3 100755 --- a/group_vars/matrix_servers +++ b/group_vars/matrix_servers @@ -1125,6 +1125,8 @@ matrix_bot_maubot_registration_shared_secret: |- }[matrix_homeserver_implementation] }} +matrix_bot_maubot_management_interface_http_bind_port: "{{ '' if matrix_nginx_proxy_enabled else ('127.0.0.1:' + matrix_bot_maubot_management_interface_port | string) }}" + # Postgres is the default, except if not using `matrix_postgres` (internal postgres) matrix_bot_maubot_database_engine: "{{ 'postgres' if matrix_postgres_enabled else 'sqlite' }}" matrix_bot_maubot_database_password: "{{ '%s' | format(matrix_homeserver_generic_secret_key) | password_hash('sha512', 'mxpup.dsc.db') | to_uuid }}"