# Configuration

> Every TasksPipes environment variable, for Outline, e-mail, accounts and company sign-in, and which settings an administrator can manage in the app.

Source: https://doc.taskspipes.com/self-hosting/configuration

TasksPipes is configured with environment variables, in `.env`.

The e-mail, Outline and sign-in settings can also be managed in the app by an administrator (*Administration ›
Settings*). A variable set here (and not empty) wins and shows locked there; leave it out to manage the setting in the
app. Those are `SMTP_*`, `MAIL_FROM`, `OUTLINE_*`, `ALLOW_API_KEY_LOGIN`, `ALLOW_EMAIL_SIGNUP`,
`ALLOW_EMAIL_INVITATIONS`, `EMAIL_DOMAINS`, `OIDC_*`, `MCP_ENABLED` and `AI_*`.

## Essentials

| Variable | Purpose |
| --- | --- |
| `APP_URL` | Public URL of TasksPipes (OAuth callbacks, links in e-mails and calendars). |
| `APP_SECRET` | At least 32 characters. Encrypts tokens, secrets and settings in the database. |
| `POSTGRES_PASSWORD` | Password of the bundled database (`DATABASE_URL` with a database of your own, whose account may create the `pgcrypto` and `unaccent` extensions). |
| `APP_PORT`, `APP_BIND` | Port published on the host (3000) and its address (`127.0.0.1`). |
| `ADMIN_EMAILS` | Administrators of the instance, comma-separated addresses. |

## Outline

| Variable | Purpose |
| --- | --- |
| `OUTLINE_ENABLED` | `false` turns Outline off: no sign-in with Outline, no Outline documents. |
| `OUTLINE_URL` | Outline server known to the instance, needed for OAuth sign-in. |
| `OUTLINE_API_URL` | Internal URL the server uses to reach Outline (e.g. `http://outline:3000`). |
| `OUTLINE_OAUTH_CLIENT_ID`, `OUTLINE_OAUTH_CLIENT_SECRET` | OAuth sign-in (see [Sign-in](https://doc.taskspipes.com/self-hosting/sign-in)). |
| `ALLOW_API_KEY_LOGIN` | `true` (default) lets people sign in with a personal Outline API key. |
| `OUTLINE_TEAM_ID` | Only accept accounts of one workspace of `OUTLINE_URL`. |
| `OUTLINE_ALLOWED_HOSTS` | Outline servers people may type (`*.example.com` allowed); empty: any public https server. |
| `OUTLINE_ALLOW_PRIVATE` | `true` also accepts servers over http or on internal addresses. |

## E-mail and accounts without Outline

| Variable | Purpose |
| --- | --- |
| `SMTP_HOST`, `SMTP_PORT`, `SMTP_SECURE`, `SMTP_USER`, `SMTP_PASS` | The SMTP server (587 with STARTTLS, or 465 with `SMTP_SECURE=true`). |
| `MAIL_FROM` | Sender, e.g. `TasksPipes <tasks@example.com>`. |
| `ALLOW_EMAIL_SIGNUP` | `true` (default) lets anyone create an account with an e-mail address (needs SMTP). |
| `ALLOW_EMAIL_INVITATIONS` | `true` (default) lets people invite others by e-mail. |
| `EMAIL_DOMAINS` | E-mail domains allowed to sign up or be invited, comma-separated (all by default). |

## Company sign-in (OpenID Connect)

| Variable | Purpose |
| --- | --- |
| `OIDC_ISSUER`, `OIDC_CLIENT_ID`, `OIDC_CLIENT_SECRET` | The provider and the confidential client registered there, with the redirect URI `APP_URL/auth/oidc/callback`. |
| `OIDC_NAME` | Label of the button (*Continue with …*). |
| `OIDC_SCOPES` | Scopes asked; `openid email profile` by default. |
| `OIDC_ALLOWED_DOMAINS` | E-mail domains allowed to sign in this way. |
| `OIDC_ENABLED` | `false` turns it off while keeping its settings. |

## Everything else

| Variable | Purpose |
| --- | --- |
| `REDIS_URL` | Redis holding the rate limit counters (the bundled one by default). |
| `TIMEZONE`, `REPORT_HOUR` | Time zone and hour (18 by default) of the reports. |
| `DEFAULT_LOCALE` | Language when neither the profile nor the browser gives one (`en`, `fr`, `es`…). |
| `VAPID_PUBLIC_KEY`, `VAPID_PRIVATE_KEY`, `VAPID_SUBJECT` | Push notification keys; derived from `APP_SECRET` by default. |
| `WEBHOOK_ALLOW_PRIVATE` | `true` lets webhooks reach http and internal addresses. |
| `SESSION_DAYS` | Session length, 30 days by default. |
| `LOG_LEVEL` | `info` by default. |
| `MCP_ENABLED` | `true` lets people connect [AI agents](https://doc.taskspipes.com/integrations/ai-agents) over MCP (`/mcp`). Off by default. |
| `AI_PROVIDER`, `AI_URL`, `AI_API`, `AI_API_KEY`, `AI_MODEL`, `AI_EFFORT`, `AI_ALLOW_PRIVATE` | The built-in AI assistant: provider (`anthropic`, `openai`, `mistral`, `openrouter`, `ollama` or `other`), address up to the version (`https://…/v1`), API of an `other` server (`openai` or `anthropic`), key, model, effort (`low`, `medium`, `high`), and `true` to allow an internal address. Optional; also in *Administration › Settings › AI assistant*. |
| `HOST` | Address the server listens on: `0.0.0.0` by default; `127.0.0.1` when it runs without Docker behind a proxy on the same machine. |
| `REALTIME_SHARED` | `false` turns off sharing live updates between [several instances](https://doc.taskspipes.com/self-hosting/operations#several-instances) through PostgreSQL. On by default, harmless with one instance. |
| `LISTEN_DATABASE_URL` | Connection used to listen to the other instances, when `DATABASE_URL` goes through PgBouncer in transaction mode. |
