Skip to content

Commit 8878eed

Browse files
Suguru HiraharaSuguru Hirahara
authored andcommitted
Remove Go-NEB
Reuse https://github.com/spantaleev/matrix-docker-ansible-deploy/blob/096b85bd966931c6ddca8196829c4b99f2fb664f/docs/configuring-playbook-email2matrix.md Signed-off-by: Suguru Hirahara <did:key:z6MkvVZk1A3KBApWJXv2Ju4H14ErDfRGxh8zxdXSZ4vACDg5>
1 parent 1ccdbfd commit 8878eed

File tree

17 files changed

+30
-978
lines changed

17 files changed

+30
-978
lines changed

CHANGELOG.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,11 @@
1+
# 2025-XX-XX
2+
3+
## Go-NEB has been removed from the playbook
4+
5+
[Go-NEB](./docs/configuring-playbook-bot-go-neb.md) has been removed from the playbook, as it has been discontinued since June 2023.
6+
7+
The playbook will let you know if you're using any `matrix_bot_go_neb_*` variables. You'll need to remove them from `vars.yml` and potentially [uninstall the bot manually](./docs/configuring-playbook-bot-go-neb.md#uninstalling-go-neb-manually).
8+
19
# 2025-11-09
210

311
## matrix-appservice-webhooks has been removed from the playbook
Lines changed: 10 additions & 251 deletions
Original file line numberDiff line numberDiff line change
@@ -1,267 +1,26 @@
11
<!--
2-
SPDX-FileCopyrightText: 2021 - 2024 Slavi Pantaleev
2+
SPDX-FileCopyrightText: 2019 - 2025 Slavi Pantaleev
33
SPDX-FileCopyrightText: 2021 Yannick Goossens
44
SPDX-FileCopyrightText: 2022 Dennis Ciba
5+
SPDX-FileCopyrightText: 2022 Nikita Chernyi
6+
SPDX-FileCopyrightText: 2023 - 2025 MDAD project contributors
57
SPDX-FileCopyrightText: 2024 - 2025 Suguru Hirahara
6-
SPDX-FileCopyrightText: 2025 MDAD project contributors
78
89
SPDX-License-Identifier: AGPL-3.0-or-later
910
-->
1011

11-
# Setting up Go-NEB (optional, unmaintained)
12+
# Setting up Go-NEB (optional, removed)
1213

13-
**Note**: [Go-NEB](https://github.com/matrix-org/go-neb) is now an archived (**unmaintained**) project. We recommend not bothering with installing it. While not a 1:1 replacement, the bridge's author suggests taking a look at [matrix-hookshot](https://github.com/matrix-org/matrix-hookshot) as a replacement, which can also be [installed using this playbook](configuring-playbook-bridge-hookshot.md). Consider using that bot instead of this one.
14+
🪦 The playbook used to be able to install and configure [Go-NEB](https://github.com/matrix-org/go-neb), but no longer includes this component as it has been discontinued.
1415

15-
The playbook can install and configure [Go-NEB](https://github.com/matrix-org/go-neb) for you.
16+
While not a 1:1 replacement, the bot's author suggests taking a look at [matrix-hookshot](https://github.com/matrix-org/matrix-hookshot) as a replacement, which can also be [installed using this playbook](configuring-playbook-bridge-hookshot.md).
1617

17-
Go-NEB is a Matrix bot written in Go. It is the successor to Matrix-NEB, the original Matrix bot written in Python.
18+
## Uninstalling Go-NEB manually
1819

19-
See the project's [documentation](https://github.com/matrix-org/go-neb/blob/master/README.md) to learn what it does and why it might be useful to you.
20-
21-
## Prerequisites
22-
23-
### Register the bot account
24-
25-
The playbook does not automatically create users for you. You **need to register the bot user manually** before setting up the bot.
26-
27-
Generate a strong password for the bot. You can create one with a command like `pwgen -s 64 1`.
28-
29-
You can use the playbook to [register a new user](registering-users.md):
20+
If you still have the Go-NEB component installed on your Matrix server, the playbook can no longer help you uninstall it and you will need to do it manually. To uninstall manually, run these commands on the server:
3021

3122
```sh
32-
ansible-playbook -i inventory/hosts setup.yml --extra-vars='username=bot.go-neb password=PASSWORD_FOR_THE_BOT admin=no' --tags=register-user
33-
```
34-
35-
### Obtain an access token
36-
37-
The bot requires an access token to be able to connect to your homeserver. Refer to the documentation on [how to obtain an access token](obtaining-access-tokens.md).
38-
39-
> [!WARNING]
40-
> Access tokens are sensitive information. Do not include them in any bug reports, messages, or logs. Do not share the access token with anyone.
41-
42-
## Adjusting DNS records
43-
44-
By default, this playbook installs Go-NEB on the `goneb.` subdomain (`goneb.example.com`) and requires you to create a CNAME record for `goneb`, which targets `matrix.example.com`.
45-
46-
When setting, replace `example.com` with your own.
47-
48-
## Adjusting the playbook configuration
49-
50-
To enable the bot, add the following configuration to your `inventory/host_vars/matrix.example.com/vars.yml` file. Make sure to replace `ACCESS_TOKEN_FOR_GONEB_HERE` and `ACCESS_TOKEN_FOR_ANOTHER_GONEB_HERE` with the ones created [above](#obtain-an-access-token).
51-
52-
```yaml
53-
matrix_bot_go_neb_enabled: true
54-
55-
# You need at least 1 client.
56-
# Use the access token you obtained in the step above.
57-
matrix_bot_go_neb_clients:
58-
- UserID: "@goneb:{{ matrix_domain }}"
59-
AccessToken: "ACCESS_TOKEN_FOR_GONEB_HERE"
60-
DeviceID: "DEVICE1"
61-
HomeserverURL: "{{ matrix_addons_homeserver_client_api_url }}"
62-
Sync: true
63-
AutoJoinRooms: true
64-
DisplayName: "Go-NEB!"
65-
AcceptVerificationFromUsers: [":{{ matrix_domain }}"]
66-
67-
- UserID: "@another_goneb:{{ matrix_domain }}"
68-
AccessToken: "ACCESS_TOKEN_FOR_ANOTHER_GONEB_HERE"
69-
DeviceID: "DEVICE2"
70-
HomeserverURL: "{{ matrix_addons_homeserver_client_api_url }}"
71-
Sync: false
72-
AutoJoinRooms: false
73-
DisplayName: "Go-NEB!"
74-
AcceptVerificationFromUsers: ["^@admin:{{ matrix_domain }}"]
75-
76-
# Optional, for use with the github_cmd, github_webhooks or jira services
77-
matrix_bot_go_neb_realms:
78-
- ID: "github_realm"
79-
Type: "github"
80-
Config: {} # No need for client ID or Secret as Go-NEB isn't generating OAuth URLs
81-
82-
# Optional. The list of *authenticated* sessions which Go-NEB is aware of.
83-
matrix_bot_go_neb_sessions:
84-
- SessionID: "your_github_session"
85-
RealmID: "github_realm"
86-
UserID: "@alice:{{ matrix_domain }}" # This needs to be the username of the person that's allowed to use the !github commands
87-
Config:
88-
# Populate these fields by generating a "Personal Access Token" on github.com
89-
AccessToken: "YOUR_GITHUB_ACCESS_TOKEN"
90-
Scopes: "admin:org_hook,admin:repo_hook,repo,user"
91-
92-
# The list of services which Go-NEB is aware of.
93-
# Delete or modify this list as appropriate.
94-
# See the docs for /configureService for the full list of options:
95-
# https://matrix-org.github.io/go-neb/pkg/github.com/matrix-org/go-neb/api/index.html#ConfigureServiceRequest
96-
# You need at least 1 service.
97-
matrix_bot_go_neb_services:
98-
- ID: "echo_service"
99-
Type: "echo"
100-
UserID: "@goneb:{{ matrix_domain }}"
101-
Config: {}
102-
103-
# Can be obtained from https://developers.giphy.com/dashboard/
104-
- ID: "giphy_service"
105-
Type: "giphy"
106-
UserID: "@goneb:{{ matrix_domain }}" # requires a Syncing client
107-
Config:
108-
api_key: "qwg4672vsuyfsfe"
109-
use_downsized: false
110-
111-
# This service has been dead for over a year :/
112-
- ID: "guggy_service"
113-
Type: "guggy"
114-
UserID: "@goneb:{{ matrix_domain }}" # requires a Syncing client
115-
Config:
116-
api_key: "2356saaqfhgfe"
117-
118-
# API Key via https://developers.google.com/custom-search/v1/introduction
119-
# CX via http://www.google.com/cse/manage/all
120-
# https://stackoverflow.com/questions/6562125/getting-a-cx-id-for-custom-search-google-api-python
121-
# 'Search the entire web' and 'Image search' enabled for best results
122-
- ID: "google_service"
123-
Type: "google"
124-
UserID: "@goneb:{{ matrix_domain }}" # requires a Syncing client
125-
Config:
126-
api_key: "AIzaSyA4FD39m9"
127-
cx: "AIASDFWSRRtrtr"
128-
129-
# Obtain a key via https://api.imgur.com/oauth2/addclient
130-
# Select "oauth2 without callback url"
131-
- ID: "imgur_service"
132-
Type: "imgur"
133-
UserID: "@imgur:{{ matrix_domain }}" # requires a Syncing client
134-
Config:
135-
client_id: "AIzaSyA4FD39m9"
136-
client_secret: "somesecret"
137-
138-
- ID: "wikipedia_service"
139-
Type: "wikipedia"
140-
UserID: "@goneb:{{ matrix_domain }}" # requires a Syncing client
141-
Config:
142-
143-
- ID: "rss_service"
144-
Type: "rssbot"
145-
UserID: "@another_goneb:{{ matrix_domain }}"
146-
Config:
147-
feeds:
148-
"http://lorem-rss.herokuapp.com/feed?unit=second&interval=60":
149-
rooms: ["!qporfwt:{{ matrix_domain }}"]
150-
must_include:
151-
author:
152-
- author1
153-
description:
154-
- lorem
155-
- ipsum
156-
must_not_include:
157-
title:
158-
- Lorem
159-
- Ipsum
160-
161-
- ID: "github_cmd_service"
162-
Type: "github"
163-
UserID: "@goneb:{{ matrix_domain }}" # requires a Syncing client
164-
Config:
165-
RealmID: "github_realm"
166-
167-
# Make sure your BASE_URL can be accessed by Github!
168-
- ID: "github_webhook_service"
169-
Type: "github-webhook"
170-
UserID: "@another_goneb:{{ matrix_domain }}"
171-
Config:
172-
RealmID: "github_realm"
173-
ClientUserID: "@alice:{{ matrix_domain }}" # needs to be an authenticated user so Go-NEB can create webhooks. Check the UserID field in the github_realm in matrix_bot_go_neb_sessions.
174-
Rooms:
175-
"!qporfwt:example.com":
176-
Repos:
177-
"element-hq/synapse":
178-
Events: ["push", "issues"]
179-
"matrix-org/dendron":
180-
Events: ["pull_request"]
181-
"!aaabaa:example.com":
182-
Repos:
183-
"element-hq/synapse":
184-
Events: ["push", "issues"]
185-
"matrix-org/dendron":
186-
Events: ["pull_request"]
23+
systemctl disable --now matrix-bot-go-neb.service
18724

188-
- ID: "slackapi_service"
189-
Type: "slackapi"
190-
UserID: "@slackapi:{{ matrix_domain }}"
191-
Config:
192-
Hooks:
193-
"hook1":
194-
RoomID: "!qporfwt:example.com"
195-
MessageType: "m.text" # default is m.text
196-
197-
- ID: "alertmanager_service"
198-
Type: "alertmanager"
199-
UserID: "@alertmanager:{{ matrix_domain }}"
200-
Config:
201-
# This is for information purposes only. It should point to Go-NEB path as follows:
202-
# `/services/hooks/<base64 encoded service ID>`
203-
# Where in this case "service ID" is "alertmanager_service"
204-
# Make sure your BASE_URL can be accessed by the Alertmanager instance!
205-
webhook_url: "http://localhost/services/hooks/YWxlcnRtYW5hZ2VyX3NlcnZpY2U"
206-
# Each room will get the notification with the alert rendered with the given template
207-
rooms:
208-
"!qporfwt:example.com":
209-
text_template: "{% raw %}{{range .Alerts -}} [{{ .Status }}] {{index .Labels \"alertname\" }}: {{index .Annotations \"description\"}} {{ end -}}{% endraw %}"
210-
html_template: "{% raw %}{{range .Alerts -}} {{ $severity := index .Labels \"severity\" }} {{ if eq .Status \"firing\" }} {{ if eq $severity \"critical\"}} <font color='red'><b>[FIRING - CRITICAL]</b></font> {{ else if eq $severity \"warning\"}} <font color='orange'><b>[FIRING - WARNING]</b></font> {{ else }} <b>[FIRING - {{ $severity }}]</b> {{ end }} {{ else }} <font color='green'><b>[RESOLVED]</b></font> {{ end }} {{ index .Labels \"alertname\"}} : {{ index .Annotations \"description\"}} <a href=\"{{ .GeneratorURL }}\">source</a><br/>{{end -}}{% endraw %}"
211-
msg_type: "m.text" # Must be either `m.text` or `m.notice`
212-
```
213-
214-
### Adjusting the Go-NEB URL (optional)
215-
216-
By tweaking the `matrix_bot_go_neb_hostname` and `matrix_bot_go_neb_path_prefix` variables, you can easily make the service available at a **different hostname and/or path** than the default one.
217-
218-
Example additional configuration for your `vars.yml` file:
219-
220-
```yaml
221-
# Switch to the domain used for Matrix services (`matrix.example.com`),
222-
# so we won't need to add additional DNS records for Go-NEB.
223-
matrix_bot_go_neb_hostname: "{{ matrix_server_fqn_matrix }}"
224-
225-
# Expose under the /go-neb subpath
226-
matrix_bot_go_neb_path_prefix: /go-neb
25+
rm -rf /matrix/go-neb
22726
```
228-
229-
After changing the domain, **you may need to adjust your DNS** records to point the Go-NEB domain to the Matrix server.
230-
231-
If you've decided to reuse the `matrix.` domain, you won't need to do any extra DNS configuration.
232-
233-
### Extending the configuration
234-
235-
There are some additional things you may wish to configure about the bot.
236-
237-
Take a look at:
238-
239-
- `roles/custom/matrix-bot-go-neb/defaults/main.yml` for some variables that you can customize via your `vars.yml` file
240-
- `roles/custom/matrix-bot-go-neb/templates/config.yaml.j2` for the bot's default configuration. You can override settings (even those that don't have dedicated playbook variables) using the `matrix_bot_go_neb_configuration_extension_yaml` variable
241-
242-
## Installing
243-
244-
After configuring the playbook and potentially [adjusting your DNS records](#adjusting-dns-records), run the playbook with [playbook tags](playbook-tags.md) as below:
245-
246-
<!-- NOTE: let this conservative command run (instead of install-all) to make it clear that failure of the command means something is clearly broken. -->
247-
```sh
248-
ansible-playbook -i inventory/hosts setup.yml --tags=setup-all,start
249-
```
250-
251-
The shortcut commands with the [`just` program](just.md) are also available: `just install-all` or `just setup-all`
252-
253-
`just install-all` is useful for maintaining your setup quickly ([2x-5x faster](../CHANGELOG.md#2x-5x-performance-improvements-in-playbook-runtime) than `just setup-all`) when its components remain unchanged. If you adjust your `vars.yml` to remove other components, you'd need to run `just setup-all`, or these components will still remain installed. Note these shortcuts run the `ensure-matrix-users-created` tag too.
254-
255-
## Usage
256-
257-
To use the bot, invite it to any existing Matrix room (`/invite @bot.go-neb:example.com` where `example.com` is your base domain, not the `matrix.` domain). Make sure you are granted with the sufficient permission if you are not the room owner.
258-
259-
Basic usage is like this: `!echo hi` or `!imgur puppies` or `!giphy matrix`
260-
261-
If you enabled the github_cmd service, send `!github help` to the bot in the room to see the available commands.
262-
263-
You can also refer to the upstream [Documentation](https://github.com/matrix-org/go-neb).
264-
265-
## Troubleshooting
266-
267-
As with all other services, you can find the logs in [systemd-journald](https://www.freedesktop.org/software/systemd/man/systemd-journald.service.html) by logging in to the server with SSH and running `journalctl -fu matrix-bot-go-neb`.

group_vars/matrix_servers

Lines changed: 0 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -277,8 +277,6 @@ devture_systemd_service_manager_services_list_auto: |
277277
+
278278
([{'name': 'matrix-bot-baibot.service', 'priority': 2200, 'groups': ['matrix', 'bots', 'baibot', 'bot-baibot']}] if matrix_bot_baibot_enabled else [])
279279
+
280-
([{'name': 'matrix-bot-go-neb.service', 'priority': 2200, 'groups': ['matrix', 'bots', 'go-neb', 'bot-go-neb']}] if matrix_bot_go_neb_enabled else [])
281-
+
282280
([{'name': 'matrix-bot-honoroit.service', 'priority': 2200, 'groups': ['matrix', 'bots', 'honoroit', 'bot-honoroit']}] if matrix_bot_honoroit_enabled else [])
283281
+
284282
([{'name': 'matrix-bot-matrix-registration-bot.service', 'priority': 2200, 'groups': ['matrix', 'bots', 'registration-bot', 'bot-matrix-registration-bot']}] if matrix_bot_matrix_registration_bot_enabled else [])
@@ -2838,51 +2836,6 @@ matrix_bot_baibot_container_additional_networks_auto: |-
28382836
#
28392837
######################################################################
28402838

2841-
######################################################################
2842-
#
2843-
# matrix-bot-go-neb
2844-
#
2845-
######################################################################
2846-
2847-
# We don't enable bots by default.
2848-
matrix_bot_go_neb_enabled: false
2849-
2850-
matrix_bot_go_neb_scheme: "{{ 'https' if matrix_playbook_ssl_enabled else 'http' }}"
2851-
2852-
matrix_bot_go_neb_hostname: "{{ matrix_server_fqn_bot_go_neb }}"
2853-
2854-
matrix_bot_go_neb_systemd_required_services_list_auto: |
2855-
{{
2856-
matrix_addons_homeserver_systemd_services_list
2857-
}}
2858-
2859-
matrix_bot_go_neb_container_image_registry_prefix_upstream: "{{ matrix_container_global_registry_prefix_override if matrix_container_global_registry_prefix_override else matrix_bot_go_neb_container_image_registry_prefix_upstream_default }}"
2860-
2861-
matrix_bot_go_neb_container_http_host_bind_port: "{{ (matrix_playbook_service_host_bind_interface_prefix ~ '4050') if matrix_playbook_service_host_bind_interface_prefix else '' }}"
2862-
2863-
matrix_bot_go_neb_container_network: "{{ matrix_addons_container_network }}"
2864-
2865-
matrix_bot_go_neb_container_additional_networks: |
2866-
{{
2867-
(
2868-
([] if matrix_addons_homeserver_container_network == '' else [matrix_addons_homeserver_container_network])
2869-
+
2870-
([matrix_playbook_reverse_proxyable_services_additional_network] if matrix_playbook_reverse_proxyable_services_additional_network and matrix_bot_go_neb_container_labels_traefik_enabled else [])
2871-
) | unique
2872-
}}
2873-
2874-
matrix_bot_go_neb_container_labels_traefik_enabled: "{{ matrix_playbook_traefik_labels_enabled }}"
2875-
matrix_bot_go_neb_container_labels_traefik_docker_network: "{{ matrix_playbook_reverse_proxyable_services_additional_network }}"
2876-
matrix_bot_go_neb_container_labels_traefik_entrypoints: "{{ traefik_entrypoint_primary }}"
2877-
matrix_bot_go_neb_container_labels_traefik_tls_certResolver: "{{ traefik_certResolver_primary }}"
2878-
2879-
######################################################################
2880-
#
2881-
# /matrix-bot-go-neb
2882-
#
2883-
######################################################################
2884-
2885-
28862839
######################################################################
28872840
#
28882841
# matrix-bot-mjolnir

roles/custom/matrix-base/defaults/main.yml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -127,9 +127,6 @@ matrix_server_fqn_dimension: "dimension.{{ matrix_domain }}"
127127
# This is where you access the Etherpad (if enabled via etherpad_enabled; disabled by default).
128128
matrix_server_fqn_etherpad: "etherpad.{{ matrix_domain }}"
129129

130-
# For use with Go-NEB! (github callback url for example)
131-
matrix_server_fqn_bot_go_neb: "goneb.{{ matrix_domain }}"
132-
133130
# This is where you access Jitsi.
134131
matrix_server_fqn_jitsi: "jitsi.{{ matrix_domain }}"
135132

0 commit comments

Comments
 (0)