|
| 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