Skip to content

Commit 0de7aa4

Browse files
committed
Add initial standalone mode docs
1 parent 942f72c commit 0de7aa4

File tree

2 files changed

+34
-0
lines changed

2 files changed

+34
-0
lines changed

maubot/SUMMARY.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
- [mbc auth](./usage/cli/auth.md)
1212
- [mbc build](./usage/cli/build.md)
1313
- [Management API](./management-api.md)
14+
- [Standalone mode](./usage/standalone.md)
1415

1516
# Plugin development
1617
- [Getting started](./dev/getting-started.md)

maubot/usage/standalone.md

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
# Standalone mode
2+
3+
The normal mode in maubot is very dynamic: the config file doesn't really
4+
contain any runtime details other than a general web server, database, etc.
5+
Everything else is set up at runtime using the web management interface or
6+
the [management API](../management-api.md) directly. This dynamicness is very
7+
useful for developing bots and works fine for deploying it on personal servers,
8+
but it's not optimal for larger production deployments.
9+
10+
The solution is standalone mode: a separate entrypoint that runs a single maubot
11+
plugin with a predefined Matrix account.
12+
13+
## Basic usage
14+
15+
0. Set up a virtual environment.
16+
1. Create with `virtualenv -p /usr/bin/python3 .venv`
17+
2. Activate with `source .venv/bin/activate`
18+
1. Install maubot into the virtualenv with `pip install --upgrade maubot[all]`
19+
* `[all]` at the end will install all optional dependencies!
20+
The e2ee optional dependency requires libolm3 to be installed natively.
21+
* Alternatively install the latest git version with
22+
`pip install --upgrade git+https://github.com/maubot/maubot.git#egg=maubot[all]`
23+
2. Extract the plugin you want to run into the directory
24+
(at least `maubot.yaml` and some Python modules should be there).
25+
3. Install any dependencies that the plugin has into the virtualenv manually
26+
(they should be listed in `maubot.yaml`).
27+
4. Copy the [standalone example config] to the same directory and fill it out.
28+
* If the plugin has a config, you should copy the contents from the plugin's
29+
`base-config.yaml` into the `plugin_config` object in the standalone config,
30+
then fill it out as needed.
31+
5. Run the bot with `python -m maubot.standalone`
32+
33+
[standalone example config]: https://github.com/maubot/maubot/blob/master/maubot/standalone/example-config.yaml

0 commit comments

Comments
 (0)