Skip to content

Commit

Permalink
Merge pull request #3845 from luixxiul/fix
Browse files Browse the repository at this point in the history
Adjust blank lines
  • Loading branch information
spantaleev authored Dec 2, 2024
2 parents dd31bf0 + bd6db65 commit 8c4711f
Show file tree
Hide file tree
Showing 84 changed files with 30 additions and 254 deletions.
42 changes: 0 additions & 42 deletions CHANGELOG.md

Large diffs are not rendered by default.

8 changes: 0 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,6 @@ Web clients for Matrix that you can host on your own domains.
| [Cinny](https://github.com/ajbura/cinny) || Simple, elegant and secure web client | [Link](docs/configuring-playbook-client-cinny.md) |
| [SchildiChat Web](https://schildi.chat/) || Based on Element Web, with a more traditional instant messaging experience | [Link](docs/configuring-playbook-client-schildichat-web.md) |



### Server Components

Services that run on the server to make the various parts of your installation work.
Expand All @@ -79,7 +77,6 @@ Services that run on the server to make the various parts of your installation w
| [ma1sd](https://github.com/ma1uta/ma1sd) | ❌ | Matrix Identity Server | [Link](docs/configuring-playbook-ma1sd.md)
| [ddclient](https://github.com/linuxserver/docker-ddclient) || Dynamic DNS | [Link](docs/configuring-playbook-dynamic-dns.md) |


### Authentication

Extend and modify how users are authenticated on your homeserver.
Expand All @@ -94,7 +91,6 @@ Extend and modify how users are authenticated on your homeserver.
| [Matrix User Verification Service](https://github.com/matrix-org/matrix-user-verification-service) (UVS) || Service to verify details of a user based on an Open ID token | [Link](docs/configuring-playbook-user-verification-service.md) |
| [synapse-simple-antispam](https://github.com/t2bot/synapse-simple-antispam) (advanced) || A spam checker module | [Link](docs/configuring-playbook-synapse-simple-antispam.md) |


### File Storage

Use alternative file storage to the default `media_store` folder.
Expand Down Expand Up @@ -140,7 +136,6 @@ Bridges can be used to connect your Matrix installation with third-party communi
| [Email2Matrix](https://github.com/devture/email2matrix) || Bridge for relaying emails to Matrix rooms | [Link](docs/configuring-playbook-email2matrix.md) |
| [Postmoogle](https://github.com/etkecc/postmoogle) || Email to Matrix bridge | [Link](docs/configuring-playbook-bridge-postmoogle.md) |


### Bots

Bots provide various additional functionality to your installation.
Expand Down Expand Up @@ -187,14 +182,12 @@ Various services that don't fit any other categories.
| [Sygnal](https://github.com/matrix-org/sygnal) || Push gateway | [Link](docs/configuring-playbook-sygnal.md) |
| [ntfy](https://ntfy.sh) || Push notifications server | [Link](docs/configuring-playbook-ntfy.md) |


## 🆕 Changes

This playbook evolves over time, sometimes with backward-incompatible changes.

When updating the playbook, refer to [the changelog](CHANGELOG.md) to catch up with what's new.


## 🆘 Support

- Matrix room: [#matrix-docker-ansible-deploy:devture.com](https://matrix.to/#/#matrix-docker-ansible-deploy:devture.com)
Expand All @@ -203,7 +196,6 @@ When updating the playbook, refer to [the changelog](CHANGELOG.md) to catch up w

- GitHub issues: [spantaleev/matrix-docker-ansible-deploy/issues](https://github.com/spantaleev/matrix-docker-ansible-deploy/issues)


## 🤝 Related

You may also be interested in [mash-playbook](https://github.com/mother-of-all-self-hosting/mash-playbook) - another Ansible playbook for self-hosting non-Matrix services (see its [List of supported services](https://github.com/mother-of-all-self-hosting/mash-playbook/blob/main/docs/supported-services.md)).
Expand Down
1 change: 0 additions & 1 deletion docs/alternative-architectures.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ The playbook automatically determines the target server's architecture (the `mat

Some tools and container images can be built on the host or other measures can be used to install on that architecture.


## Implementation details

For `amd64`, prebuilt container images (see the [container images we use](container-images.md)) are used for all components (except [Hydrogen](configuring-playbook-client-hydrogen.md), which goes through self-building).
Expand Down
10 changes: 2 additions & 8 deletions docs/ansible.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ This playbook is meant to be run using [Ansible](https://www.ansible.com/).

Ansible typically runs on your local computer and carries out tasks on a remote server. If your local computer cannot run Ansible, you can also run Ansible on some server somewhere (including the server you wish to install to).


## Supported Ansible versions

To manually check which version of Ansible you're on, run: `ansible --version`.
Expand All @@ -16,7 +15,6 @@ We're not sure what's the minimum version of Ansible that can run this playbook

If your distro ships with an Ansible version older than this, you may run into issues. Consider [Upgrading Ansible](#upgrading-ansible) or [using Ansible via Docker](#using-ansible-via-docker).


## Upgrading Ansible

Depending on your distribution, you may be able to upgrade Ansible in a few different ways:
Expand All @@ -27,10 +25,8 @@ Depending on your distribution, you may be able to upgrade Ansible in a few diff

If using the `pip` method, do note that the `ansible-playbook` binary may not be on the `$PATH` (https://linuxconfig.org/linux-path-environment-variable), but in some more special location like `/usr/local/bin/ansible-playbook`. You may need to invoke it using the full path.


**Note**: Both of the above methods are a bad way to run system software such as Ansible. If you find yourself needing to resort to such hacks, please consider reporting a bug to your distribution and/or switching to a sane distribution, which provides up-to-date software.


## Using Ansible via Docker

Alternatively, you can run Ansible inside a Docker container (powered by the [devture/ansible](https://hub.docker.com/r/devture/ansible/) Docker image).
Expand All @@ -39,7 +35,6 @@ This ensures that you're using a very recent Ansible version, which is less like

You can either [run Ansible in a container on the Matrix server itself](#running-ansible-in-a-container-on-the-matrix-server-itself) or [run Ansible in a container on another computer (not the Matrix server)](#running-ansible-in-a-container-on-another-computer-not-the-matrix-server).


### Running Ansible in a container on the Matrix server itself

To run Ansible in a (Docker) container on the Matrix server itself, you need to have a working Docker installation. Docker is normally installed by the playbook, so this may be a bit of a chicken and egg problem. To solve it:
Expand Down Expand Up @@ -71,7 +66,6 @@ First, consider running `git config --global --add safe.directory /work` to [res

Finally, you can execute `ansible-playbook ...` (or `ansible-playbook --connection=community.docker.nsenter ...`) commands as per normal now.


### Running Ansible in a container on another computer (not the Matrix server)

Run this from the playbook's directory:
Expand All @@ -93,17 +87,17 @@ First, consider running `git config --global --add safe.directory /work` to [res

Finally, you execute `ansible-playbook ...` commands as per normal now.


#### If you don't use SSH keys for authentication

If you don't use SSH keys for authentication, simply remove that whole line (`-v $HOME/.ssh/id_rsa:/root/.ssh/id_rsa:ro`).

To authenticate at your server using a password, you need to add a package. So, when you are in the shell of the ansible docker container (the previously used `docker run -it ...` command), run:

```sh
apk add sshpass
```
Then, to be asked for the password whenever running an `ansible-playbook` command add `--ask-pass` to the arguments of the command.

Then, to be asked for the password whenever running an `ansible-playbook` command add `--ask-pass` to the arguments of the command.

#### Resolve directory ownership issues

Expand Down
1 change: 1 addition & 0 deletions docs/configuring-captcha.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
(Adapted from the [upstream project](https://github.com/element-hq/synapse/blob/develop/docs/CAPTCHA_SETUP.md))

# Overview

Captcha can be enabled for this home server. This file explains how to do that.

The captcha mechanism used is Google's [ReCaptcha](https://www.google.com/recaptcha/). This requires API keys from Google. If your homeserver is Dendrite then [hCapcha](https://www.hcaptcha.com) can be used instead.
Expand Down
1 change: 0 additions & 1 deletion docs/configuring-playbook-alertmanager-receiver.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,6 @@ Steps 1 and 2 above only need to be done once, while preparing your [configurati

Steps 3 and 4 need to be done for each new room you'd like the bot to deliver alerts to. Step 5 is optional and provides cleaner `/alert/` URLs.


## Installing

Now that you've [prepared the bot account and room](#account-and-room-preparation), [configured the playbook](#adjusting-the-playbook-configuration), and potentially [adjusted your DNS records](#adjusting-dns-records), you can run the playbook with [playbook tags](playbook-tags.md) as below:
Expand Down
2 changes: 0 additions & 2 deletions docs/configuring-playbook-appservice-draupnir-for-all.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ The playbook can install and configure the [Draupnir](https://github.com/the-dra

Appservice mode can be used together with the regular [Draupnir bot](configuring-playbook-bot-draupnir.md) or independently. Details about the differences between the 2 modes are described below.


## Draupnir Appservice mode compared to Draupnir bot mode

The administrative functions for managing the appservice are alpha quality and very limited. However, the experience of using an appservice-provisioned Draupnir is on par with the experience of using Draupnir from bot mode except in the case of avatar customisation as described later on in this document.
Expand All @@ -17,7 +16,6 @@ Normal Draupnir does come with the benefit of access to Synapse Admin features.

Draupnir for all does not support external tooling like [MRU](https://mru.rory.gay) as it can't access Draupnir's user account.


## Installation

### 1. Create a main management room.
Expand Down
2 changes: 0 additions & 2 deletions docs/configuring-playbook-base-domain-serving.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ Doing this, the playbook will:

- serve a simple homepage at `https://example.com` with content `Hello from example.com` (configurable via the `matrix_static_files_file_index_html_template` variable). You can also [serve a more complicated static website](#serving-a-static-website-at-the-base-domain).


## Serving a static website at the base domain

By default, when "serving the base domain" is enabled, the playbook hosts a simple `index.html` webpage at `/matrix/static-files/public/index.html`. The content of this page is taken from the `matrix_static_files_file_index_html_template` variable.
Expand All @@ -56,7 +55,6 @@ With this configuration, Ansible will no longer mess around with the `/matrix/st

You are then free to upload any static website files to `/matrix/static-files/public` and they will get served at the base domain. You can do so manually or by using the [ansible-role-aux](https://github.com/mother-of-all-self-hosting/ansible-role-aux) Ansible role, which is part of this playbook already.


## Serving a more complicated website at the base domain

If you'd like to serve an even more complicated (dynamic) website from the Matrix server, relying on the playbook to serve the base domain is not the best choice.
Expand Down
13 changes: 0 additions & 13 deletions docs/configuring-playbook-bot-baibot.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,10 @@ It supports [OpenAI](https://openai.com/)'s [ChatGPT](https://openai.com/blog/ch

It's designed as a more private and [✨ featureful](https://github.com/etkecc/baibot/?tab=readme-ov-file#-features) alternative to [matrix-chatgpt-bot](./configuring-playbook-bot-chatgpt.md). See the [baibot](https://github.com/etkecc/baibot) project and its documentation for more information.


## Prerequisites

API access to one or more LLM [☁️ providers](https://github.com/etkecc/baibot/blob/main/docs/providers.md).


## Adjusting the playbook configuration

There are **a lot of configuration options** (some required, some possibly required, some optional), so they're **split into multiple sections below**:
Expand All @@ -30,7 +28,6 @@ There are **a lot of configuration options** (some required, some possibly requi

Depending on your current `vars.yml` file and desired configuration, **you may require more than just the [base configuration](#base-configuration)**.


### Base configuration

Add the following configuration to your `inventory/host_vars/matrix.example.com/vars.yml` file:
Expand Down Expand Up @@ -73,7 +70,6 @@ matrix_bot_baibot_config_persistence_config_encryption_key: 'A_HEX_STRING_OF_64_
As mentioned above, **this may not be enough**. Continue with the configuration sections below.
### 👮‍♂️ Administrator configuration
This is an addition to the [base configuration](#base-configuration).
Expand Down Expand Up @@ -139,7 +135,6 @@ Depending on your propensity for [GitOps](https://en.wikipedia.org/wiki/DevOps#G

Before proceeding, we recommend reading the upstream documentation on [How to choose a provider](https://github.com/etkecc/baibot/blob/main/docs/providers.md#how-to-choose-a-provider). In short, it's probably best to go with [OpenAI](#openai).


#### Anthropic

You can statically-define a single [🤖 agent](https://github.com/etkecc/baibot/blob/main/docs/agents.md) instance powered by the [Anthropic provider](https://github.com/etkecc/baibot/blob/main/docs/providers.md#anthropic) with the help of the playbook's preset variables.
Expand All @@ -166,7 +161,6 @@ If you'd like to use more than one model, take a look at the [Configuring additi

💡 You may also wish to use this new agent for [🤝 Configuring initial default handlers](#-configuring-initial-default-handlers).


#### Groq

You can statically-define a single [🤖 agent](https://github.com/etkecc/baibot/blob/main/docs/agents.md) instance powered by the [Groq provider](https://github.com/etkecc/baibot/blob/main/docs/providers.md#groq) with the help of the playbook's preset variables.
Expand Down Expand Up @@ -200,7 +194,6 @@ If you'd like to use more than one model, take a look at the [Configuring additi

💡 You may also wish to use this new agent for [🤝 Configuring initial default handlers](#-configuring-initial-default-handlers).


#### Mistral

You can statically-define a single [🤖 agent](https://github.com/etkecc/baibot/blob/main/docs/agents.md) instance powered by the [🇫🇷 Mistral provider](https://github.com/etkecc/baibot/blob/main/docs/providers.md#mistral) with the help of the playbook's preset variables.
Expand Down Expand Up @@ -229,7 +222,6 @@ If you'd like to use more than one model, take a look at the [Configuring additi

💡 You may also wish to use this new agent for [🤝 Configuring initial default handlers](#-configuring-initial-default-handlers).


#### OpenAI

You can statically-define a single [🤖 agent](https://github.com/etkecc/baibot/blob/main/docs/agents.md) instance powered by the [OpenAI provider](https://github.com/etkecc/baibot/blob/main/docs/providers.md#openai) with the help of the playbook's preset variables.
Expand Down Expand Up @@ -260,7 +252,6 @@ If you'd like to use more than one model, take a look at the [Configuring additi

💡 You may also wish to use this new agent for [🤝 Configuring initial default handlers](#-configuring-initial-default-handlers).


#### OpenAI Compatible

You can statically-define a single [🤖 agent](https://github.com/etkecc/baibot/blob/main/docs/agents.md) instance powered by the [OpenAI Compatible provider](https://github.com/etkecc/baibot/blob/main/docs/providers.md#openai-compatible) with the help of the playbook's preset variables.
Expand All @@ -271,7 +262,6 @@ Some of these popular services already have **shortcut** providers (see [support

As of this moment, the playbook does not include presets for any of these services, so you'll need to [Configuring additional agents (without a preset)](#configuring-additional-agents-without-a-preset).


#### Configuring additional agents (without a preset)

The Ansible role may be lacking preset variables for some [☁️ provider](https://github.com/etkecc/baibot/blob/main/docs/providers.md), or you may wish to statically-define an agent on the same provider twice (or more) with different configuration.
Expand Down Expand Up @@ -327,7 +317,6 @@ As with any [🤖 agent](https://github.com/etkecc/baibot/blob/main/docs/agents.

💡 You may also wish to use these new agents for [🤝 Configuring initial default handlers](#-configuring-initial-default-handlers).


### 🤝 Configuring initial default handlers

This section is only useful if you're [🤖 Configuring agents via Ansible](#-configuring-agents-via-ansible), as it lets you put these agents to use as soon as the bot starts (by adjusting the bot's **initial global configuration**).
Expand Down Expand Up @@ -373,7 +362,6 @@ matrix_bot_baibot_config_initial_global_config_handler_image_generation: null

**Note**: these are initial defaults for the bot's global configuration. As such, changing any of these values subsequently has no effect on the bot's behavior. **Once initially configured the global configuration cannot be managed Ansible**, but only via bot commands.


## Installing

After configuring the playbook, run it with [playbook tags](playbook-tags.md) as below:
Expand Down Expand Up @@ -407,7 +395,6 @@ Send `!bai help` to the room at any time to see the bot's help menu for addition

You can also refer to the upstream [baibot](https://github.com/etkecc/baibot) project's documentation.


## Debugging

As with all other services, you can find service logs in [systemd-journald](https://www.freedesktop.org/software/systemd/man/systemd-journald.service.html) by running something like `journalctl -fu matrix-bot-baibot`
Expand Down
3 changes: 0 additions & 3 deletions docs/configuring-playbook-bot-chatgpt.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,12 @@ You can use the playbook to [register a new user](registering-users.md):
ansible-playbook -i inventory/hosts setup.yml --extra-vars='username=bot.chatgpt password=PASSWORD_FOR_THE_BOT admin=no' --tags=register-user
```


## 2. Get an access token and create encryption keys

Refer to the documentation on [how to obtain an access token](obtaining-access-tokens.md).

To make sure the bot can read encrypted messages, it will need an encryption key, just like any other new user. While obtaining the access token, follow the prompts to setup a backup key. More information can be found in the [Element documentation](https://element.io/help#encryption6).


## 3. Adjusting the playbook configuration

Add the following configuration to your `inventory/host_vars/matrix.example.com/vars.yml` file (adapt to your needs):
Expand All @@ -53,7 +51,6 @@ matrix_bot_chatgpt_matrix_bot_prompt_prefix: 'Instructions:\nYou are ChatGPT, a
You will need to get tokens for ChatGPT.
## 4. Installing
After configuring the playbook, run it with [playbook tags](playbook-tags.md) as below:
Expand Down
Loading

0 comments on commit 8c4711f

Please sign in to comment.