Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
services:conduwuit [2025/01/31 12:54] – [Conduwuit] willy | services:conduwuit [Unknown date] (current) – removed - external edit (Unknown date) 127.0.0.1 | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | ====== Conduwuit ====== | ||
- | |||
- | |||
- | [[https:// | ||
- | |||
- | I will show you also how to install Element Web app which is a nice companion for web access everywhere. | ||
- | |||
- | ===== Installation of Conduwuit server ===== | ||
- | |||
- | Installation instructions: | ||
- | |||
- | Create user and required folders: | ||
- | <code bash> | ||
- | seradd -d / | ||
- | mkdir -p / | ||
- | chown conduwuit: | ||
- | </ | ||
- | |||
- | Download the correct executable from [[https:// | ||
- | <code bash> | ||
- | su - conduwuit | ||
- | mkdir bin | ||
- | cd bin | ||
- | wget https:// | ||
- | </ | ||
- | |||
- | ===== Installation of Element Web app ===== | ||
- | |||
- | Element Web app is a great web based UI for Matrix, that you can pair to your instance. | ||
- | |||
- | Again installing bare-metal is the way to go. See [[https:// | ||
- | |||
- | Download latest release tarball from [[https:// | ||
- | <code bash> | ||
- | su - conduwuit | ||
- | wget https:// | ||
- | tar xvf element-<< | ||
- | ln -s element-<< | ||
- | </ | ||
- | |||
- | |||
- | ===== Configuration of Conduwuit server ===== | ||
- | |||
- | The official Conduwuit configuration documentation can be found [[https:// | ||
- | |||
- | Now, you cannot start Conduwuit withour a proper configuration file. I suggest you to put it under **/ | ||
- | <file / | ||
- | [global] | ||
- | server_name = " | ||
- | address = [" | ||
- | port = 6167 | ||
- | database_path = "/ | ||
- | new_user_displayname_suffix = " | ||
- | allow_check_for_updates = false | ||
- | max_request_size = 20971520 # this should match NGINX max request size | ||
- | #log = " | ||
- | #log_colors = true | ||
- | # | ||
- | |||
- | [global.well_known] | ||
- | client = " | ||
- | server = " | ||
- | </ | ||
- | |||
- | You are now ready for testing your installation. | ||
- | |||
- | ===== Configuration of Element Web App ===== | ||
- | |||
- | Rename the file called **config.sample.json** to **config.json** inside the // | ||
- | |||
- | At the very least perform the following edits: | ||
- | < | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | }, | ||
- | </ | ||
- | |||
- | at the beginning of the file. | ||
- | |||
- | |||
- | ===== Manual startup ===== | ||
- | |||
- | to run Conduwuit server, run the following command as **conduwuit** user: | ||
- | <code bash> | ||
- | / | ||
- | </ | ||
- | |||
- | Of course, replace the proper paths and filenames with your setup. | ||
- | |||
- | Running manually is good because you can easily access the admin console by typing **CTRL+C** from the terminal. You might want to take this opportunity to create your first user, and make it an admin too. | ||
- | |||
- | ===== Testing ===== | ||
- | |||
- | Call directly this endpoint: | ||
- | <code bash> | ||
- | curl https:// | ||
- | {" | ||
- | </ | ||
- | |||
- | Check federation and Matrix operability, | ||
- | < | ||
- | https:// | ||
- | </ | ||
- | |||
- | |||
- | ===== Reverse proxy ===== | ||
- | |||
- | A Matrix server must be hosted on a dedicated subdomain. Please see my [[selfhost: | ||
- | |||
- | <file - chat.conf> | ||
- | server { | ||
- | server_name chat.mydomain.com; | ||
- | listen 8443 ssl; # external access | ||
- | listen 443 ssl; # internal access | ||
- | |||
- | access_log / | ||
- | error_log / | ||
- | |||
- | location / { | ||
- | root / | ||
- | } | ||
- | |||
- | location ~ ^(/ | ||
- | add_header ' | ||
- | proxy_pass http:// | ||
- | #proxy_pass http:// | ||
- | proxy_set_header X-Forwarded-For $remote_addr; | ||
- | proxy_set_header X-Forwarded-Proto $scheme; | ||
- | proxy_set_header Host $host; | ||
- | proxy_buffering off; | ||
- | client_max_body_size 30M; | ||
- | proxy_read_timeout 10m; | ||
- | proxy_http_version 1.1; | ||
- | } | ||
- | |||
- | location / | ||
- | return 200 ' | ||
- | types { } default_type " | ||
- | } | ||
- | |||
- | location / | ||
- | return 200 ' | ||
- | types { } default_type " | ||
- | add_header " | ||
- | } | ||
- | } | ||
- | </ | ||
- | |||
- | |||
- | |||
- | |||
- | ===== Adding users ===== | ||
- | |||
- | From the Contuwuit admin console, which can be accessed by running the conduwuit binary in a terminl then hit **CTRL+C**, you can do a lot of admin stuff, including creating new users. | ||
- | |||
- | To create a user: | ||
- | < | ||
- | uwu> admin users create-user myuser mypassword | ||
- | </ | ||
- | |||
- | To make a user an admin: | ||
- | < | ||
- | uwu> admin users make-user-admin myuser | ||
- | </ | ||
- | |||
- | To change a user password: | ||
- | < | ||
- | uwu> admin users reset-password myuser mynewpassword | ||
- | </ | ||
- | |||
- | You **must** create at least one user and make it admin! | ||
- | |||
- | |||
- | ===== Autostart ===== | ||
- | |||
- | Since i use OpenRC, simply drop the following script to / | ||
- | <file - / | ||
- | # | ||
- | # Copyright 2025 Gentoo Authors | ||
- | # Distributed under the terms of the GNU General Public License v2 | ||
- | |||
- | name=" | ||
- | description=" | ||
- | pidfile="/ | ||
- | command_background=true | ||
- | command="/ | ||
- | command_args=" | ||
- | command_user=" | ||
- | |||
- | depend() { | ||
- | need net | ||
- | } | ||
- | </ | ||
- | |||
- | Make it executable and add to the proper runlevel: | ||
- | <code bash> | ||
- | chmod +x / | ||
- | rc-update add conduwuit default | ||
- | </ | ||
- | |||