Gotify
Sign in to the Gotify notification server with Pocket ID.
Requirements
Section titled “Requirements”- Gotify Server version
3.0or higher
Create the client in Pocket ID
Section titled “Create the client in Pocket ID”- In Pocket ID, open Administration → OIDC Clients and click Add OIDC Client.
- Enter a name such as
Gotifyand add the callback URLs:https://gotify.example.com/auth/oidc/callbackgotify://oidc/callback - Click Create and copy the Client ID and the Client secret. The client secret is only shown once.
- On the client’s General tab, turn on PKCE, then click Save.
- On the client’s Access tab, select the groups that may sign in under Allowed User Groups, or choose All Users.
The gotify://oidc/callback URL is only needed for the Android app.
Configure Gotify
Section titled “Configure Gotify”OIDC for Gotify is configured with environment variables. There is no GUI for managing it. Depending on the installation method, these variables need to be passed in different ways. However, the same variables are used in every case, and they are all referenced in Gotify’s docs.
For Docker deployments, use Docker environment variables.
Set the following variables, replacing gotify.example.com and id.example.com with your own domains:
GOTIFY_OIDC_ENABLED=trueGOTIFY_OIDC_ISSUER=https://id.example.comGOTIFY_OIDC_CLIENTID=<client-id>GOTIFY_OIDC_CLIENTSECRET=<client-secret>GOTIFY_OIDC_REDIRECTURL=https://gotify.example.com/auth/oidc/callbackGOTIFY_OIDC_AUTOREGISTER=trueGOTIFY_OIDC_USERNAMECLAIM=preferred_usernameGOTIFY_OIDC_LINK_BY_USERNAME=falseGOTIFY_OIDC_SCOPES=openid,profile,emailWhere:
GOTIFY_OIDC_CLIENTID: the Client ID from Pocket ID.GOTIFY_OIDC_CLIENTSECRET: the Client secret from Pocket ID.GOTIFY_OIDC_AUTOREGISTER: can be set tofalseto disable auto-provisioning.GOTIFY_OIDC_LINK_BY_USERNAME: can be set totrueif you want your Pocket ID user to be mapped to an already existing internal Gotify user with the same username.
Docker Compose example
Section titled “Docker Compose example”services: gotify: container_name: gotify restart: unless-stopped image: gotify/server ports: - 8080:80 volumes: - gotify-data:/app/data environment: - GOTIFY_OIDC_ENABLED=true - GOTIFY_OIDC_ISSUER=https://id.example.com - GOTIFY_OIDC_CLIENTID=<client-id> - GOTIFY_OIDC_CLIENTSECRET=<client-secret> - GOTIFY_OIDC_REDIRECTURL=https://gotify.example.com/auth/oidc/callback - GOTIFY_OIDC_AUTOREGISTER=true - GOTIFY_OIDC_USERNAMECLAIM=preferred_username - GOTIFY_OIDC_LINK_BY_USERNAME=false - GOTIFY_OIDC_SCOPES=openid,profile,emailDocker run example
Section titled “Docker run example”docker run -d --name gotify --restart unless-stopped \ -p 8080:80 \ -v gotify-data:/app/data \ -e GOTIFY_OIDC_ENABLED=true \ -e GOTIFY_OIDC_ISSUER=https://id.example.com \ -e GOTIFY_OIDC_CLIENTID=<client-id> \ -e GOTIFY_OIDC_CLIENTSECRET=<client-secret> \ -e GOTIFY_OIDC_REDIRECTURL=https://gotify.example.com/auth/oidc/callback \ -e GOTIFY_OIDC_AUTOREGISTER=true \ -e GOTIFY_OIDC_USERNAMECLAIM=preferred_username \ -e GOTIFY_OIDC_LINK_BY_USERNAME=false \ -e GOTIFY_OIDC_SCOPES="openid,profile,email" \ gotify/server