Repository navigation
Configuration
Glint is configured entirely through environment variables. It reads them once, at startup, and exits with an error if anything required is missing or invalid — so a bad setting shows up when you deploy, not on the first webhook.
| How you run Glint | Where to put the variables |
|---|---|
From source (npm start, npm run dev) |
webhook-receiver/.env — loaded automatically with dotenv
|
docker run |
--env-file <file> or -e NAME=value
|
| Docker Compose |
env_file: or environment: in docker-compose.yml — see Deployment
|
| systemd |
EnvironmentFile= in the unit |
Variables already set in the process environment take precedence over .env; Glint never overrides them. A .env file is not copied into the Docker image (it is excluded by .dockerignore), so in a container the values must be passed in at runtime.
At least one of WEBHOOK_SECRET or WEBHOOK_SIGNING_TOKEN must be set.
| Variable | Required | Default | Description |
|---|---|---|---|
GITLAB_BASE_URL |
Yes | — | Base URL of your GitLab instance, e.g. https://gitlab.example.com. No trailing slash; Glint appends /api/v4/…. |
GITLAB_TOKEN |
Yes | — | GitLab access token with api scope. Sent as the PRIVATE-TOKEN header. |
ANTHROPIC_API_KEY |
Yes | — | Anthropic API key used for every summary and release note. |
WEBHOOK_SECRET |
One of¹ | — | Legacy shared secret, compared with GitLab's X-Gitlab-Token header. |
WEBHOOK_SIGNING_TOKEN |
One of¹ | — | GitLab signing token (whsec_…, GitLab 19.0+). Enables HMAC-SHA256 verification with replay protection. |
ANTHROPIC_MODEL |
No | claude-sonnet-4-6 |
Claude model ID used for both features. |
GITLAB_CA_FILE |
No | — | Path to a PEM CA certificate or bundle to trust for GitLab, in addition to the public CAs. Checked at startup. |
GITLAB_REJECT_UNAUTHORIZED |
No | true |
Set to false to turn off TLS verification for GitLab. Last resort only. |
PORT |
No | 3000 |
Port the HTTP server listens on. |
¹ If both are set, only the signing token is checked; requests that carry only X-Gitlab-Token are rejected. Configure GitLab to match.
Glint uses the token to read MR details and diffs, read releases, compare tags, post MR comments and update release descriptions. It needs the api scope (there is no narrower scope that allows writing comments).
Because api is broad, limit where the token works rather than what it can do:
- Project or group access token — scoped to one project or group, and its comments appear under a bot identity. Requires the role to comment and edit releases (Developer or above).
- Dedicated bot user with a personal access token — add the user only to the projects you want reviewed.
- Avoid a personal token of an administrator or of your own account; anyone who obtains it gets everything you can access.
Comments are posted as whichever user owns the token.
| Mode | Set | GitLab field | Checks |
|---|---|---|---|
| Signing token (recommended) | WEBHOOK_SIGNING_TOKEN |
Signing token | HMAC-SHA256 over the message ID, timestamp and raw body (Standard Webhooks); rejects requests more than 5 minutes old |
| Legacy secret | WEBHOOK_SECRET |
Secret token | Constant-time comparison with X-Gitlab-Token
|
The signing token can be pasted with or without its whsec_ prefix. See GitLab Webhook Setup.
ANTHROPIC_MODEL accepts any Claude model ID your API key can use. Both features ask for at most 1,024 output tokens, so a faster, cheaper model is usually enough for summaries. Check Anthropic's models overview for current IDs; an ID your key can't use makes every request fail with an error in the log.
Leave GITLAB_REJECT_UNAUTHORIZED unset. If your GitLab certificate is signed by a private CA, set GITLAB_CA_FILE instead — see Private CA and TLS. Startup fails if the file can't be read or contains no -----BEGIN CERTIFICATE----- block.
In Docker, keep PORT at 3000: the image's health check and the Compose port mapping both expect the container to listen on 3000. Change the host side of the mapping instead (-p 8080:3000).
PORT=3000
GITLAB_BASE_URL=https://gitlab.example.com
GITLAB_TOKEN=glpat-xxxxxxxxxxxxxxxxxxxx
# Recommended on GitLab 19.0+
WEBHOOK_SIGNING_TOKEN=whsec_xxxxxxxxxxxxxxxxxxxx
# Older GitLab versions
# WEBHOOK_SECRET=your-webhook-secret
ANTHROPIC_API_KEY=sk-ant-xxxxxxxxxxxxxxxxxxxx
# ANTHROPIC_MODEL=claude-sonnet-4-6
# Private or self-signed CA for GitLab
# GITLAB_CA_FILE=/path/to/ca.crtThe repository ships the same template as webhook-receiver/.env.example.
| Message | Meaning |
|---|---|
Missing required environment variable: GITLAB_TOKEN |
A required variable is unset or empty. |
At least one of WEBHOOK_SECRET or WEBHOOK_SIGNING_TOKEN must be set |
No webhook authentication configured. |
GITLAB_CA_FILE: cannot read "/certs/ca.crt": ENOENT |
The CA file path is wrong, or the file isn't mounted into the container. |
GITLAB_CA_FILE: "/certs/ca.crt" does not contain a PEM certificate |
The file exists but isn't PEM (for example a DER .cer). Convert it with openssl x509 -inform der -in ca.cer -out ca.crt. |
Glint · MIT licence · Report an issue · Found a mistake in these docs? Open an issue and say which page.
Using Glint
Reference
Contributing
Help