Compare commits

..

No commits in common. "89c255825c3b0aee0a5d91a2bc018ea36dda7622" and "5d7905c83783d731b67ed28d19ce30555a7af3e4" have entirely different histories.

17 changed files with 44 additions and 158 deletions

View File

@ -103,7 +103,7 @@ redirect_domain_mappings:
- { source: "funkwhale.{{top_domain}}", target: "music.{{top_domain}}" }
- { source: "pixelfed.{{top_domain}}", target: "picture.{{top_domain}}" }
- { source: "pictures.{{top_domain}}", target: "picture.{{top_domain}}" }
- { source: "element.{{top_domain}}", target: "chat.{{top_domain}}" }
- { source: "matrix.{{top_domain}}", target: "chat.{{top_domain}}" }
## Docker Applications
@ -120,8 +120,7 @@ domain_mailu: "mail.{{top_domain}}"
domain_mastodon: "microblog.{{top_domain}}"
domains_mastodon_alternates: []
domain_matomo: "matomo.{{top_domain}}"
domain_matrix_synapse: "matrix.{{top_domain}}"
domain_matrix_element: "chat.{{top_domain}}"
domain_matrix: "chat.{{top_domain}}"
domain_mediawiki: "wiki.{{top_domain}}"
domain_nextcloud: "cloud.{{top_domain}}"
domain_pixelfed: "picture.{{top_domain}}"
@ -139,5 +138,3 @@ version_mastodon: "latest"
### Role specific configuration
pixelfed_app_name: "Pictures"
top_domain: "localhost"

View File

@ -2,9 +2,9 @@
BASEROW_PUBLIC_URL=https://{{ domain }}
# Email Server Configuration
EMAIL_SMTP={{ system_email_smtp | upper }}
EMAIL_SMTP=True
EMAIL_SMTP_HOST={{ system_email_host }}
EMAIL_SMTP_PORT={{ system_email_smtp_port }}
EMAIL_SMTP_PORT={{ system_email_port }}
EMAIL_SMTP_USER={{ system_email_username }}
EMAIL_SMTP_PASSWORD={{ system_email_password }}
EMAIL_SMTP_USE_TLS={{ system_email_tls | upper }}
EMAIL_SMTP_USE_TLS=tls

View File

@ -197,12 +197,12 @@ ALLOW_GREENLIGHT_ACCOUNTS=true
SMTP_SERVER={{system_email_host}}
SMTP_DOMAIN={{domain}}
SMTP_PORT={{system_email_smtp_port}}
SMTP_PORT={{system_email_port}}
SMTP_USERNAME={{system_email_username}}
SMTP_PASSWORD={{system_email_password}}
SMTP_AUTH=plain
SMTP_OPENSSL_VERIFY_MODE=none
SMTP_STARTTLS_AUTO={{system_email_start_tls}}
SMTP_STARTTLS_AUTO=true
SMTP_SENDER={{system_email_username}}
SMTP_SENDER_EMAIL={{system_email_username}}

View File

@ -64,10 +64,10 @@ env:
# SMTP ADDRESS, username, and password are required
# WARNING the char '#' in SMTP password can cause problems!
DISCOURSE_SMTP_ADDRESS: {{system_email_host}}
DISCOURSE_SMTP_PORT: {{system_email_smtp_port}}
DISCOURSE_SMTP_PORT: 587
DISCOURSE_SMTP_USER_NAME: {{system_email}}
DISCOURSE_SMTP_PASSWORD: {{system_email_password}}
DISCOURSE_SMTP_ENABLE_START_TLS: {{ system_email_start_tls | upper }}
DISCOURSE_SMTP_ENABLE_START_TLS: true # (optional, default true)
DISCOURSE_SMTP_DOMAIN: {{system_email_domain}}
DISCOURSE_NOTIFICATION_EMAIL: {{system_email}}

View File

@ -52,7 +52,7 @@ LOGLEVEL=error
# (returns `noreply%40youremail.host`)
# EMAIL_CONFIG=smtp://user:password@youremail.host:25
# EMAIL_CONFIG=smtp+ssl://user:password@youremail.host:465
# EMAIL_CONFIG=smtp+tls://user:password@youremail.host:{{system_email_smtp_port}}
# EMAIL_CONFIG=smtp+tls://user:password@youremail.host:587
# Make e-mail verification mandatory before using the service
# Doesn't apply to admins.

