Compare commits

..

27 Commits

Author SHA1 Message Date
boxswapper
7a9f003cbc updated autojoin rooms 2026-07-20 16:18:51 -06:00
boxswapper
080c0a0e6a correcting key and key location 2026-07-20 15:26:37 -06:00
boxswapper
c6427f2d86 more tsting 2026-07-20 14:44:46 -06:00
boxswapper
5c068f7e05 updated to test volumes" 2026-07-20 14:26:33 -06:00
boxswapper
eae737ef06 fixed issues with key dissapearing 2026-07-19 15:42:12 -06:00
a48dd0e56c functional keycloak deployment 2026-03-25 15:33:29 -06:00
ef78c3fe78 changed quites to single quotes on KC_HOSTNAME_STRICT because it keeps capitalizing it 2026-03-25 15:27:12 -06:00
2be37a3762 kc online but unable to access working on forwarding in env variable 2026-03-25 15:21:41 -06:00
6b6f129bf1 start --proxy-headers forwarded was unrecognized changed to start-dev 2026-03-25 15:19:47 -06:00
98cadb294d added proxy headers forward to kc start command 2026-03-25 15:14:36 -06:00
271d3ca5f1 added keycloak with [start] command 2026-03-25 15:04:58 -06:00
2cbc5cd1cc removed lemonldap .ini file 2026-03-25 14:36:47 -06:00
f0d2c5f5cf working without lemonldap 2026-03-25 14:36:20 -06:00
faccb94e21 current config, stull unable to default login to ldap 2026-03-25 14:22:13 -06:00
a31345700c added lemonldap-ng.ini.j2 file 2026-03-24 19:47:28 -06:00
313dfa43ce disable lemonLDAP-NG to go with config file 2026-03-24 19:40:57 -06:00
4033fe3e9f removed nginx volume from ldap, online now but can't reigster new uesr 2026-03-24 19:39:06 -06:00
4df9b4ae53 fixed portal hostname on lemonldap 2026-03-24 19:06:14 -06:00
257e35d376 added lemonldap 2026-03-24 18:45:15 -06:00
31e41d2028 removed comments completely from config.json 2026-03-23 13:16:25 -06:00
e674917638 used corredt comment marks in .json file # is not it // is 2026-03-23 13:14:43 -06:00
66a6437b68 updated to change element web port to 8008 2026-03-23 12:53:05 -06:00
369c648824 added config file 2026-03-23 12:43:03 -06:00
755dad6f00 updated to deploy element, fixed directory path for config 2026-03-23 12:42:33 -06:00
a8b8e9e6f5 functioning with mtxadm 2026-03-23 11:59:25 -06:00
19eeda3fec added admin panel container 2026-03-23 11:52:45 -06:00
2ead682be9 changed images to latest, moved teamspeak to images 2026-03-22 14:56:48 -06:00
5 changed files with 145 additions and 17 deletions

View File

