# Configuration

> Environment variables for Slack, iCal feeds, and application settings

## Environment Variables

All configuration lives in the `.env.local` file. The Docker setup provides sensible defaults — you only need to add variables for optional integrations.

### Slack Integration

These variables enable the [Slack integration](/docs/slack-integration) for leave request approvals, weekly digests, and personal notifications.

| Variable | Description |
|---|---|
| `SLACK_DSN` | Slack bot token in DSN format: `slack://TOKEN@default?channel=CHANNEL`. Replace `TOKEN` with your `xoxb-` bot token. |
| `SLACK_SIGNING_SECRET` | Found under **Basic Information → App Credentials → Signing Secret** in your Slack App settings. Used to verify incoming requests from Slack. |
| `SLACK_AR_APPROVE_CHANNEL_ID` | Channel ID for leave request approval messages (with Approve / Reject buttons). Right-click the channel in Slack → **View channel details** → copy the Channel ID. |
| `SLACK_AR_HR_DIGEST_CHANNEL_ID` | Channel ID for the weekly digest (who's out, birthdays, anniversaries). Same steps as above. |

> **Tip:** Channel IDs look like `C04ABCD1234`. Don't use the channel name — it won't work.

### iCal Feeds

This variable enables the [iCal feed](/docs/ical-feeds) feature, allowing users to subscribe to their approved leave requests from any calendar app.

| Variable | Description |
|---|---|
| `ICAL_SECRET` | A random string used to generate secure, per-user feed URLs. Generate one with `openssl rand -hex 32`. |

> **Warning:** Changing `ICAL_SECRET` invalidates all existing feed URLs. Every user will need to re-copy their URL and update their calendar subscriptions.