View File

@ -69,7 +69,7 @@ services:
- "127.0.0.1:{{ http_port }}:80"
- "{{ ip4_address }}:25:25"
- "{{ ip4_address }}:465:465"
- "{{ ip4_address }}:{{system_email_smtp_port}}:{{system_email_smtp_port}}"
- "{{ ip4_address }}:{{system_email_port}}:{{system_email_port}}"
- "{{ ip4_address }}:110:110"
- "{{ ip4_address }}:995:995"
- "{{ ip4_address }}:143:143"

View File

@ -14,7 +14,7 @@ REDIS_HOST=redis
REDIS_PORT=6379
REDIS_PASSWORD=
SMTP_SERVER={{system_email_host}}
SMTP_PORT={{system_email_smtp_port}}
SMTP_PORT={{system_email_port}}
SMTP_LOGIN={{system_email_username}}
SMTP_PASSWORD={{system_email_password}}
SMTP_AUTH_METHOD=plain

View File

@ -23,7 +23,7 @@ Matrix is an open-source project that provides a protocol for secure, decentrali
- **Create Matrix Users**:
```
docker compose exec -it synapse register_new_matrix_user -u [Username] -p [Password] -a -c /data/homeserver.yaml http://localhost:8008
docker exec -it [Container-ID] register_new_matrix_user -u [Username] -p [Password] -a -c /data/homeserver.yaml http://localhost:8008
```
- **Execute Docker-Compose Commands**:
- Restart services:
@ -34,13 +34,6 @@ Matrix is an open-source project that provides a protocol for secure, decentrali
```
docker-compose logs
```
## Sources
### Guides
- https://matrix-org.github.io/synapse/latest/usage/configuration/config_documentation.html
- https://cyberhost.uk/element-matrix-setup/
- https://www.linode.com/docs/guides/how-to-install-the-element-chat-app/
- https://hub.docker.com/r/vectorim/element-web
## Links to ChatGPT Conversations

View File

@ -1,15 +1,6 @@
---
- name: "include tasks nginx-docker-proxy-domain.yml"
include_tasks: nginx-docker-proxy-domain.yml
vars:
domain: "{{synapse_domain}}"
http_port: "{{synapse_http_port}}"
- name: "include tasks nginx-docker-proxy-domain.yml"
include_tasks: nginx-docker-proxy-domain.yml
vars:
domain: "{{element_domain}}"
http_port: "{{element_http_port}}"
- name: "create {{docker_compose_instance_directory}}"
file:
@ -17,12 +8,6 @@
state: directory
mode: 0755
- name: add element-config.json
template:
src: "element-config.json.j2"
dest: "{{docker_compose_instance_directory}}element-config.json"
notify: recreate matrix
- name: add homeserver.yaml
template:
src: "homeserver.yaml.j2"
@ -32,13 +17,13 @@
- name: add log.config
template:
src: "log.config.j2"
dest: "{{docker_compose_instance_directory}}{{synapse_domain}}.log.config"
dest: "{{docker_compose_instance_directory}}{{domain}}.log.config"
notify: recreate matrix
# https://github.com/matrix-org/synapse/issues/6303
- name: set correct folder permissions
command:
cmd: "docker run --rm --mount type=volume,src=matrix_synapse_data,dst=/data -e SYNAPSE_SERVER_NAME={{synapse_domain}} -e SYNAPSE_REPORT_STATS=no --entrypoint /bin/sh matrixdotorg/synapse:latest -c 'chown -vR 991:991 /data'"
cmd: "docker run --rm --mount type=volume,src=matrix_synapse_data,dst=/data -e SYNAPSE_SERVER_NAME={{domain}} -e SYNAPSE_REPORT_STATS=no --entrypoint /bin/sh matrixdotorg/synapse:latest -c 'chown -vR 991:991 /data'"
- name: add docker-compose.yml
template:

View File

