Setting up Maubot: Difference between revisions

From Irregularpedia
Jump to navigation Jump to search
Initial
 
→‎Maubot Access Token with SSO: added variables for easier use and added password option for the bot account
 
(2 intermediate revisions by one other user not shown)
Line 1: Line 1:
<span id="maubot-documentation"></span>
== Maubot in the Community ==
 
Using the following Plugins:
* https://github.com/gitayam/matrix-to-discourse
* https://github.com/ggogel/SocialMediaDownloadMaubot
* https://github.com/maubot/reminder
* https://github.com/maubot/reactbot
 
Some of these plugins have been modified from the source to fit the community's needs.
 
 
== Maubot Documentation ==
== Maubot Documentation ==


Used for Moderations GitHub Repo Context [https://github.com/spantaleev/matrix-docker-ansible-deploy/blob/master/docs/configuring-playbook-bot-maubot.md here] [https://docs.mau.fi/maubot/usage/basic.html Project Documentation]
Maubot is used for moderation and management tasks within Matrix environments. Below are useful resources and steps for setting up and managing Maubot.


Plugins Available [https://plugins.mau.bot Here]
'''GitHub Repository and Project Documentation''' 
* [https://github.com/spantaleev/matrix-docker-ansible-deploy/blob/master/docs/configuring-playbook-bot-maubot.md Maubot Configuration Documentation on GitHub] 
* [https://docs.mau.fi/maubot/usage/basic.html Official Maubot Project Documentation]


Admin Dashboard: matrix.irregularchat.com/_matrix/maubot/
'''Plugins Available''' 
* Find available plugins [https://plugins.mau.bot here].


<span id="muabot-access-token-with-sso"></span>
'''Admin Dashboard''' 
== Muabot access token with SSO ==
* The Maubot admin dashboard can be accessed at: [https://matrix.irregularchat.com/_matrix/maubot/ matrix.irregularchat.com/_matrix/maubot/].


https://docs.mau.fi/maubot/usage/cli/auth.html
== Maubot Access Token with SSO ==


<syntaxhighlight lang="shell">## Launch an interactive shell in the maubot container  
To obtain a Maubot access token using SSO, follow these steps: 
Reference: [https://docs.mau.fi/maubot/usage/cli/auth.html Maubot Authentication Documentation]
 
<pre>
#Launch an interactive shell in the Maubot container
sudo docker exec -it matrix-bot-maubot /bin/sh
sudo docker exec -it matrix-bot-maubot /bin/sh
</pre>
<pre>
HOMESERVER_URL="https://matrix.irregularchat.com"
USERNAME="maubotuser"
#You must login before authenticating. This is logging in to the maubot portal
mbc login -u "$USERNAME" -s "$HOMESERVER_URL" -a homeserver -p passwordHERE
</pre>
<pre>
# now while authenticated, login to the user account
# If you have an SSO for the user
DOMAIN="https://matrix.irregularchat.com"
HOMESERVER_URL="https://matrix.irregularchat.com"
USERNAME="bot.user"
mbc login -u $USERNAME -s $HOMESERVER_URL -a $DOMAIN -p "passwordHERE"
</pre>
<pre>
# now while authenticated, login to the user account
# If you have an SSO for the user
DOMAIN="https://matrix.irregularchat.com"
HOMESERVER_URL="https://matrix.irregularchat.com"
USERNAME="bot.user"
mbc auth -s "$HOMESERVER_URL" -h "$DOMAIN" -o --update-client -u "$USERNAME"
</pre>


== You must login before auth ==
The output should look like this: 
mbc login -u sac -s "https://matrix.irregularchat.com" -a homeserver -p passwordHERE
<code>Opening http://matrix-nginx-proxy:12080/_matrix/client/v3/login/sso/redirect?redirectUrl=https://matrix.irregularchat.com/_matrix/maubot/v1/client/auth_external_sso/complete/randomhere</code>


1. Open a browser and replace <code>http://matrix-nginx-proxy:12080</code> with <code>https://matrix.irregularchat.com</code>.
2. Log in using Single Sign-On (SSO).


mbc auth -s https://matrix.irregularchat.com -h irregularchat.com -o --update-client -u bot.sac</syntaxhighlight>
== Packaging the Plugin ==
Output should be something like: <code>Opening http://matrix-nginx-proxy:12080/_matrix/client/v3/login/sso/redirect?redirectUrl=https://matrix.irregularchat.com/_matrix/maubot/v1/client/auth_external_sso/complete/oaoaoa8298</code>
To package a plugin for Maubot, use the following command:


Open a browser and replace <code>http://matrix-nginx-proxy:12080</code> with <code>https://matrix.irregularchat.com</code> and login with SSO
<pre>
# Inside the cloned git directory
zip -9r plugin-name.mbp *
</pre>


<syntaxhighlight lang="shell"># inside of the git cloned directory
[[Category:Matrix]]
zip -9r plugin-name.mbp *</syntaxhighlight>
[[Category:Maubot]]
[[Category:Bot Management]]
[[Category:Server Guides]]
[[Category:Guides]]

Latest revision as of 13:49, 23 January 2025

Maubot in the Community

Using the following Plugins:

Some of these plugins have been modified from the source to fit the community's needs.


Maubot Documentation

Maubot is used for moderation and management tasks within Matrix environments. Below are useful resources and steps for setting up and managing Maubot.

GitHub Repository and Project Documentation

Plugins Available

  • Find available plugins here.

Admin Dashboard

Maubot Access Token with SSO

To obtain a Maubot access token using SSO, follow these steps: Reference: Maubot Authentication Documentation

#Launch an interactive shell in the Maubot container
sudo docker exec -it matrix-bot-maubot /bin/sh
HOMESERVER_URL="https://matrix.irregularchat.com"
USERNAME="maubotuser"
#You must login before authenticating. This is logging in to the maubot portal
mbc login -u "$USERNAME" -s "$HOMESERVER_URL" -a homeserver -p passwordHERE


# now while authenticated, login to the user account
# If you have an SSO for the user
DOMAIN="https://matrix.irregularchat.com"
HOMESERVER_URL="https://matrix.irregularchat.com"
USERNAME="bot.user"
mbc login -u $USERNAME -s $HOMESERVER_URL -a $DOMAIN -p "passwordHERE"


# now while authenticated, login to the user account
# If you have an SSO for the user
DOMAIN="https://matrix.irregularchat.com"
HOMESERVER_URL="https://matrix.irregularchat.com"
USERNAME="bot.user"
mbc auth -s "$HOMESERVER_URL" -h "$DOMAIN" -o --update-client -u "$USERNAME"

The output should look like this: Opening http://matrix-nginx-proxy:12080/_matrix/client/v3/login/sso/redirect?redirectUrl=https://matrix.irregularchat.com/_matrix/maubot/v1/client/auth_external_sso/complete/randomhere

1. Open a browser and replace http://matrix-nginx-proxy:12080 with https://matrix.irregularchat.com. 2. Log in using Single Sign-On (SSO).

Packaging the Plugin

To package a plugin for Maubot, use the following command:

# Inside the cloned git directory
zip -9r plugin-name.mbp *