Skip to content

Config file

Marie edited this page Mar 4, 2022 · 6 revisions

The config file is the place where you can put all your login information for matrix and gotify.

Here you can see how the config.yaml files should look like:

gotify:
  url: "https://gotify.myurl.com"
  apiToken: "A gotify client API token"
  (pollTime: "*/10 * * * * *" deprecated since version 2.0.0)
matrix:
  homeserverURL: "https://matrix.myurl.com"
  matrixDomain: "matrix.myurl.com"
  username: "bot"
  token: "A matrix API token for the given username"
  roomID: " !jThZPNLCkwnhJzBtOY:matrix.myurl.com"
  encrypted: true
debug: false

General information

All values within the config (except booleans) should be strings (surrounded by quotation marks). For booleans just write true or false

gotify.url

This URL should point to your gotify server. This should be without a scheme (without https etc.)

gotify.apiToken

Generate an API token in the web interface of gotify. Make sure it is a client token.

gotify.pollTime

**This option is no longer needed since we use WebSockets instead of polling since version 2.0.0

matrix.homeserverURL

Put the URL to your homeserver here. (The bot account must be a member of this server)

matrix.matrixDomain

This parameter is for those users who have a different "matrix domain" (@username:matrixDomain) than their homeserver domain.

HINT: Just paste the domain here, without any protocol before it (no https://)
HINT: If your homeserver and your matrix domain are the same, you can (if you wish) delete this parameter from your config. It is not necessary

matrix.username

Put the username of an already existing matrix account here. The gotify matrix bot will not create a new user for you.

matrix.token

Here you can put a auth token for your matrix user. You can get one by using the following command:

curl -XPOST -d '{"type":"m.login.password", "user":"bot", "password":"mySecretPassword123"}' "https://matrix.myurl.com/_matrix/client/r0/login"

If your login credentials are correct you will get a JSON response. Your access token can be found under the access_token attribute.

matrix.roomID

Here you can put your unique identifier for the matrix room where the bot should send the messages. There are other ways to get this ID, but I recommend using the WebClient element. You can go to your room, go into the settings, click at advanced. You can find your room ID in the Room information category.

HINT: make sure the bot account is a member of this room

matrix.encrypted

This boolean determines if the bot will send messages with end to end encryption or not.

I would recommend you to set this to true.

debug

If this boolean is set, the bot will print more logs into the console.

HINT: you can view docker logs by typing docker logs [containername] -f

Clone this wiki locally