@ -10,38 +10,32 @@ services:
volumes:
- synapse_data:/data
- ./homeserver.yaml:/data/homeserver.yaml:ro
- ./{{synapse_domain}}.log.config:/data/{{synapse_domain}}.log.config:ro
- ./{{domain}}.log.config:/data/{{domain}}.log.config:ro
environment:
- SYNAPSE_SERVER_NAME={{synapse_domain}}
- SYNAPSE_SERVER_NAME={{domain}}
- SYNAPSE_REPORT_STATS=no
ports:
- "127.0.0.1:{{synapse_http_port}}:8008"
- "127.0.0.1:{{http_port}}:8008"
depends_on:
- database
database:
logging:
driver: journald
image: postgres:16
restart: unless-stopped
volumes:
- database:/var/lib/postgresql/data
image: mariadb
restart: always
environment:
- POSTGRES_DB=matrix
- POSTGRES_USER=matrix
- POSTGRES_PASSWORD={{matrix_database_password}}
- POSTGRES_INITDB_ARGS=--encoding=UTF8 --locale=C
healthcheck:
test: ["CMD-SHELL", "pg_isready -U matrix"]
interval: 10s
timeout: 5s
retries: 6
element:
image: vectorim/element-web:latest
restart: unless-stopped
MYSQL_DATABASE: "matrix"
MYSQL_USER: "matrix"
MYSQL_PASSWORD: "{{matrix_database_password}}"
MYSQL_ROOT_PASSWORD: "{{matrix_database_password}}"
MARIADB_AUTO_UPGRADE: "1"
volumes:
- ./element-config.json:/app/config.json
ports:
- "127.0.0.1:{{element_http_port}}:80"
- database:/var/lib/mysql
healthcheck:
test: "/usr/bin/mariadb --user=matrix --password={{matrix_database_password}} --execute \"SHOW DATABASES;\""
interval: 3s
timeout: 1s
retries: 5
# bridges
#mautrix-telegram:

View File

@ -1,59 +0,0 @@
{
"default_server_config": {
"m.homeserver": {
"base_url": "https://{{domain_matrix_synapse}}",
"server_name": "{{domain_matrix_synapse}}"
},
"m.identity_server": {
"base_url": "https://{{top_domain}}"
}
},
"brand": "Element",
"integrations_ui_url": "https://scalar.vector.im/",
"integrations_rest_url": "https://scalar.vector.im/api",
"integrations_widgets_urls": [
"https://scalar.vector.im/_matrix/integrations/v1",
"https://scalar.vector.im/api",
"https://scalar-staging.vector.im/_matrix/integrations/v1",
"https://scalar-staging.vector.im/api",
"https://scalar-staging.riot.im/scalar/api"
],
"bug_report_endpoint_url": "https://element.io/bugreports/submit",
"uisi_autorageshake_app": "element-auto-uisi",
"show_labs_settings": true,
"room_directory": {
"servers": ["matrix.org", "gitter.im", "libera.chat"]
},
"enable_presence_by_hs_url": {
"https://matrix.org": false,
"https://matrix-client.matrix.org": false
},
"terms_and_conditions_links": [
{
"url": "https://element.io/privacy",
"text": "Privacy Policy"
},
{
"url": "https://element.io/cookie-policy",
"text": "Cookie Policy"
}
],
"sentry": {
"dsn": "https://029a0eb289f942508ae0fb17935bd8c5@sentry.matrix.org/6",
"environment": "develop"
},
"posthog": {
"project_api_key": "phc_Jzsm6DTm6V2705zeU5dcNvQDlonOR68XvX2sh1sEOHO",
"api_host": "https://posthog.element.io"
},
"privacy_policy_url": "https://element.io/cookie-policy",
"features": {
"feature_video_rooms": true,
"feature_rust_crypto": true,
"feature_new_room_decoration_ui": true
},
"element_call": {
"url": "https://call.element.dev"
},
"map_style_url": "https://api.maptiler.com/maps/streets/style.json?key=fU3vlMsMn4Jb6dnEIFsx"
}

View File