@@ -17,6 +17,15 @@ ansible-playbook deploy_matrix.yml -i inventory/hosts.yml
## Matrix Administration ##
[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
```
sudo podman exec -it synapse register_new_matrix_user -c /data/homeserver.yaml http://localhost:8008

View File

@@ -1,5 +1,5 @@
---
- name: Deploy Matrix + TURN + NGINX-PM + Teamspeak
- name: Deploy Element + Matrix + Matrix_admin + TURN + NGINX-PM + Teamspeak
hosts: all
become: true
collections:
@@ -38,10 +38,12 @@
- "{{ vol_teamspeak }}"
- "{{ vol_db }}"
- "{{ npm_data }}"
- "{{ npm_letsencrypt }}"
- "{{ npm_letsencrypt }}"
- "{{ keycloak_data }}"
- "{{ vol_kc_db }}"
# -----------------------------------------------------------------
# Pull required images (including Teamspeak)
# Pull required images
# -----------------------------------------------------------------
- name: Pull coturn image
@@ -74,6 +76,11 @@
name: "{{ db_image }}"
state: present
- name: Pull Keycloak Image
containers.podman.podman_image:
name: "{{ keycloak_image }}"
state: present
# -----------------------------------------------------------------
# Render all configuration files from the templates
# -----------------------------------------------------------------
@@ -108,7 +115,11 @@
dest: "{{ synapse_log_config }}"
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
@@ -154,7 +165,7 @@
# Start the Matrix-Synaps and supporting DB containers
# -----------------------------------------------------------------
- name: start Database container
- name: start Matrix Database container
containers.podman.podman_container:
name: synapse-db
image: "{{ db_image }}"
@@ -176,8 +187,8 @@
ports:
- "{{ synapse_http_port }}:{{ synapse_http_port }}"
volumes:
- "{{ vol_synapse }}:/data"
- "{{ vol_media }}:/data/media_store"
- "{{ vol_synapse }}:/data:Z"
- "{{ vol_media }}:/data/media_store:Z"
- "{{ synapse_cfg_path }}:/data/homeserver.yaml:Z"
- "{{ synapse_secret_key_path }}:/data/matrix.fpov.space.signing.key:Z"
- "{{ synapse_log_config }}:/data/matrix.fpov.space.log.config:Z"
@@ -207,6 +218,69 @@
network: "{{ podman_network }}"
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
View 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 }}"]
}
}

View File

@@ -33,9 +33,9 @@ registration_requires_token: true
federation_domain_whitelist: []
auto_join_rooms:
- "#star-citizen:matrix.fpov.space"
- "#welcome:matrix.fpov.space"
- "#general:matrix.fpov.space"
max_upload_size: 200M
media_store_path: /data/media_store
log_config: "/data/matrix.fpov.space.log.config"

View File

@@ -1,13 +1,16 @@
# --------------------------------------------------------------
# General
# --------------------------------------------------------------
top_domain: fpov.space
public_ipv4: "15.204.117.53"
matrix_domain1: "matrix.fpov.space"
site_domain: "org.fpov.space"
teamspeak_domain: "ts.fpov.space"
turn_domain: "turn.fpov.space"
matrix_email: "boxswappers@gmail.com"
admin_domain: "mtxadm.fpov.space"
element_domain: "element.fpov.space"
keycloak_domain: "auth.fpov.space"
# --------------------------------------------------------------
# Ports
@@ -32,7 +35,6 @@ form_secret: "Ubwo=AThaygGi0iySK*H4i9xUOORCQM#eDMd@E,DqW3DcfqYJG"
matrix_container_name: "synapse"
# --- Teamspeak ---------------------------------------------------
teamspeak_image: "docker.io/teamspeak:3.13.7"
teamspeak_container_name: teamspeak
teamspeak_udp_port: 9987 # voice (UDP) – exposed directly on the host
teamspeak_tcp_port: 10011 # query (TCP) – will be routed via Traefik
@@ -43,16 +45,23 @@ postgres_db: synapse
postgres_user: mMwHLfdO6tz5N
postgres_pw: 9mKeSFE7tH2eY
keycloak_db: keycloak
keycloak_postgres_user: wCdfpLp3j208
keycloak_postgres_pw: F7C3arx1ZGHh
# --------------------------------------------------------------
# Container images
# --------------------------------------------------------------
db_image: "docker.io/postgres:16-alpine"
traefik_image: "docker.io/traefik:v3.6.11"
turn_image: "docker.io/coturn/coturn:4.9.0"
traefik_image: "docker.io/traefik:latest"
turn_image: "docker.io/coturn/coturn: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"
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
@@ -67,6 +76,9 @@ vol_teamspeak: teamspeak_data
npm_data: npm_data
npm_letsencrypt: letsencrypt
vol_db: postgres_db
vol_kc_db: kc_postgres
keycloak_data: kc_data
# --------------------------------------------------------------
# Paths on the target host (temporary files)
@@ -76,11 +88,22 @@ dynamic_traefik_path: "/tmp/traefik_dynamic.yml"
turn_conf_path: "/tmp/turnserver.conf"
synapse_cfg_path: "/tmp/homeserver.yaml"
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"
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_secret: "YOUR_GOOGLE_CLIENT_SECRET"
@@ -102,3 +125,10 @@ landing_message: |
automatic Let’s Encrypt certificates, a TURN server for voice/video, and a
simple landing page.
# --------------------------------------------------------------
# Keycloak Auth
# --------------------------------------------------------------
kc_hn_port: "8080"
keycloak_admin: "mQ4vN06xWgIQ"
keycloak_pw: "I71bUBkhPY6E"
keycloak_container_name: "keycloak"