Telodendria: Difference between revisions
Matrix>LDA Add install "instructions" (i suck at this lol) |
Matrix>LDA explain telodendria config lore |
||
Line 2: | Line 2: | ||
Telodendria is still in heavy development and isn't excepting a non-federating release until January 2025<ref>[https://git.telodendria.io/Telodendria/Telodendria Telodendria README]</ref>. | Telodendria is still in heavy development and isn't excepting a non-federating release until January 2025<ref>[https://git.telodendria.io/Telodendria/Telodendria Telodendria README]</ref>. | ||
== Configuring Telodendria == | |||
Telodendria essentially uses the filesystem as a database, and as such, you need to point it to an existing directory with the <code>-d [dir]</code> flag, like <code>telodendria -d data</code>. | |||
From that directory, several things are stored, including the actual data Telodendria has to save in order to act as a Matrix homeserver, log files, and the configuration, as <code>[dir]/config.json</code>. | |||
=== Modifying the configuration === | |||
{{Note|This is essentially a boiled-down version of Telodendria's wiki page on [https://git.telodendria.io/Telodendria/Telodendria/src/branch/master/docs/user/config.md configuration]}} | |||
The configuration is stored in a JSON file called <code>[dir]/config.json</code>, which contains the following properties: | |||
* <code>listen</code>: A required object list (Telodendria supports multiple listeners) storing ''where'' Telodendria should listen for requests: | |||
** <code>port</code>: A required integer(between 1 and 65535) representing what port Telodendria listens to. | |||
** <code>maxConnections</code>: An optional integer, defining the maximal amount of connections the listener should accept, which is 32 by default. You should play around, and see what values work the best for your loads. | |||
** <code>threads</code>: An optional integer, defining the amount of threads the listener sets up, which is 4 by default. You should play around, and see what values work the best for your loads. | |||
** <code>tls</code>: An optional object, containing both <code>cert</code> and <code>key</code>, which are both required paths to your certificate and key, in the format excepted by your TLS library. | |||
* <code>log</code>: A required object storing how Telodendria should log: | |||
** <code>output</code>: An enum, storing where Telodendria should log: | |||
*** <code>"stdout"</code>: Write to the standard output. | |||
*** <code>"syslog"</code>: Write to the system logger. | |||
*** <code>"file"</code>: Write to the <code>[dir]/telodendria.log</code> file. | |||
** <code>level</code>: An enum, storing the minimum level of severity for Telodendria to log an event: | |||
*** <code>"message"</code> | |||
*** <code>"debug"</code> | |||
*** <code>"notice"</code> | |||
*** <code>"warning"</code> | |||
*** <code>"error"</code> | |||
** <code>timestampFormat</code>: Represents the format Telodendria uses to write time information(see <code>strftime</code> for more). | |||
** <code>color</code>: A boolean, determining whenever color should be enabled, whenever possible(if on an ANSI terminal) | |||
* <code>runAs</code>: An object, that determines what user(<code>uid</code> as username) and role(<code>gid</code> as rolename) to run as if running as UID 0 (<code>root</code> in most systems) | |||
* <code>serverName</code>: A required string, representing the server's name to the federation (see [[Delegation]]) | |||
* <code>baseUrl</code>: The URL used to prefix Matrix requests, when delegated | |||
* <code>pid</code>: An optional PID file Telodendria creates and writes it's PID to when running. | |||
* <code>federation</code>: A required boolean, used to determing whenever the server handles federation. | |||
* <code>registration</code>: A required boolean, used to determing whenever the server supports open registration. Please note registration tokens do bypass this. | |||
* <code>maxCache</code>: An optional integer, denoting how much cache to setup for the database in bytes, set to 0 by default. | |||
* <code>identityServer</code>: An optional [[Identity server|identity server]] to advertise. | |||
== Compiling Telodendria from Git == | == Compiling Telodendria from Git == |
Revision as of 18:39, 16 January 2024
Telodendria is a Matrix homeserver in alpha written in C99(previously C89)[1], that aims to extremely powerful yet lightweight, while all being as POSIX-compliant as possible.
Telodendria is still in heavy development and isn't excepting a non-federating release until January 2025[2].
Configuring Telodendria
Telodendria essentially uses the filesystem as a database, and as such, you need to point it to an existing directory with the -d [dir]
flag, like telodendria -d data
.
From that directory, several things are stored, including the actual data Telodendria has to save in order to act as a Matrix homeserver, log files, and the configuration, as [dir]/config.json
.
Modifying the configuration
The configuration is stored in a JSON file called [dir]/config.json
, which contains the following properties:
listen
: A required object list (Telodendria supports multiple listeners) storing where Telodendria should listen for requests:port
: A required integer(between 1 and 65535) representing what port Telodendria listens to.maxConnections
: An optional integer, defining the maximal amount of connections the listener should accept, which is 32 by default. You should play around, and see what values work the best for your loads.threads
: An optional integer, defining the amount of threads the listener sets up, which is 4 by default. You should play around, and see what values work the best for your loads.tls
: An optional object, containing bothcert
andkey
, which are both required paths to your certificate and key, in the format excepted by your TLS library.
log
: A required object storing how Telodendria should log:output
: An enum, storing where Telodendria should log:"stdout"
: Write to the standard output."syslog"
: Write to the system logger."file"
: Write to the[dir]/telodendria.log
file.
level
: An enum, storing the minimum level of severity for Telodendria to log an event:"message"
"debug"
"notice"
"warning"
"error"
timestampFormat
: Represents the format Telodendria uses to write time information(seestrftime
for more).color
: A boolean, determining whenever color should be enabled, whenever possible(if on an ANSI terminal)
runAs
: An object, that determines what user(uid
as username) and role(gid
as rolename) to run as if running as UID 0 (root
in most systems)
serverName
: A required string, representing the server's name to the federation (see Delegation)baseUrl
: The URL used to prefix Matrix requests, when delegatedpid
: An optional PID file Telodendria creates and writes it's PID to when running.federation
: A required boolean, used to determing whenever the server handles federation.registration
: A required boolean, used to determing whenever the server supports open registration. Please note registration tokens do bypass this.maxCache
: An optional integer, denoting how much cache to setup for the database in bytes, set to 0 by default.identityServer
: An optional identity server to advertise.
Compiling Telodendria from Git
Telodendria only needs a few dependencies: Cytoplasm (which can be built at the same time), a POSIX-compliant libc
(with pthread support), and an optional TLS library(OpenSSL/LibreSSL).
To build it, you can first install Cytoplasm if your distribution supports it.
On Arch, you can use the AUR to install cytoplasm-git
.
Then, clone and setup Telodendria with the following
$ git clone https://git.telodendria.io/Telodendria/Telodendria # use --recurse-submodules if Cytoplasm wasn't already installed
$ cd Telodendria
# If Cytoplasm wasn't already installed
$ cd Cytoplasm
$ ./configure # --disable-tls if you do not have OpenSSL or LibreSSL
$ make # You can use -j[jobs] there
$ cd ..
Now, build it with
$ ./configure # in the Telodendria directory
$ make # You can use -j[jobs] here
If you didn't already install Cytoplasm, make sure to either move the generated shared library (Cytoplasm/out/lib/libCytoplasm.so
) to a standard search path by using make install
, or add its directory to LD_LIBRARY_PATH
for testing.
Then, to test that Telodendria works, one can run on its directory
$ ./out/bin/telodendria
It should log No database directory specified.
before shutting down.
References
- ↑ Cytoplasm, which Telodendria depends on has switched to using C99 features
- ↑ Telodendria README