Compare commits
29 Commits
88f823c17a
...
potential
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
7a9f003cbc | ||
|
|
080c0a0e6a | ||
|
|
c6427f2d86 | ||
|
|
5c068f7e05 | ||
|
|
eae737ef06 | ||
| a48dd0e56c | |||
| ef78c3fe78 | |||
| 2be37a3762 | |||
| 6b6f129bf1 | |||
| 98cadb294d | |||
| 271d3ca5f1 | |||
| 2cbc5cd1cc | |||
| f0d2c5f5cf | |||
| faccb94e21 | |||
| a31345700c | |||
| 313dfa43ce | |||
| 4033fe3e9f | |||
| 4df9b4ae53 | |||
| 257e35d376 | |||
| 31e41d2028 | |||
| e674917638 | |||
| 66a6437b68 | |||
| 369c648824 | |||
| 755dad6f00 | |||
| a8b8e9e6f5 | |||
| 19eeda3fec | |||
| 2ead682be9 | |||
| 4deb900bba | |||
| 9d51b84cae |
@@ -17,6 +17,15 @@ ansible-playbook deploy_matrix.yml -i inventory/hosts.yml
|
|||||||
## Matrix Administration ##
|
## Matrix Administration ##
|
||||||
[synapse-admin on github](https://github.com/Awesome-Technologies/synapse-admin)
|
[synapse-admin on github](https://github.com/Awesome-Technologies/synapse-admin)
|
||||||
|
|
||||||
|
- generate new certificate
|
||||||
|
```
|
||||||
|
podman run -it --rm \
|
||||||
|
-v ~/synapse-data:/data:Z \
|
||||||
|
-e SYNAPSE_SERVER_NAME=matrix.fpov.space \
|
||||||
|
-e SYNAPSE_REPORT_STATS=no \
|
||||||
|
matrixdotorg/synapse:latest generate
|
||||||
|
```
|
||||||
|
|
||||||
- Create User
|
- Create User
|
||||||
```
|
```
|
||||||
sudo podman exec -it synapse register_new_matrix_user -c /data/homeserver.yaml http://localhost:8008
|
sudo podman exec -it synapse register_new_matrix_user -c /data/homeserver.yaml http://localhost:8008
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
---
|
---
|
||||||
- name: Deploy Matrix + TURN + NGINX-PM + Teamspeak
|
- name: Deploy Element + Matrix + Matrix_admin + TURN + NGINX-PM + Teamspeak
|
||||||
hosts: all
|
hosts: all
|
||||||
become: true
|
become: true
|
||||||
collections:
|
collections:
|
||||||
@@ -38,10 +38,12 @@
|
|||||||
- "{{ vol_teamspeak }}"
|
- "{{ vol_teamspeak }}"
|
||||||
- "{{ vol_db }}"
|
- "{{ vol_db }}"
|
||||||
- "{{ npm_data }}"
|
- "{{ npm_data }}"
|
||||||
- "{{ npm_letsencrypt }}"
|
- "{{ npm_letsencrypt }}"
|
||||||
|
- "{{ keycloak_data }}"
|
||||||
|
- "{{ vol_kc_db }}"
|
||||||
|
|
||||||
# -----------------------------------------------------------------
|
# -----------------------------------------------------------------
|
||||||
# Pull required images (including Teamspeak)
|
# Pull required images
|
||||||
# -----------------------------------------------------------------
|
# -----------------------------------------------------------------
|
||||||
|
|
||||||
- name: Pull coturn image
|
- name: Pull coturn image
|
||||||
@@ -74,6 +76,11 @@
|
|||||||
name: "{{ db_image }}"
|
name: "{{ db_image }}"
|
||||||
state: present
|
state: present
|
||||||
|
|
||||||
|
- name: Pull Keycloak Image
|
||||||
|
containers.podman.podman_image:
|
||||||
|
name: "{{ keycloak_image }}"
|
||||||
|
state: present
|
||||||
|
|
||||||
# -----------------------------------------------------------------
|
# -----------------------------------------------------------------
|
||||||
# Render all configuration files from the templates
|
# Render all configuration files from the templates
|
||||||
# -----------------------------------------------------------------
|
# -----------------------------------------------------------------
|
||||||
@@ -108,7 +115,11 @@
|
|||||||
dest: "{{ synapse_log_config }}"
|
dest: "{{ synapse_log_config }}"
|
||||||
mode: "0644"
|
mode: "0644"
|
||||||
|
|
||||||
|
- name: Render Element config file
|
||||||
|
ansible.builtin.template:
|
||||||
|
src: config.json.j2
|
||||||
|
dest: "{{ element_config_path }}"
|
||||||
|
mode: "0644"
|
||||||
|
|
||||||
# -----------------------------------------------------------------
|
# -----------------------------------------------------------------
|
||||||
# Start the NGINX Proxy Manager Container
|
# Start the NGINX Proxy Manager Container
|
||||||
@@ -154,7 +165,7 @@
|
|||||||
# Start the Matrix-Synaps and supporting DB containers
|
# Start the Matrix-Synaps and supporting DB containers
|
||||||
# -----------------------------------------------------------------
|
# -----------------------------------------------------------------
|
||||||
|
|
||||||
- name: start Database container
|
- name: start Matrix Database container
|
||||||
containers.podman.podman_container:
|
containers.podman.podman_container:
|
||||||
name: synapse-db
|
name: synapse-db
|
||||||
image: "{{ db_image }}"
|
image: "{{ db_image }}"
|
||||||
@@ -176,8 +187,8 @@
|
|||||||
ports:
|
ports:
|
||||||
- "{{ synapse_http_port }}:{{ synapse_http_port }}"
|
- "{{ synapse_http_port }}:{{ synapse_http_port }}"
|
||||||
volumes:
|
volumes:
|
||||||
- "{{ vol_synapse }}:/data"
|
- "{{ vol_synapse }}:/data:Z"
|
||||||
- "{{ vol_media }}:/data/media_store"
|
- "{{ vol_media }}:/data/media_store:Z"
|
||||||
- "{{ synapse_cfg_path }}:/data/homeserver.yaml:Z"
|
- "{{ synapse_cfg_path }}:/data/homeserver.yaml:Z"
|
||||||
- "{{ synapse_secret_key_path }}:/data/matrix.fpov.space.signing.key:Z"
|
- "{{ synapse_secret_key_path }}:/data/matrix.fpov.space.signing.key:Z"
|
||||||
- "{{ synapse_log_config }}:/data/matrix.fpov.space.log.config:Z"
|
- "{{ synapse_log_config }}:/data/matrix.fpov.space.log.config:Z"
|
||||||
@@ -207,6 +218,69 @@
|
|||||||
network: "{{ podman_network }}"
|
network: "{{ podman_network }}"
|
||||||
restart_policy: always
|
restart_policy: always
|
||||||
|
|
||||||
|
# -----------------------------------------------------------------
|
||||||
|
# Matrix Admin Panel
|
||||||
|
# -----------------------------------------------------------------
|
||||||
|
|
||||||
|
- name: Start Matrix Admin panel
|
||||||
|
containers.podman.podman_container:
|
||||||
|
name: "{{ admin_container_name }}"
|
||||||
|
image: "{{ synapse_admin_image }}"
|
||||||
|
state: started
|
||||||
|
network: "{{ podman_network }}"
|
||||||
|
restart_policy: always
|
||||||
|
|
||||||
|
# -----------------------------------------------------------------
|
||||||
|
# Element Web app
|
||||||
|
#------------------------------------------------------------------
|
||||||
|
- name: start Element Web Application
|
||||||
|
containers.podman.podman_container:
|
||||||
|
name: "{{ element_container_name }}"
|
||||||
|
image: "{{ element_image }}"
|
||||||
|
env:
|
||||||
|
ELEMENT_WEB_PORT=8008
|
||||||
|
state: started
|
||||||
|
volumes:
|
||||||
|
- "{{ element_config_path }}:/app/config.json:Z"
|
||||||
|
network: "{{ podman_network }}"
|
||||||
|
restart_policy: always
|
||||||
|
|
||||||
|
# -----------------------------------------------------------------
|
||||||
|
# Start Keyclaok and supporting DB containers
|
||||||
|
# -----------------------------------------------------------------
|
||||||
|
|
||||||
|
- name: start Keyclaok Database container
|
||||||
|
containers.podman.podman_container:
|
||||||
|
name: keycloak-db
|
||||||
|
image: "{{ db_image }}"
|
||||||
|
state: started
|
||||||
|
env:
|
||||||
|
POSTGRES_USER: "{{ keycloak_postgres_user }}"
|
||||||
|
POSTGRES_PASSWORD: "{{ keycloak_postgres_pw }}"
|
||||||
|
POSTGRES_DB: "{{ keycloak_db }}"
|
||||||
|
volumes:
|
||||||
|
- "{{ vol_kc_db }}:/var/lib/postgresql/data"
|
||||||
|
network: "{{ podman_network }}"
|
||||||
|
restart_policy: always
|
||||||
|
|
||||||
|
- name: Start Keycloak authentication container
|
||||||
|
containers.podman.podman_container:
|
||||||
|
name: "{{ keycloak_container_name }}"
|
||||||
|
image: "{{ keycloak_image }}"
|
||||||
|
command: ["start-dev"]
|
||||||
|
env:
|
||||||
|
KC_DB: postgres
|
||||||
|
KC_DB_URL: jdbc:postgresql://keycloak-db/{{ keycloak_db }}
|
||||||
|
KC_DB_USERNAME: "{{ keycloak_postgres_user }}"
|
||||||
|
KC_DB_PASSWORD: "{{ keycloak_postgres_pw }}"
|
||||||
|
KC_HOSTNAME: "{{ keycloak_domain }}"
|
||||||
|
KC_HOSTNAME_PORT: "{{ kc_hn_port }}"
|
||||||
|
KEYCLOAK_ADMIN: "{{ keycloak_admin }}"
|
||||||
|
KC_BOOTSTRAP_ADMIN_PASSWORD: "{{ keycloak_pw }}"
|
||||||
|
KC_PROXY_HEADERS: xforwarded
|
||||||
|
KC_HTTP_ENABLED: "true"
|
||||||
|
KC_HOSTNAME_STRICT: "{{ 'false' }}"
|
||||||
|
volumes:
|
||||||
|
- "{{ keycloak_data }}:/opt/keycloak/data:Z"
|
||||||
|
network: "{{ podman_network }}"
|
||||||
|
restart_policy: always
|
||||||
|
|||||||
15
templates/config.json.j2
Normal file
15
templates/config.json.j2
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
{
|
||||||
|
"default_server_config": {
|
||||||
|
"m.homeserver": {
|
||||||
|
"base_url": "https://{{ matrix_domain1 }}",
|
||||||
|
"server_name": "{{ top_domain }}"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"disable_custom_urls": true,
|
||||||
|
"disable_guests": true,
|
||||||
|
"brand": "{{ element_brand }}",
|
||||||
|
"default_theme": "dark",
|
||||||
|
"roomDirectory": {
|
||||||
|
"servers": ["{{ top_domain }}"]
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -27,9 +27,15 @@ turn_shared_secret: "{{ turn_secret }}"
|
|||||||
turn_user_lifetime: "1h"
|
turn_user_lifetime: "1h"
|
||||||
turn_allow_guests: "true"
|
turn_allow_guests: "true"
|
||||||
|
|
||||||
|
enable_registration: true
|
||||||
|
registration_requires_token: true
|
||||||
|
|
||||||
|
|
||||||
federation_domain_whitelist: []
|
federation_domain_whitelist: []
|
||||||
auto_join_rooms:
|
auto_join_rooms:
|
||||||
- "#welcome:matrix.fpov.space"
|
- "#general:matrix.fpov.space"
|
||||||
|
|
||||||
|
max_upload_size: 200M
|
||||||
|
|
||||||
media_store_path: /data/media_store
|
media_store_path: /data/media_store
|
||||||
log_config: "/data/matrix.fpov.space.log.config"
|
log_config: "/data/matrix.fpov.space.log.config"
|
||||||
|
|||||||
@@ -1,13 +1,16 @@
|
|||||||
# --------------------------------------------------------------
|
# --------------------------------------------------------------
|
||||||
# General
|
# General
|
||||||
# --------------------------------------------------------------
|
# --------------------------------------------------------------
|
||||||
|
top_domain: fpov.space
|
||||||
public_ipv4: "15.204.117.53"
|
public_ipv4: "15.204.117.53"
|
||||||
matrix_domain1: "matrix.fpov.space"
|
matrix_domain1: "matrix.fpov.space"
|
||||||
site_domain: "org.fpov.space"
|
site_domain: "org.fpov.space"
|
||||||
teamspeak_domain: "ts.fpov.space"
|
teamspeak_domain: "ts.fpov.space"
|
||||||
turn_domain: "turn.fpov.space"
|
turn_domain: "turn.fpov.space"
|
||||||
matrix_email: "boxswappers@gmail.com"
|
matrix_email: "boxswappers@gmail.com"
|
||||||
|
admin_domain: "mtxadm.fpov.space"
|
||||||
|
element_domain: "element.fpov.space"
|
||||||
|
keycloak_domain: "auth.fpov.space"
|
||||||
|
|
||||||
# --------------------------------------------------------------
|
# --------------------------------------------------------------
|
||||||
# Ports
|
# Ports
|
||||||
@@ -32,7 +35,6 @@ form_secret: "Ubwo=AThaygGi0iySK*H4i9xUOORCQM#eDMd@E,DqW3DcfqYJG"
|
|||||||
matrix_container_name: "synapse"
|
matrix_container_name: "synapse"
|
||||||
|
|
||||||
# --- Teamspeak ---------------------------------------------------
|
# --- Teamspeak ---------------------------------------------------
|
||||||
teamspeak_image: "docker.io/teamspeak:3.13.7"
|
|
||||||
teamspeak_container_name: teamspeak
|
teamspeak_container_name: teamspeak
|
||||||
teamspeak_udp_port: 9987 # voice (UDP) – exposed directly on the host
|
teamspeak_udp_port: 9987 # voice (UDP) – exposed directly on the host
|
||||||
teamspeak_tcp_port: 10011 # query (TCP) – will be routed via Traefik
|
teamspeak_tcp_port: 10011 # query (TCP) – will be routed via Traefik
|
||||||
@@ -43,16 +45,23 @@ postgres_db: synapse
|
|||||||
postgres_user: mMwHLfdO6tz5N
|
postgres_user: mMwHLfdO6tz5N
|
||||||
postgres_pw: 9mKeSFE7tH2eY
|
postgres_pw: 9mKeSFE7tH2eY
|
||||||
|
|
||||||
|
keycloak_db: keycloak
|
||||||
|
keycloak_postgres_user: wCdfpLp3j208
|
||||||
|
keycloak_postgres_pw: F7C3arx1ZGHh
|
||||||
|
|
||||||
# --------------------------------------------------------------
|
# --------------------------------------------------------------
|
||||||
# Container images
|
# Container images
|
||||||
# --------------------------------------------------------------
|
# --------------------------------------------------------------
|
||||||
db_image: "docker.io/postgres:16-alpine"
|
db_image: "docker.io/postgres:16-alpine"
|
||||||
traefik_image: "docker.io/traefik:v3.6.11"
|
traefik_image: "docker.io/traefik:latest"
|
||||||
turn_image: "docker.io/coturn/coturn:4.9.0"
|
turn_image: "docker.io/coturn/coturn:latest"
|
||||||
synapse_image: "docker.io/matrixdotorg/synapse:latest"
|
synapse_image: "docker.io/matrixdotorg/synapse:latest"
|
||||||
nginx_image: "docker.io/nginx:alpine"
|
nginx_image: "docker.io/nginx:latest"
|
||||||
npm_image: "docker.io/jc21/nginx-proxy-manager:latest"
|
npm_image: "docker.io/jc21/nginx-proxy-manager:latest"
|
||||||
|
teamspeak_image: "docker.io/teamspeak:latest"
|
||||||
|
synapse_admin_image: "docker.io/awesometechnologies/synapse-admin:latest"
|
||||||
|
element_image: "docker.io/vectorim/element-web:latest"
|
||||||
|
keycloak_image: "quay.io/keycloak/keycloak:26.5.6"
|
||||||
|
|
||||||
# --------------------------------------------------------------
|
# --------------------------------------------------------------
|
||||||
# Podman names & volumes
|
# Podman names & volumes
|
||||||
@@ -67,6 +76,9 @@ vol_teamspeak: teamspeak_data
|
|||||||
npm_data: npm_data
|
npm_data: npm_data
|
||||||
npm_letsencrypt: letsencrypt
|
npm_letsencrypt: letsencrypt
|
||||||
vol_db: postgres_db
|
vol_db: postgres_db
|
||||||
|
vol_kc_db: kc_postgres
|
||||||
|
keycloak_data: kc_data
|
||||||
|
|
||||||
|
|
||||||
# --------------------------------------------------------------
|
# --------------------------------------------------------------
|
||||||
# Paths on the target host (temporary files)
|
# Paths on the target host (temporary files)
|
||||||
@@ -76,11 +88,22 @@ dynamic_traefik_path: "/tmp/traefik_dynamic.yml"
|
|||||||
turn_conf_path: "/tmp/turnserver.conf"
|
turn_conf_path: "/tmp/turnserver.conf"
|
||||||
synapse_cfg_path: "/tmp/homeserver.yaml"
|
synapse_cfg_path: "/tmp/homeserver.yaml"
|
||||||
nginx_html_path: "/tmp/index.html"
|
nginx_html_path: "/tmp/index.html"
|
||||||
synapse_secret_key_path: "/tmp/matrix.fpov.space.signing.key"
|
synapse_secret_key_path: "/opt/matrix.fpov.space.signing.key"
|
||||||
synapse_log_config: "/tmp/matrix.fpov.space.log.config"
|
synapse_log_config: "/tmp/matrix.fpov.space.log.config"
|
||||||
|
element_config_path: "/tmp/config.json"
|
||||||
|
|
||||||
# -----------------------------------------------------------------
|
# -----------------------------------------------------------------
|
||||||
# NEW – Google OAuth2 (OpenID Connect) credentials
|
# Synapse Admin
|
||||||
|
#------------------------------------------------------------------
|
||||||
|
admin_container_name: mtxadm
|
||||||
|
|
||||||
|
#------------------------------------------------------------------
|
||||||
|
# Element App
|
||||||
|
#------------------------------------------------------------------
|
||||||
|
element_brand: "FPoV Chat"
|
||||||
|
element_container_name: "element"
|
||||||
|
# -----------------------------------------------------------------
|
||||||
|
# Google OAuth2 (OpenID Connect) credentials
|
||||||
# -----------------------------------------------------------------
|
# -----------------------------------------------------------------
|
||||||
google_oidc_client_id: "YOUR_GOOGLE_CLIENT_ID"
|
google_oidc_client_id: "YOUR_GOOGLE_CLIENT_ID"
|
||||||
google_oidc_client_secret: "YOUR_GOOGLE_CLIENT_SECRET"
|
google_oidc_client_secret: "YOUR_GOOGLE_CLIENT_SECRET"
|
||||||
@@ -102,3 +125,10 @@ landing_message: |
|
|||||||
automatic Let’s Encrypt certificates, a TURN server for voice/video, and a
|
automatic Let’s Encrypt certificates, a TURN server for voice/video, and a
|
||||||
simple landing page.
|
simple landing page.
|
||||||
|
|
||||||
|
# --------------------------------------------------------------
|
||||||
|
# Keycloak Auth
|
||||||
|
# --------------------------------------------------------------
|
||||||
|
kc_hn_port: "8080"
|
||||||
|
keycloak_admin: "mQ4vN06xWgIQ"
|
||||||
|
keycloak_pw: "I71bUBkhPY6E"
|
||||||
|
keycloak_container_name: "keycloak"
|
||||||
Reference in New Issue
Block a user