Compare commits
1 Commits
5.0.0+v1.9
...
3.9.0+v1.8
| Author | SHA1 | Date | |
|---|---|---|---|
| 935b2ccf9f |
13
.env.sample
13
.env.sample
@ -1,21 +1,18 @@
|
|||||||
TYPE=matrix-synapse
|
TYPE=matrix-synapse
|
||||||
DOMAIN=matrix-synapse.example.com
|
DOMAIN=matrix.example.com
|
||||||
#TIMEOUT=300
|
|
||||||
#ENABLE_AUTO_UPDATE=true
|
|
||||||
LETS_ENCRYPT_ENV=production
|
LETS_ENCRYPT_ENV=production
|
||||||
COMPOSE_FILE="compose.yml"
|
COMPOSE_FILE="compose.yml"
|
||||||
# POST_DEPLOY_CMDS="db set_admin"
|
|
||||||
|
|
||||||
## Admin details
|
## Admin details
|
||||||
|
|
||||||
ADMIN_EMAIL=admin@example.com
|
SYNAPSE_ADMIN_EMAIL=admin@example.com
|
||||||
|
|
||||||
## Secrets
|
## Secrets
|
||||||
|
|
||||||
SECRET_DB_PASSWORD_VERSION=v1
|
SECRET_DB_PASSWORD_VERSION=v1
|
||||||
SECRET_FORM_SECRET_VERSION=v1
|
SECRET_FORM_SECRET_VERSION=v1
|
||||||
SECRET_MACAROON_VERSION=v1
|
SECRET_MACAROON_SECRET_KEY_VERSION=v1
|
||||||
SECRET_REGISTRATION_VERSION=v1
|
SECRET_REGISTRATION_SHARED_SECRET_VERSION=v1
|
||||||
|
|
||||||
## Federation
|
## Federation
|
||||||
|
|
||||||
@ -24,8 +21,6 @@ SECRET_REGISTRATION_VERSION=v1
|
|||||||
# Set "true" to enable federation endpoint on $DOMAIN/.well-known/matrix/server
|
# Set "true" to enable federation endpoint on $DOMAIN/.well-known/matrix/server
|
||||||
SERVE_SERVER_WELLKNOWN=false
|
SERVE_SERVER_WELLKNOWN=false
|
||||||
|
|
||||||
ALLOW_PUBLIC_ROOMS_FEDERATION=false
|
|
||||||
|
|
||||||
## Registration
|
## Registration
|
||||||
|
|
||||||
ENABLE_REGISTRATION=false
|
ENABLE_REGISTRATION=false
|
||||||
|
|||||||
@ -24,10 +24,6 @@
|
|||||||
|
|
||||||
## Tips & Tricks
|
## Tips & Tricks
|
||||||
|
|
||||||
### Set Admin User
|
|
||||||
|
|
||||||
`abra app cmd YOURAPPDOMAIN db set_admin <adminuser>`
|
|
||||||
|
|
||||||
### Disabling federation
|
### Disabling federation
|
||||||
|
|
||||||
- Use `DISABLE_FEDERATION=1` to turn off federation listeners
|
- Use `DISABLE_FEDERATION=1` to turn off federation listeners
|
||||||
|
|||||||
14
abra.sh
14
abra.sh
@ -1,19 +1,7 @@
|
|||||||
export DISCORD_BRIDGE_YAML_VERSION=v2
|
export DISCORD_BRIDGE_YAML_VERSION=v2
|
||||||
export ENTRYPOINT_CONF_VERSION=v1
|
export ENTRYPOINT_CONF_VERSION=v1
|
||||||
export HOMESERVER_YAML_VERSION=v24
|
export HOMESERVER_YAML_VERSION=v22
|
||||||
export LOG_CONFIG_VERSION=v2
|
export LOG_CONFIG_VERSION=v2
|
||||||
export SHARED_SECRET_AUTH_VERSION=v1
|
export SHARED_SECRET_AUTH_VERSION=v1
|
||||||
export SIGNAL_BRIDGE_YAML_VERSION=v4
|
export SIGNAL_BRIDGE_YAML_VERSION=v4
|
||||||
export TELEGRAM_BRIDGE_YAML_VERSION=v6
|
export TELEGRAM_BRIDGE_YAML_VERSION=v6
|
||||||
export NGINX_CONFIG_VERSION=v4
|
|
||||||
export WK_SERVER_VERSION=v1
|
|
||||||
export WK_CLIENT_VERSION=v1
|
|
||||||
|
|
||||||
set_admin () {
|
|
||||||
admin=akadmin
|
|
||||||
if [ -n "$1" ]
|
|
||||||
then
|
|
||||||
admin=$1
|
|
||||||
fi
|
|
||||||
psql -U synapse -c "UPDATE users SET admin = 1 WHERE name = '@$admin:$DOMAIN'";
|
|
||||||
}
|
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
version: "3.8"
|
version: "3.8"
|
||||||
|
|
||||||
services:
|
services:
|
||||||
synapse:
|
app:
|
||||||
environment:
|
environment:
|
||||||
- APP_SERVICES_ENABLED
|
- APP_SERVICES_ENABLED
|
||||||
- APP_SERVICE_CONFIGS
|
- APP_SERVICE_CONFIGS
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
version: "3.8"
|
version: "3.8"
|
||||||
|
|
||||||
services:
|
services:
|
||||||
synapse:
|
app:
|
||||||
secrets:
|
secrets:
|
||||||
- db_password
|
- db_password
|
||||||
- form_secret
|
- form_secret
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
version: "3.8"
|
version: "3.8"
|
||||||
|
|
||||||
services:
|
services:
|
||||||
synapse:
|
app:
|
||||||
secrets:
|
secrets:
|
||||||
- keycloak2_client_secret
|
- keycloak2_client_secret
|
||||||
environment:
|
environment:
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
version: "3.8"
|
version: "3.8"
|
||||||
|
|
||||||
services:
|
services:
|
||||||
synapse:
|
app:
|
||||||
secrets:
|
secrets:
|
||||||
- keycloak3_client_secret
|
- keycloak3_client_secret
|
||||||
environment:
|
environment:
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
version: "3.8"
|
version: "3.8"
|
||||||
|
|
||||||
services:
|
services:
|
||||||
synapse:
|
app:
|
||||||
environment:
|
environment:
|
||||||
- SHARED_SECRET_AUTH_ENABLED
|
- SHARED_SECRET_AUTH_ENABLED
|
||||||
secrets:
|
secrets:
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
version: "3.8"
|
version: "3.8"
|
||||||
|
|
||||||
services:
|
services:
|
||||||
synapse:
|
app:
|
||||||
environment:
|
environment:
|
||||||
- APP_SERVICES_ENABLED
|
- APP_SERVICES_ENABLED
|
||||||
- APP_SERVICE_CONFIGS
|
- APP_SERVICE_CONFIGS
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
version: "3.8"
|
version: "3.8"
|
||||||
|
|
||||||
services:
|
services:
|
||||||
synapse:
|
app:
|
||||||
secrets:
|
secrets:
|
||||||
- db_password
|
- db_password
|
||||||
- form_secret
|
- form_secret
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
version: "3.8"
|
version: "3.8"
|
||||||
|
|
||||||
services:
|
services:
|
||||||
synapse:
|
app:
|
||||||
environment:
|
environment:
|
||||||
- APP_SERVICES_ENABLED
|
- APP_SERVICES_ENABLED
|
||||||
- APP_SERVICE_CONFIGS
|
- APP_SERVICE_CONFIGS
|
||||||
@ -10,7 +10,7 @@ services:
|
|||||||
- telegram-data:/telegram-data
|
- telegram-data:/telegram-data
|
||||||
|
|
||||||
telegrambridge:
|
telegrambridge:
|
||||||
image: dock.mau.dev/mautrix/telegram:v0.14.2
|
image: dock.mau.dev/mautrix/telegram:v0.14.0
|
||||||
depends_on:
|
depends_on:
|
||||||
- telegramdb
|
- telegramdb
|
||||||
configs:
|
configs:
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
version: "3.8"
|
version: "3.8"
|
||||||
|
|
||||||
services:
|
services:
|
||||||
synapse:
|
app:
|
||||||
secrets:
|
secrets:
|
||||||
- db_password
|
- db_password
|
||||||
- form_secret
|
- form_secret
|
||||||
|
|||||||
66
compose.yml
66
compose.yml
@ -3,40 +3,11 @@ version: "3.8"
|
|||||||
|
|
||||||
services:
|
services:
|
||||||
app:
|
app:
|
||||||
image: nginx:1.23.3
|
image: "matrixdotorg/synapse:v1.87.0"
|
||||||
networks:
|
|
||||||
- proxy
|
|
||||||
- internal
|
|
||||||
environment:
|
|
||||||
- STACK_NAME
|
|
||||||
configs:
|
|
||||||
- source: nginx_config
|
|
||||||
target: /etc/nginx/nginx.conf
|
|
||||||
- source: wk_server
|
|
||||||
target: /var/www/.well-known/matrix/server
|
|
||||||
- source: wk_client
|
|
||||||
target: /var/www/.well-known/matrix/client
|
|
||||||
deploy:
|
|
||||||
restart_policy:
|
|
||||||
condition: on-failure
|
|
||||||
labels:
|
|
||||||
- "traefik.enable=true"
|
|
||||||
- "traefik.http.services.${STACK_NAME}.loadbalancer.server.port=80"
|
|
||||||
- "traefik.http.routers.${STACK_NAME}.rule=Host(`${DOMAIN}`)"
|
|
||||||
- "traefik.http.routers.${STACK_NAME}.entrypoints=web-secure"
|
|
||||||
- "traefik.http.routers.${STACK_NAME}.tls.certresolver=${LETS_ENCRYPT_ENV}"
|
|
||||||
- "coop-cloud.${STACK_NAME}.version=5.0.0+v1.93.0"
|
|
||||||
- "coop-cloud.${STACK_NAME}.timeout=${TIMEOUT:-120}"
|
|
||||||
healthcheck:
|
|
||||||
test: curl -f http://synapse:8008/health || exit 1
|
|
||||||
interval: 5s
|
|
||||||
timeout: 3s
|
|
||||||
retries: 20
|
|
||||||
|
|
||||||
synapse:
|
|
||||||
image: "matrixdotorg/synapse:v1.93.0"
|
|
||||||
volumes:
|
volumes:
|
||||||
- "data:/data"
|
- "data:/data"
|
||||||
|
depends_on:
|
||||||
|
- db
|
||||||
secrets:
|
secrets:
|
||||||
- db_password
|
- db_password
|
||||||
- registration_shared_secret
|
- registration_shared_secret
|
||||||
@ -44,7 +15,6 @@ services:
|
|||||||
- form_secret
|
- form_secret
|
||||||
environment:
|
environment:
|
||||||
- ALLOWED_LIFETIME_MAX
|
- ALLOWED_LIFETIME_MAX
|
||||||
- ALLOW_PUBLIC_ROOMS_FEDERATION
|
|
||||||
- AUTO_JOIN_ROOM
|
- AUTO_JOIN_ROOM
|
||||||
- AUTO_JOIN_ROOM_ENABLED
|
- AUTO_JOIN_ROOM_ENABLED
|
||||||
- DISABLE_FEDERATION
|
- DISABLE_FEDERATION
|
||||||
@ -71,6 +41,7 @@ services:
|
|||||||
- VIRTUAL_HOST=${DOMAIN}
|
- VIRTUAL_HOST=${DOMAIN}
|
||||||
- VIRTUAL_PORT=8008
|
- VIRTUAL_PORT=8008
|
||||||
networks:
|
networks:
|
||||||
|
- proxy
|
||||||
- internal
|
- internal
|
||||||
entrypoint: /docker-entrypoint.sh
|
entrypoint: /docker-entrypoint.sh
|
||||||
configs:
|
configs:
|
||||||
@ -81,6 +52,16 @@ services:
|
|||||||
- source: entrypoint_conf
|
- source: entrypoint_conf
|
||||||
target: /docker-entrypoint.sh
|
target: /docker-entrypoint.sh
|
||||||
mode: 0555
|
mode: 0555
|
||||||
|
deploy:
|
||||||
|
restart_policy:
|
||||||
|
condition: on-failure
|
||||||
|
labels:
|
||||||
|
- "traefik.enable=true"
|
||||||
|
- "traefik.http.services.${STACK_NAME}.loadbalancer.server.port=8008"
|
||||||
|
- "traefik.http.routers.${STACK_NAME}.rule=Host(`${DOMAIN}`)"
|
||||||
|
- "traefik.http.routers.${STACK_NAME}.entrypoints=web-secure"
|
||||||
|
- "traefik.http.routers.${STACK_NAME}.tls.certresolver=${LETS_ENCRYPT_ENV}"
|
||||||
|
- "coop-cloud.${STACK_NAME}.version=3.9.0+v1.87.0"
|
||||||
healthcheck:
|
healthcheck:
|
||||||
test: ["CMD", "curl", "-f", "http://localhost:8008/health"]
|
test: ["CMD", "curl", "-f", "http://localhost:8008/health"]
|
||||||
interval: 30s
|
interval: 30s
|
||||||
@ -99,7 +80,6 @@ services:
|
|||||||
- POSTGRES_INITDB_ARGS="-E \"UTF8\""
|
- POSTGRES_INITDB_ARGS="-E \"UTF8\""
|
||||||
- POSTGRES_PASSWORD_FILE=/run/secrets/db_password
|
- POSTGRES_PASSWORD_FILE=/run/secrets/db_password
|
||||||
- POSTGRES_USER=synapse
|
- POSTGRES_USER=synapse
|
||||||
- DOMAIN
|
|
||||||
networks:
|
networks:
|
||||||
- internal
|
- internal
|
||||||
healthcheck:
|
healthcheck:
|
||||||
@ -139,18 +119,6 @@ configs:
|
|||||||
name: ${STACK_NAME}_log_config_${LOG_CONFIG_VERSION}
|
name: ${STACK_NAME}_log_config_${LOG_CONFIG_VERSION}
|
||||||
file: log.config.tmpl
|
file: log.config.tmpl
|
||||||
template_driver: golang
|
template_driver: golang
|
||||||
nginx_config:
|
|
||||||
name: ${STACK_NAME}_nginx_config_${NGINX_CONFIG_VERSION}
|
|
||||||
file: nginx.conf.tmpl
|
|
||||||
template_driver: golang
|
|
||||||
wk_server:
|
|
||||||
name: ${STACK_NAME}_wk_server_${WK_SERVER_VERSION}
|
|
||||||
file: well_known_server.conf.tmpl
|
|
||||||
template_driver: golang
|
|
||||||
wk_client:
|
|
||||||
name: ${STACK_NAME}_wk_client_${WK_CLIENT_VERSION}
|
|
||||||
file: well_known_client.conf.tmpl
|
|
||||||
template_driver: golang
|
|
||||||
|
|
||||||
secrets:
|
secrets:
|
||||||
db_password:
|
db_password:
|
||||||
@ -158,10 +126,10 @@ secrets:
|
|||||||
name: ${STACK_NAME}_db_password_${SECRET_DB_PASSWORD_VERSION}
|
name: ${STACK_NAME}_db_password_${SECRET_DB_PASSWORD_VERSION}
|
||||||
registration_shared_secret:
|
registration_shared_secret:
|
||||||
external: true
|
external: true
|
||||||
name: ${STACK_NAME}_registration_${SECRET_REGISTRATION_VERSION}
|
name: ${STACK_NAME}_db_password_${SECRET_REGISTRATION_SHARED_SECRET_VERSION}
|
||||||
macaroon_secret_key:
|
macaroon_secret_key:
|
||||||
external: true
|
external: true
|
||||||
name: ${STACK_NAME}_macaroon_${SECRET_MACAROON_VERSION}
|
name: ${STACK_NAME}_db_password_${SECRET_MACAROON_SECRET_KEY_VERSION}
|
||||||
form_secret:
|
form_secret:
|
||||||
external: true
|
external: true
|
||||||
name: ${STACK_NAME}_form_secret_${SECRET_FORM_SECRET_VERSION}
|
name: ${STACK_NAME}_db_password_${SECRET_FORM_SECRET_VERSION}
|
||||||
|
|||||||
@ -78,7 +78,7 @@ allow_public_rooms_without_auth: false
|
|||||||
# If set to 'true', allows any other homeserver to fetch the server's public
|
# If set to 'true', allows any other homeserver to fetch the server's public
|
||||||
# rooms directory via federation. Defaults to 'false'.
|
# rooms directory via federation. Defaults to 'false'.
|
||||||
#
|
#
|
||||||
allow_public_rooms_over_federation: {{ env "ALLOW_PUBLIC_ROOMS_FEDERATION" }}
|
allow_public_rooms_over_federation: false
|
||||||
|
|
||||||
listeners:
|
listeners:
|
||||||
# Unsecure HTTP listener: for when matrix traffic passes through a reverse proxy
|
# Unsecure HTTP listener: for when matrix traffic passes through a reverse proxy
|
||||||
|
|||||||
@ -1,31 +0,0 @@
|
|||||||
user www-data;
|
|
||||||
|
|
||||||
events {
|
|
||||||
worker_connections 768;
|
|
||||||
}
|
|
||||||
|
|
||||||
http {
|
|
||||||
server {
|
|
||||||
listen 80;
|
|
||||||
|
|
||||||
access_log off;
|
|
||||||
error_log /dev/null;
|
|
||||||
|
|
||||||
server_name {{ env "DOMAIN" }};
|
|
||||||
|
|
||||||
location ~* ^(\/_matrix|\/_synapse\/client) {
|
|
||||||
proxy_pass http://{{ env "STACK_NAME"}}_synapse:8008;
|
|
||||||
proxy_set_header X-Forwarded-For $remote_addr;
|
|
||||||
proxy_set_header X-Forwarded-Proto $scheme;
|
|
||||||
proxy_set_header Host $host;
|
|
||||||
client_max_body_size 50M;
|
|
||||||
proxy_http_version 1.1;
|
|
||||||
}
|
|
||||||
|
|
||||||
location /.well-known/matrix/ {
|
|
||||||
root /var/www/;
|
|
||||||
default_type application/json;
|
|
||||||
add_header Access-Control-Allow-Origin *;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -1,8 +0,0 @@
|
|||||||
We had to rename some secrets: https://git.coopcloud.tech/coop-cloud/matrix-synapse/issues/35
|
|
||||||
|
|
||||||
Copy the secrets:
|
|
||||||
|
|
||||||
* `registration_shared_secret` to `registration`
|
|
||||||
* `macaroon_secret_key` to `macaroon`
|
|
||||||
|
|
||||||
Regeneration of these secrets should also work.
|
|
||||||
@ -1,17 +0,0 @@
|
|||||||
An Nginx proxy has been configured as the entrypoint for Synapse. This is not
|
|
||||||
optional. This is done to counteract IP collection in Synapse itself. See more:
|
|
||||||
|
|
||||||
!!! You MUST undeploy your Synapse install before upgrading to this version !!!
|
|
||||||
|
|
||||||
This is because there have been a service rename in the recipe configuration:
|
|
||||||
|
|
||||||
* `app` -> `synapse`
|
|
||||||
|
|
||||||
This could break stuff in the recipe, so please report issues if you run into
|
|
||||||
anything!
|
|
||||||
|
|
||||||
https://git.coopcloud.tech/coop-cloud/matrix-synapse/issues/38
|
|
||||||
|
|
||||||
Thanks!
|
|
||||||
|
|
||||||
-- d1
|
|
||||||
@ -1,5 +0,0 @@
|
|||||||
{
|
|
||||||
"m.homeserver": {
|
|
||||||
"base_url": "https://{{ env "DOMAIN" }}"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -1,3 +0,0 @@
|
|||||||
{
|
|
||||||
"m.server": "{{ env "DOMAIN" }}:443"
|
|
||||||
}
|
|
||||||
Reference in New Issue
Block a user