Skip to content

Commit

Permalink
Link new debian instructions from relevant pages. (#36)
Browse files Browse the repository at this point in the history
  • Loading branch information
Gnuxie authored Sep 23, 2024
1 parent 36595d9 commit 1615c57
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 9 deletions.
1 change: 1 addition & 0 deletions docs/bot/setup.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ See the following links for corresponding installation documentation:
the most convenient way to run Matrix services. Recommended if you
are preparing a new homeserver or are already using
matrix-docker-ansible-deploy.
- [Installation on Debian](./setup_debian.md) - Installation on debian by using [NodeSource](https://github.com/nodesource/distributions?tab=readme-ov-file).
- [Advanced Docker setup](./setup_docker.md) - for experienced system
administrators.
- [Advanced setup from source](./setup_selfbuild.md) - for experienced
Expand Down
23 changes: 16 additions & 7 deletions docs/bot/setup_debian.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,16 @@
---
sidebar_position: 6
---

# Installation on Debian
These are instructions for the installation of draupnir from source on Debian

:::tip

These are instructions for the installation of draupnir from source on Debian.
This installation method is intended for experienced sysadmins.

:::

## Installation
install git curl and sudo
```shell
Expand All @@ -19,7 +28,7 @@ npm install --global yarn
```
create the directory to clone the repo
```shell
mkdir /opt/mod-bot
mkdir /opt/mod-bot
```
clone the repo and fetch the tags
```shell
Expand All @@ -36,10 +45,10 @@ add typescript and corepack
```shell
yarn global add corepack
```
add a user to run the bot
add a user to run the bot
this user will be used by systemd to run the bot since there is no need to run it with root permissions
```shell
useradd -m draupnir
useradd -m draupnir
```
give ownership of the draupnir directory to the bot user
```shell
Expand All @@ -57,16 +66,16 @@ cp /opt/mod-bot/Draupnir/config/default.yaml /opt/mod-bot/Draupnir/config/produc
```
change the path of the datadirectory from the default to the directory we created earlier since the default dir is for the docker setup
```shell
sed -i 's|dataPath: "/data/storage"|dataPath: "/opt/mod-bot/Draupnir/datastorage"|' /opt/mod-bot/Draupnir/config/production.yaml
sed -i 's|dataPath: "/data/storage"|dataPath: "/opt/mod-bot/Draupnir/datastorage"|' /opt/mod-bot/Draupnir/config/production.yaml
```
edit the production config:
edit the production config:
the most important things to configure are the `homeserverUrl:`, the `rawHomeserverUrl:`, the `accessToken:` and the `managementRoom:`
```shell
nano /opt/mod-bot/Draupnir/config/production.yaml
```

## Example systemd service
copy this to `/etc/systemd/system/draupnir.service` and enable with `systemctl enable draupnir`, then simply start with `systemctl start draupnir`
copy this to `/etc/systemd/system/draupnir.service` and enable with `systemctl enable draupnir`, then simply start with `systemctl start draupnir`

:::tip

Expand Down
5 changes: 3 additions & 2 deletions docs/bot/starting_draupnir.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,9 @@ This section is supposed to be read in conjunction with one of the
following installation routes:

1. [Installation with Docker and systemd](./systemd) (recommended).
2. [Advanced Docker setup](./setup_docker).
3. [Advanced setup from source](./setup_selfbuild).
2. [Installation on Debian](./setup_debian)
3. [Advanced Docker setup](./setup_docker).
4. [Advanced setup from source](./setup_selfbuild).

:::

Expand Down

0 comments on commit 1615c57

Please sign in to comment.