mirror of https://github.com/mautrix/docs.git
2.1 KiB
2.1 KiB
Setup
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
virtualenv -p /usr/bin/python3 .
(note the dot at the end)- You should not use a subdirectory for the virtualenv in this production setup. The pip install step places some required files at the root of the environment.
- Activate with
source ./bin/activate
- Create with
- Install with
pip install --upgrade maubot
- Copy
example-config.yaml
toconfig.yaml
and update to your liking. - Create the log directory and all directories used in
plugin_directories
(usuallymkdir plugins trash logs
). - Start with
python3 -m maubot
. - 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
virtualenv -p /usr/bin/python3 .venv
- Activate with
source .venv/bin/activate
- Create with
- Install with
pip install --editable .
(note the dot at the end) - 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. Note that the example config
to copy will be inside the
maubot
directory, not in the repo root.
Upgrading
- Pull changes from Git.
- Update dependencies with
pip install --upgrade -r requirements.txt
. - Restart maubot.