Slack on a self-hosted server
The repository includes selfhosted/slack-app-manifest.json with GitNotify's command, OAuth scopes, interactivity, and lifecycle event subscriptions.
Create the app
Section titled “Create the app”- Replace every
https://your.hostvalue in the manifest with yourPUBLIC_URL. - Open Your Apps and choose Create New App.
- Choose Paste a manifest (older layouts call it From a manifest), select the workspace used to create the app, and paste the JSON file.
- Review the settings and create the app. Slack may offer Create and Install, which also installs the app in that workspace. You still open
/slack/installafter setting the environment below, so GitNotify receives and stores the workspace's bot token.
The manifest creates one slash command, /gitnotify, with these request URLs:
| Use | URL |
|---|---|
| Slash command | https://gitnotify.example.com/slack/commands |
| Interactivity | https://gitnotify.example.com/slack/interactions |
| Events API | https://gitnotify.example.com/slack/events |
| OAuth redirect | https://gitnotify.example.com/slack/oauth |
It subscribes only to app_uninstalled and tokens_revoked. It does not subscribe to messages.
Scopes
Section titled “Scopes”The manifest requests these six bot scopes and no user scopes:
| Scope | Use |
|---|---|
chat:write |
Post and edit cards, notifications, and digests |
commands |
Handle /gitnotify |
im:write |
Open DMs for linked people |
groups:read |
Check private channels the app belongs to and confirm they remain private |
groups:write |
Create private channels, invite the administrator, and set their purpose |
users:read |
Check whether someone is a workspace administrator or owner |
Token rotation is off because the current OAuth storage expects one bot token until reinstall or revocation.
Set the environment
Section titled “Set the environment”Open the Slack app's Basic Information page and copy the Client ID, Client Secret, and Signing Secret:
SLACK_CLIENT_ID=replace-with-the-client-idSLACK_CLIENT_SECRET=replace-with-the-client-secretSLACK_SIGNING_SECRET=replace-with-the-signing-secretSlack also needs PUBLIC_URL and GITNOTIFY_MASTER_KEY. GitNotify encrypts each installed workspace's bot token before storing it in SQLite.
Apply the change with docker compose -f selfhosted/docker-compose.yml up -d gitnotify.
Open Event Subscriptions in the Slack app settings and choose Retry beside the request URL until Slack shows it as verified. Then open:
https://gitnotify.example.com/slack/installChoose a workspace and approve the six scopes. The install route accepts one workspace at a time and refuses an Enterprise Grid organisation-wide install. An app that is not distributed can only be installed in the workspace where it was created. To install it elsewhere, open Manage Distribution and activate public distribution first.
In Slack, run /gitnotify connect, choose repositories, and then run /gitnotify setup. Team members can run /gitnotify link for personal notifications and digests. The commands and setup steps are the same as on the hosted GitNotify: see Slack.