User Tools

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
services:conduwuit [2025/01/31 13:56] willyservices:conduwuit [Unknown date] (current) – removed - external edit (Unknown date) 127.0.0.1
Line 1: Line 1:
-====== Conduwuit ====== 
- 
- 
-[[https://conduwuit.puppyirl.gay/|Conduwuit]] is a Matrix server written in RUST. [[https://matrix.org|Matrix]] is an open network for secure, decentralised communication. It is a specification which is in turn implemented by many servers and clients, and you can self-host your server as well. This is a new, well supported, lightweight implementation of a Matrix server.  
- 
-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: [[https://conduwuit.puppyirl.gay/deploying/generic.html|here]]. While there is a docker approach, it is so simple to install on bare-metal that i preferred this approach to the container one. Actuall accessing the conduwuit command-line admin console is a pain with container, while it's so easy from the prebuilt-binary. 
- 
-Create user and required folders: 
-<code bash> 
-seradd -d /data/daemons/conduwuit conduwuit 
-mkdir -p /data/conduwuit/db 
-chown conduwuit:conduwuit /data/conduwuit -R 
-</code> 
- 
-Download the correct executable from [[https://github.com/girlbossceo/conduwuit/releases|GitHUB releases page]]. You should pick the one for your architecture. For example, for Linux 64bit would be **static-x86_64-unknown-linux-musl**: 
-<code bash> 
-su - conduwuit 
-mkdir bin 
-cd bin 
-wget https://github.com/girlbossceo/conduwuit/releases/download/<< version >>/static-x86_64-unknown-linux-musl 
-</code> 
- 
-===== 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://github.com/element-hq/element-web|here]]. 
- 
-Download latest release tarball from [[https://github.com/element-hq/element-web/releases|here]] and decompress it: 
-<code bash> 
-su - conduwuit 
-wget https://github.com/element-hq/element-web/releases/<< version >> /element-<< version >>.tar.gz 
-tar xvf element-<< version >>.tar.gz 
-ln -s element-<< version >> element-web 
-</code> 
- 
- 
-===== Configuration of Conduwuit server ===== 
- 
-The official Conduwuit configuration documentation can be found [[https://conduwuit.puppyirl.gay/configuration.html|here]]. 
- 
-Now, you cannot start Conduwuit withour a proper configuration file. I suggest you to put it under **/data/conduwuit/conduwuit.toml**, and here is an example to start from: 
-<file /data/conduwuit/conduwuit.toml> 
-[global] 
-server_name = "chat.mydomain.com" 
-address = ["127.0.0.1", "::1"] 
-port = 6167 
-database_path = "/data/conduwuit/db" 
-new_user_displayname_suffix = "-|" 
-allow_check_for_updates = false 
-max_request_size = 20971520 # this should match NGINX max request size 
-#log = "info" 
-#log_colors = true 
-#emergency_password = "" 
- 
-[global.well_known] 
-client = "https://chat.mydomain.com" 
-server = "chat.mydomain.com:443" 
-</file> 
- 
-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 //element-<< version >>// folder and edit accordingly, and to be sure to backup it properly, i suggest to move it to **/data/conduwuit**: 
-<code bash> 
-cd /data/daemons/conduwuit/element-web 
-cp config.sample.json /data/conduwuit/element-config.json 
-ln -s /data/conduwuit/element-config.json config.json 
-</code> 
- 
-At the very least perform the following edits: 
-<code> 
-    "default_server_config": { 
-        "m.homeserver": { 
-            "base_url": "https://chat.gardiol.org", 
-            "server_name": "chat.gardiol.org" 
-        }, 
-    "disable_custom_urls": true, 
-    "disable_guests": true, 
-</code> 
- 
-at the beginning of the file. I suggest to disable both custom URLs and guests, to avoid your web instance to be used too openly. Please note that this **does not mean** that your instance will be used: Element X is a javascript app that works in the browser of the use anyway. 
- 
- 
-===== Manual startup ===== 
- 
-to run Conduwuit server, run the following command as **conduwuit** user: 
-<code bash> 
-/data/daemons/bin/static-x86_64-unknown-linux-musl -c /data/conduwuit/conduwuit.toml 
-</code> 
- 
-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://chat.mydomain.com/_conduwuit/server_version 
-{"name":"Conduwuit","version":"0.5.0 (e5049ca)"} 
-</code> 
- 
-Check federation and Matrix operability, open the following URL: 
-<code> 
-https://federationtester.matrix.org/#chat.mydomain.com 
-</code> 
- 
- 
-===== Reverse proxy ===== 
- 
-A Matrix server must be hosted on a dedicated subdomain. Please see my [[selfhost:nginx|NGINX]] reverse proxy page for more information about the followint configuration. 
- 
-<file - chat.conf> 
-server { 
-        server_name chat.mydomain.com; 
-        listen 8443 ssl; # external access 
-        listen 443 ssl;  # internal access 
- 
-        access_log /var/log/nginx/chat.mydomain.com_access_log main; 
-        error_log /var/log/nginx/chat.mydomain.com_error_log info; 
- 
-        location / { 
-                root /data/daemons/conduwuit/element-web; 
-        } 
- 
-        location ~ ^(/_matrix|/_synapse/client) { 
-                add_header 'Access-Control-Allow-Methods' 'GET, POST, PUT, DELETE, OPTIONS, PATCH, HEAD'; 
-                proxy_pass http://127.0.0.1:6167; 
-                #proxy_pass http://127.0.0.1:6167$request_uri; 
-                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 /.well-known/matrix/server { 
-                return 200 '{"m.server": "chat.mydomain.com:443"}'; 
-                types { } default_type "application/json; charset=utf-8"; 
-        } 
- 
-        location /.well-known/matrix/client { 
-                return 200 '{"m.homeserver": {"base_url": "https://chat.mydomain.com"}}'; 
-                types { } default_type "application/json; charset=utf-8"; 
-                add_header "Access-Control-Allow-Origin" *; 
-        } 
-} 
-</file> 
- 
- 
- 
- 
-===== 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: 
-<code> 
-uwu> admin users create-user myuser mypassword 
-</code> 
- 
-To make a user an admin: 
-<code> 
-uwu> admin users make-user-admin myuser 
-</code> 
- 
-To change a user password: 
-<code> 
-uwu> admin users reset-password myuser mynewpassword 
-</code> 
- 
-You **must** create at least one user and make it admin! 
- 
- 
-===== Autostart ===== 
- 
-Since i use OpenRC, simply drop the following script to /etc/init.d: 
-<file - /etc/init.d/conduwuit> 
-#!/sbin/openrc-run 
-# Copyright 2025 Gentoo Authors 
-# Distributed under the terms of the GNU General Public License v2 
- 
-name="conduwuit daemon" 
-description="Conduwuit Matrix server" 
-pidfile="/run/conduwuit.pid" 
-command_background=true 
-command="/data/daemons/conduwuit/bin/static-x86_64-linux-musl" 
-command_args="-c /data/conduwuit/conduwuit.toml" 
-command_user="conduwuit:conduwuit" 
- 
-depend() { 
-        need net 
-} 
-</file> 
- 
-Make it executable and add to the proper runlevel: 
-<code bash> 
-chmod +x /etc/init.d/conduwuit 
-rc-update add conduwuit default 
-</code> 
- 
  

This website uses technical cookies only. No information is shared with anybody or used in any way but provide the website in your browser.

More information