A dockerized Mattermost instance that can be embedded in a LTI platform, such as Moodle.
If you are thinking of deploying this yourself, maybe just contact me first 😅
- Head to your course and
Add an activity or resource
- Choose
External tool
- Set the name of your activity (e.g.,
Mattermost
) - Press the + icon next to
Preconfigured tool
, to configure the external tool - Configure the tool as follows:
- Tool name:
Mattermost
- Tool URL:
https://mattermost-lti.example.com/app
- LTI version:
LTI 1.3
- Initiate login URL:
https://mattermost-lti.example.com/login
- Redirection URI(s):
https://mattermost-lti.example.com/app
- Privacy -> Share launcher's name with tool:
Always
- Privacy -> Share launcher's email with tool:
Always
- Privacy -> Accept grades from the tool:
Never
- Privacy -> [x] Force SSL
Save changes
- Press the cogs icon next to
Preconfigured tool
, to retrieve the Client ID of your external tool Cancel
the external tool configuration dialog andsave and display
your activity- Retrieve the activity ID from the navigation bar of your browser (e.g.,
https://moodle.example.com/mod/lti/view.php?id=ACTIVITY_ID&forceview=1
)
- Adjust the
PLATFORMS
variable in.env
to match your tool's Client ID and your activity ID:PLATFORMS=ACTIVITY_ID|CLIENT_ID
(multiple activities can be separated by colons) - Adjust
OAUTH_ID
andOAUTH_TOKEN
in.env
andvolumes/app/mattermost/config/config.json
(values must match) - Create mandatory directories for Mattermost
mkdir -p ./volumes/app/mattermost/{data,logs,config} cp mattermost-config.json volumes/app/mattermost/config/config.json chown -R 2000:2000 ./volumes/app/mattermost/
- Start docker-compose stack
docker-compose up -d
- Create a Mattermost system administrator and generate access token
docker exec -e USER=root -e [email protected] -e PASS=CHANGEME mattermost-lti_app_1 /create-access-token.sh
- Set
MATTERMOST_TOKEN
in.env
to the token created in the last step 1 Completely restart the docker-compose stackdocker-compose down docker-compose up -d
- Retrieve LTI public key
docker logs mattermost-lti_mattermost-lti_1
- Head back to your activity and press the cogs icon to open the external tool configuration dialog
- Add the public key of the LTI bridge
- Optionally set a proper tool icon, by clicking "Show more..." and setting both Icon URL and Secure icon URL to
https://mattermost-lti.example.com/static/images/favicon/apple-touch-icon-60x60.png
Save changes
Save and display