mirror of https://github.com/mautrix/docs.git
1.7 KiB
1.7 KiB
Standalone mode
The normal mode in maubot is very dynamic: the config file doesn't really contain any runtime details other than a general web server, database, etc. Everything else is set up at runtime using the web management interface or the management API directly. This dynamicness is very useful for developing bots and works fine for deploying it on personal servers, but it's not optimal for larger production deployments.
The solution is standalone mode: a separate entrypoint that runs a single maubot plugin with a predefined Matrix account.
Basic usage
- Set up a virtual environment.
- Create with
virtualenv -p /usr/bin/python3 .venv
- Activate with
source .venv/bin/activate
- Create with
- Install maubot into the virtualenv with
pip install --upgrade maubot[all]
[all]
at the end will install all optional dependencies! The e2ee optional dependency requires libolm3 to be installed natively.- Alternatively install the latest git version with
pip install --upgrade git+https://github.com/maubot/maubot.git#egg=maubot[all]
- Extract the plugin you want to run into the directory
(at least
maubot.yaml
and some Python modules should be there). - Install any dependencies that the plugin has into the virtualenv manually
(they should be listed in
maubot.yaml
). - Copy the standalone example config to the same directory and fill it out.
- If the plugin has a config, you should copy the contents from the plugin's
base-config.yaml
into theplugin_config
object in the standalone config, then fill it out as needed.
- If the plugin has a config, you should copy the contents from the plugin's
- Run the bot with
python -m maubot.standalone