aboutsummaryrefslogtreecommitdiff
path: root/content/blog/2022-11-07-self-hosting-matrix.org
diff options
context:
space:
mode:
authorChristian Cleberg <[email protected]>2025-11-11 22:49:13 -0600
committerChristian Cleberg <[email protected]>2025-11-11 22:49:13 -0600
commit51a7a02f0c96d49b68fbcc155414c218207fa270 (patch)
tree845af8aad0e8769352efc02fcd1044eed9cc1ec1 /content/blog/2022-11-07-self-hosting-matrix.org
parent7d3e80ebf1dc770eac0e21890b74f18ba2d15a6b (diff)
downloadcleberg.net-51a7a02f0c96d49b68fbcc155414c218207fa270.tar.gz
cleberg.net-51a7a02f0c96d49b68fbcc155414c218207fa270.tar.bz2
cleberg.net-51a7a02f0c96d49b68fbcc155414c218207fa270.zip
fix grammar in 2022 posts
Diffstat (limited to 'content/blog/2022-11-07-self-hosting-matrix.org')
-rw-r--r--content/blog/2022-11-07-self-hosting-matrix.org89
1 files changed, 41 insertions, 48 deletions
diff --git a/content/blog/2022-11-07-self-hosting-matrix.org b/content/blog/2022-11-07-self-hosting-matrix.org
index cc7b303..20e5de1 100644
--- a/content/blog/2022-11-07-self-hosting-matrix.org
+++ b/content/blog/2022-11-07-self-hosting-matrix.org
@@ -5,21 +5,19 @@
* Synapse
-If you're reading this, you likely know that
-[[https://github.com/matrix-org/synapse/][Synapse]] is a popular
-[[https://matrix.org/][Matrix]] home server software that allows users
-to run their own Matrix home server.
+If you're reading this, you likely know that [[https://github.com/matrix-org/synapse/][Synapse]] is a popular [[https://matrix.org/][Matrix]] home
+server software that allows users to run their own Matrix home server.
-This post is a short guide describing how I was able to get Synapse
-working in a minimally-usable state on Alpine Linux.
+This post is a short guide describing how I was able to get Synapse working in a
+minimally-usable state on Alpine Linux.
* Installation Process
** Dependencies
-First, since there is no Alpine-specific package for Synapse, we need to
-ensure that Alpine has the required dependencies for the Python-based
-installation method.
+First, since there is no Alpine-specific package for Synapse, we need to ensure
+that Alpine has the required dependencies for the Python-based installation
+method.
#+begin_src sh
doas apk -U update
@@ -39,10 +37,9 @@ pip install matrix-synapse
** Running Synapse
-Once installed, running Synapse is easy. Simply execute the following
-command, replacing =example.com= with the domain name that will be used
-with this home server. This will generate the configuration files needed
-to run the server.
+Once installed, running Synapse is easy. Simply execute the following command,
+replacing =example.com= with the domain name that will be used with this home
+server. This will generate the configuration files needed to run the server.
#+begin_src sh
python -m synapse.app.homeserver \
@@ -60,17 +57,15 @@ synctl start
** Configuring Synapse
-To make any change to Synapse, we need to edit the =YAML= configuration
-file:
+To make any change to Synapse, we need to edit the =YAML= configuration file:
#+begin_src sh
nano ~/synapse/homeserver.yaml
#+end_src
-For now, we just need to ensure the =server_name= is accurate. However,
-there are a lot of other configuration options found in the
-[[https://matrix-org.github.io/synapse/develop/usage/configuration/config_documentation.html][Configuring
-Synapse]] documentation that can be enabled/disabled at any point.
+For now, we just need to ensure the =server_name= is accurate. However, there
+are a lot of other configuration options found in the [[https://matrix-org.github.io/synapse/develop/usage/configuration/config_documentation.html][Configuring Synapse]]
+documentation that can be enabled/disabled at any point.
#+begin_src yaml
server_name: "example.com"
@@ -84,9 +79,9 @@ synctl restart
** Nginx Reverse-Proxy
-To ensure that Synapse is reachable from the public, we need to connect
-our domain to the Synapse server. In my case, I use a Nginx
-reverse-proxy for this purpose.
+To ensure that Synapse is reachable from the public, we need to connect our
+domain to the Synapse server. In my case, I use a Nginx reverse-proxy for this
+purpose.
To use Nginx, we need to create a reverse-proxy configuration file:
@@ -94,9 +89,9 @@ To use Nginx, we need to create a reverse-proxy configuration file:
doas nano /etc/nginx/http.d/example.com.conf
#+end_src
-If you already have TLS certificates for this domain (=example.com=),
-you can simply use the SSL configuration and point toward your TLS
-certificates.
+If you already have TLS (Transport Layer Security) certificates for this domain
+(=example.com=), you can simply use the SSL (Secure Socket Layer) configuration
+and point toward your TLS certificates.
#+begin_src conf
server {
@@ -139,10 +134,9 @@ server {
}
#+end_src
-If you need to generate TLS certificates (I recommend
-[[https://certbot.eff.org/][Certbot]]), you'll need a more minimal Nginx
-conf file before you can use the TLS-enabled example above. Instead, use
-this configuration file during the Certbot certificate generation
+If you need to generate TLS certificates (I recommend [[https://certbot.eff.org/][Certbot]]), you'll need a
+more minimal Nginx conf file before you can use the TLS-enabled example above.
+Instead, use this configuration file during the Certbot certificate generation
process:
#+begin_src conf
@@ -161,13 +155,13 @@ Once you're done editing the Nginx conf file, restart Nginx:
doas rc-service nginx restart
#+end_src
-If you still need to generate TLS certificates, run =certbot= now and
-obtain the certificates. Certbot will ask if you want to use a webroot
-or spin up a temporary web server. I *highly* recommend using the
-temporary web server due to the many issues with using a webroot.
+If you still need to generate TLS certificates, run =certbot= now and obtain the
+certificates. Certbot will ask if you want to use a webroot or spin up a
+temporary web server. I *highly* recommend using the temporary web server due to
+the many issues with using a webroot.
-You will need to stop Nginx in order to user the temporary web server
-option with Certbot:
+You will need to stop Nginx in order to user the temporary web server option
+with Certbot:
#+begin_src sh
# Stop Nginx so certbot can spin up a temp webserver for cert generation
@@ -178,11 +172,11 @@ doas rc-service nginx start
** Open Firewall & Router Ports
-If you use a firewall on the server, open the =8448= port for discovery
-and federation, as well as the normal web server ports if you're using a
-reverse proxy. If you want additional services, such as voice calls, you
-will need to read the Synapse documentation to see which ports need to
-be opened for those features.
+If you use a firewall on the server, open the =8448= port for discovery and
+federation, as well as the normal web server ports if you're using a reverse
+proxy. If you want additional services, such as voice calls, you will need to
+read the Synapse documentation to see which ports need to be opened for those
+features.
Here's an example of the Universal Firewall (UFW) software:
@@ -193,14 +187,13 @@ doas ufw allow 8448
doas ufw allow "Nginx Full"
#+end_src
-Remember to forward any Synapse ports, such as =8448=, =80=, and =443=,
-in your Router from the internet to your server's IP address.
+Remember to forward any Synapse ports, such as =8448=, =80=, and =443=, in your
+Router from the internet to your server's internet protocol (IP) address.
** Adding Matrix Users
-Finally, if you didn't enable public registration in the
-=homeserver.yaml= file, you can manually create users via the
-command-line:
+Finally, if you didn't enable public registration in the =homeserver.yaml= file,
+you can manually create users via the command-line:
#+begin_src sh
cd ~/synapse
@@ -210,6 +203,6 @@ register_new_matrix_user -c homeserver.yaml
Remember that the format for federated Matrix usernames is
=@username:example.com= when logging in to client applications.
-Once Synapse is running, and you have a username, you are ready to log
-in to a Matrix client and start sending messages, joining rooms, and
-utilizing your very own Matrix server.
+Once Synapse is running, and you have a username, you are ready to log in to a
+Matrix client and start sending messages, joining rooms, and utilizing your very
+own Matrix server.