mirror of https://github.com/maubot/maubot.git
Page:
Setup
16
Setup
Tulir Asokan edited this page 2020-12-22 19:18:59 +02:00
Table of Contents
Requirements
Production setup
- Create a directory (
mkdir maubot
) and enter it (cd maubot
). Do not clone the repository. If you want to use a specific version from git rather than PyPI, use the development setup instructions. - Set up a virtual environment.
- Create with
/usr/bin/python3 -m venv .
(N.B. do not use a subdirectory for the virtualenv in the production setup) - Activate with
source ./bin/activate
- Create with
- Install with
pip install --upgrade maubot
- Copy
example-config.yaml
toconfig.yaml
and update to your liking.
N.B. If you created a virtualenv in a different directory than.
(e.g. in.venv
), you must manually copyexample-config.yaml
from the virtualenv directory to the directory you're running maubot in (or provide the path to the example config when starting maubot). Maubot will not function without access to the example config, as it is used for keeping your config file up to date. - Create the log directory and all directories used in
plugin_directories
(usuallymkdir plugins trash logs
) - Start with
python3 -m maubot
. - Create the database with
alembic upgrade head
. If you have a custom config path, usealembic -x config=/path/to/config.yaml upgrade head
. - The management interface should now be available at
http://localhost:29316/_matrix/maubot
or whatever you configured.
Upgrading
- Run the install command again (step #3).
- Restart maubot.
Development setup
- Clone the repository.
- Optional, but strongly recommended: Set up a virtual environment.
- Create with
/usr/bin/python3 -m venv .venv
- Activate with
source .venv/bin/activate
- Create with
- Install dependencies with
pip install -r requirements.txt
pip install --editable .
- Build the frontend
cd maubot/management/frontend
- Install dependencies with
yarn
- Build with
yarn build
- Optional: Configure debug file open so that you can open files in your IDE by clicking on stack trace lines in the frontend log viewer
- Continue from step 4 of the production setup
Upgrading
- Pull changes from Git.
- Update dependencies with
pip install --upgrade -r requirements.txt
. - Restart maubot.
The maubot docs have been moved to docs.mau.fi