Package: matrixctl
MatrixCtlMatrixCtl is a simple, but feature-rich tool to remotely control, manage,
provision and deploy your Matrix homeservers and users from your virtual
terminal.$matrixctlusage: matrixctl [-h] [--version] [-d] [-s SERVER] [-c CONFIG] Command ...MatrixCtl is a simple, but feature-rich tool to remotely control, manage, provision and deploy Matrix homeservers.optional arguments:-h, --help            show this help message and exit--version             show program's version number and exit-d, --debug           Enables debugging mode.-s SERVER, --server SERVERSelect the server. (default: "default")-c CONFIG, --config CONFIGA path to an alternative config file.Commands:The following are commands, you can use to accomplish various tasks.Commandadduser             Add users to the homeserveradduser-jitsi       Add users to a jitsi servercheck               Checks the deployment with Ansibledelete-local-media  Delete cached (local) media that was last accessed before aspecific point in timedelroom             Shutdown a roomdeluser             Deactivate usersdeluser-jitsi       Delete jitsi usersdeploy              Provision and deploy the Ansible playbookget-event           Get an event from the databaseget-event-context   Get the context of an eventget-events          Get events from the databaseis-admin            Check, if a user is a homeserver administratorjoinroom            Join a user to a roommaintenance         Run maintenance tasksmake-room-admin     Grant a user the highest power level available to a local userin this roompurge-history       Purge historic events from the databasepurge-remote-media  Purge cached, remote mediareport              Get a report event by report identifierreports             Lists reported eventsrooms               List roomsserver-notice       Send a server notice to a userset-admin           Change whether a user is a homeserver admin or notstart               Starts all OCI containersrestart             Restarts all OCI containers (alias for start)stop                Stop and disable all OCI containersupdate              Updates the ansible playbook repositoryupload              Upload a media file.user                Get information about a specific userusers               Lists all users of the homeserverversion             Get the version information of the Synapse instanceThank you for using MatrixCtl!Check out the docs: https://matrixctl.rtfd.ioReport bugs to: https://github.com/MichaelSasser/matrixctl/issues/new/chooseInstallationMatrixCtl is written in Python. The installation is straight forward. Just runpip install matrixctl. It will be installed from thePython Package Index (PyPi).Upgrade MatrixCtl withpip install --upgrade matrixctl.You will find more information in thedocumentation.DocumentationThedocumentationis
waiting for you, to check out.Configuration FileTo use this tool you need to have a configuration file in
"~/.config/matrixctl/config.yaml" or in "/etc/matrixctl/config.yaml".# Define your homeservers in "servers" here.servers:# Your default server. You can specify muliple servers here with arbitrary# Namesdefault:ansible:# The absolute path to your playbookplaybook:/path/to/ansible/playbooksynapse:# The absolute path to the synapse playbook.# This is only used for updating the playbook.playbook:/path/to/synapse/playbook# If your matrix server is deployed, you may want to fill out the API section.# It enables matrixctl to run more and faster commands. You can deploy and# provision your Server without this section. You also can cerate a user with# "matrixctl adduser --ansible YourUsername" and add your privileges after# that.api:# Your domain should be something like "michaelsasser.org" without the# "matrix." in the front. MatrixCtl will add that, if needed. An IP-Address# is not enough.domain:example.com# The username your admin userusername:johndoe# To use the API you need to have an administrator account. Enter your Token# here. If you use the element client you will find it your user settings# (click on your username on the upper left corner on your browser) in the# "Help & About" tab. If you scroll down click next to "Access-Token:" on# "<click to reveal>". It will be marked for you. Copy it in here.token= "MyMatrixToken"# In some cases, MatrixCtl does need to make many requests. To speed those# requests a notch, you can set a concurrent_limit which is greater than# one. This sets a limit to how many asynchronous workers can be spawned# by MatrixCtl. If you set the number to high, MatrixCtl needs more time# to spawn the workers, then a synchronous request would take.concurrent_limit:10# Here you can add your SSH configuration.ssh:address:"matrix.{{servers.default.api.domain}}"# With Jinja2 support# The default port is 22. Can be omitted. Jinja2: "{{ default_ssh_port }}"port:22# The default username is your current login name.user:john# Define your maintainance tasksmaintenance:tasks:-compress-state# Compress synapses state table-vacuum# VACUUM the synapse database (garbage-collection)# Another server.foo:# ...server:# This is a reserved name, which cannot be used.Predefined Jinja2 placeholders (all placeholders can be overwritten):"{{ home }}"-- The current users home path e.g./home/michael,"{{ user }}"-- The current users username e.g.michael,"{{ default_ssh_port }}"-- The default ssh port22,"{{ default_api_concurrent_limit }}"-- The default concurrent limit4.Check out thedocumentationfor more information.Discussions & ChatIf you have any thoughts or questions, you can ask them in thediscusionsor in
the projects matrix room#matrixctl:matrix.org.Semantic Versioning and Branching ModelThis Python package usesSemVerfor its release
cycle and thegit-flowbranching model (byVincent Driessen).It has two branches with infinite lifetime. The:developbranch is the merging branch,masterbranch gets updated on every release.ContributingPlease check ourContributer Documentation.LicenseCopyright © 2020-2001 Michael SasserInfo@MichaelSasser.org.
Released under the GPLv3 license.