@ -1,4 +1,4 @@
server_name: "{{domain_matrix_synapse}}"
server_name: "{{domain}}"
pid_file: /data/homeserver.pid
listeners:
- port: 8008
@ -9,7 +9,7 @@ listeners:
- names: [client, federation]
compress: false
database:
name: psycopg2
name: mysql
args:
user: matrix
password: {{matrix_database_password}}
@ -17,30 +17,12 @@ database:
host: database
cp_min: 5
cp_max: 10
log_config: "/data/{{domain_matrix_synapse}}.log.config"
log_config: "/data/{{domain}}.log.config"
media_store_path: /data/media_store
registration_shared_secret: "{{matrix_registration_shared_secret}}"
report_stats: true
macaroon_secret_key: "{{matrix_macaroon_secret_key}}"
form_secret: "{{matrix_form_secret}}"
signing_key_path: "/data/{{domain_matrix_synapse}}.signing.key"
web_client_location: "https://{{element_domain}}"
public_baseurl: "https://{{synapse_domain}}"
signing_key_path: "/data/{{domain}}.signing.key"
trusted_key_servers:
- server_name: "matrix.org"
admin_contact: 'mailto:{{administrator_email}}'
email:
smtp_host: "{{system_email_host}}"
smtp_port: "{{system_email_smtp_port}}"
smtp_user: "{{system_email_username}}"
smtp_pass: "{{system_email_password}}"
#force_tls: true
#require_transport_security: true
enable_tls: "{{ system_email_tls | upper }}"
notif_from: "Your Friendly %(app)s homeserver <{{system_email}}>"
app_name: "Matrix on {{top_domain}}"
enable_notifs: true
notif_for_new_users: false
client_base_url: "{{domain_matrix_synapse}}"
validation_token_lifetime: 15m

View File

@ -8,7 +8,7 @@ handlers:
file:
class: logging.handlers.RotatingFileHandler
formatter: precise
filename: /data/{{synapse_domain}}.homeserver.log
filename: /data/{{ domain }}.homeserver.log
maxBytes: 10485760
backupCount: 3
console:

View File

@ -17,8 +17,8 @@ PEERTUBE_SECRET={{peertube_secret}}
PEERTUBE_SMTP_USERNAME={{system_email_username}}
PEERTUBE_SMTP_PASSWORD={{system_email_password}}
PEERTUBE_SMTP_HOSTNAME={{system_email_host}}
PEERTUBE_SMTP_PORT={{system_email_smtp_port}}
PEERTUBE_SMTP_PORT={{system_email_port}}
PEERTUBE_SMTP_FROM={{system_email}}
PEERTUBE_SMTP_TLS={{ system_email_tls | upper }}}
PEERTUBE_SMTP_DISABLE_STARTTLS={{ 'false' if system_email_start_tls else 'true' }}
PEERTUBE_SMTP_TLS=false
PEERTUBE_SMTP_DISABLE_STARTTLS=false
PEERTUBE_ADMIN_EMAIL={{system_email}}

View File

@ -47,7 +47,7 @@ RESTRICTED_INSTANCE=false
## Mail
MAIL_DRIVER=log
MAIL_HOST={{system_email_host}}
MAIL_PORT={{system_email_smtp_port}}
MAIL_PORT={{system_email_port}}
MAIL_FROM_ADDRESS="{{system_email_username}}"
MAIL_FROM_NAME="Pixelfed"
MAIL_USERNAME={{system_email_username}}

View File

@ -1,17 +1,13 @@
# Set default values for all following accounts.
defaults
auth on
logfile ~/.msmtp.log
{% if system_email_tls %}
tls on
tls_trust_file /etc/ssl/certs/ca-certificates.crt
{% else %}
tls off
{% endif %}
logfile ~/.msmtp.log
account system_email
host {{system_email_host}}
port {{system_email_smtp_port}}
port {{system_email_port}}
from {{system_email}}
user {{system_email_username}}
password {{system_email_password}}

View File

@ -205,10 +205,8 @@
roles:
- role: docker-matrix
vars:
synapse_domain: "{{domain_matrix_synapse}}"
synapse_http_port: 8021
element_domain: "{{domain_matrix_element}}"
element_http_port: 8022
domain: "{{domain_matrix}}"
http_port: 8021
- name: setup akaunting hosts
hosts: akaunting