Heisenbridge
Tuesday, 18 April 2023I need to do some updating to this journal because a couple of days ago I implemented a matrix server and I need to document it.
Setting up heisenbrige bridge for our matrix synapse server follows
- Set up a new tmux session on the domain called heisenbridge.
- Created a new directory at ~/heisenbridge-config.
- Followed the instructions at https://github.com/hifi/heisenbridge to create a new virtualenv at ~/.virtualenvs for heisenbridge and then created the config file with
python -m heisenbridge -c /path/to/synapse/config/heisenbridge.yaml --generate. - Pointed the
synapseconfig (/etc/matrix-synapse/homeserver.yaml) to to this heisenbridge config file such that the config file now includes this. The additional line is theapp_service_config_filesentry:
app_service_config_files:
- /home/lemon/heisenbridge-config/heisenbridge.yaml
listeners:
- port: 8008
tls: false
type: http
x_forwarded: true
bind_addresses: ['::1', '127.0.0.1']
resources:
- names: [client, federation]
compress: false
database:
name: psycopg2
args:
user: USER
password: PASSWORD
database: synapse
host: localhost
cp_min: 5
cp_max: 10
log_config: "/etc/matrix-synapse/log.yaml"
media_store_path: /var/lib/matrix-synapse/media
signing_key_path: "/etc/matrix-synapse/homeserver.signing.key"
trusted_key_servers:
- server_name: "DOMAIN"
- I restarted synapse with
sudo systemctl restart matrix-synapse.service(or similar). - Inside the tmux session for heisenbridge, started heisenbridge with
python -m heisenbridge -c /path/to/synapse/config/heisenbridge.yaml. - Then started a DM inside Element to
@heisenbridge:DOMAIN. - Then I joined LiberaChat network with
ADDNETWORK LiberaCHat,ADDSERVER LiberaChat irc.eu.libera.chat 6697 --tls,OPEN LiberaChat. - A new LiberaChat window opened and the next job was to connect to LiberaChat. At first this was a pain because of SASL authentication. I looked in pass etc for all ZNC, Libera passwords and tried one, but it didn’t work. So I dug through the existing (but dormant, because it isn’t running) ZNC config on DOMAIN to find my Libera SASL credentials and eventually found it, deep inside
.znc/on the server. I connected by doingSASL --username yulqen --password PASSWORDin element, then doingCONNECT. I have saved the SASL credentials for Libera inpass. - Then you join an IRC channel with
JOIN #djangoand bob is your uncle. - This will need to be revisited when I reboot DOMAIN.
This post is tagged with:
matrix