Configuration (.env)
Every .env setting explained, with defaults.
Clipr is configured through the file .env in the project folder. The easiest way to change it is the settings menu:
scripts/cliprctl config # menu
scripts/cliprctl config set CLIPR_IMAP_INTERVAL 15
scripts/cliprctl deploy # apply changes
The template .env.example lists every variable with a short explanation. If a variable is missing from .env, the default applies. .env contains credentials: mode 600, never in the repository, do not share.
Who gets which values? The app container receives the whole .env. Caddy, the wiki and the IMAP relay only get the values their compose file names explicitly – in particular never CLIPR_SECRET_KEY or passwords.
Address and TLS
| Variable | Default | Meaning |
|---|---|---|
CLIPR_DOMAIN |
– (required) | Hostname Clipr is reached at, e.g. clipr.example.com or nas.home.arpa. |
CLIPR_TLS |
internal |
internal = own certificate authority (home network). An email address = certificate from Let's Encrypt (public domain, ports 80/443 reachable from the internet). |
CLIPR_HTTP_PORT |
80 |
Host port for HTTP (redirects to HTTPS). |
CLIPR_HTTPS_PORT |
443 |
Host port for HTTPS. Also used by the wiki. |
CLIPR_PUBLIC_URL |
https://<CLIPR_DOMAIN> |
Public address for links in emails, passkeys and wiki sign-in. Must be set when using a different port, e.g. https://nas.home.arpa:8443. |
Security
| Variable | Default | Meaning |
|---|---|---|
CLIPR_SECRET_KEY |
– | At least 32 characters (openssl rand -base64 48). Encrypts the system database, the exchange store, IMAP passwords, all stores without a vault and the private SSO key. Never change it, back it up separately. If left empty, the app creates one on first start and stores it in /data/.secret_key – then back up that file separately. |
CLIPR_ADMIN_USER |
– | First account (email address or username), created on the very first start. |
CLIPR_ADMIN_PASSWORD |
– | Initial password for that account. Remove it after the first sign-in. |
CLIPR_SESSION_DAYS |
30 |
Sign out after this many days without use. |
CLIPR_SESSION_MAX_DAYS |
90 |
Sign out at the latest this many days after signing in. |
CLIPR_2FA_REQUIRED |
admins |
Two-factor sign-in: none = optional, admins = required for administration (and for wiki sign-in), all = required for everyone. |
Docker secrets instead of .env
With the overlay docker-compose.secrets.yml Clipr reads the key and the initial password from files:
| Variable | Meaning |
|---|---|
CLIPR_SECRET_KEY_FILE |
Path inside the container to the key file (set by the overlay: /run/secrets/clipr_secret_key). |
CLIPR_ADMIN_PASSWORD_FILE |
Path to the file with the initial password (/run/secrets/clipr_admin_password). The file must exist but may be empty. |
In general: if a variable is empty and <NAME>_FILE is set, Clipr reads the value from that file. cliprctl setup creates the files under secrets/ when needed.
Multi-user operation
| Variable | Default | Meaning |
|---|---|---|
CLIPR_REGISTRATION |
closed |
open = anyone with email confirmation, invite = only with a group invitation link, closed = only admins create accounts. Stays closed without outgoing email. |
CLIPR_REGISTRATION_DOMAINS |
– | Only these email domains may register, comma-separated, e.g. example.org,example.com. |
CLIPR_GROUP_MAX_MEMBERS |
6 |
Maximum members per group. |
CLIPR_GROUP_MAX_OWNED |
3 |
Maximum groups an account can found. |
CLIPR_GROUP_INVITE_DAYS |
7 |
Group invitations expire after this many days (1–60). |
CLIPR_SHARE_OFFER_DAYS |
30 |
Ticket offers expire after this many days without a reply. |
CLIPR_USER_QUOTA_MB |
1024 |
Storage per account in MB (original files, code images); 0 = unlimited. Admins can set a different value per account. |
CLIPR_BETA |
0 |
1 shows a "Beta" label next to the logo. |
Outgoing email
For registration, password resets and invitations. Encrypted connections only.
| Variable | Default | Meaning |
|---|---|---|
CLIPR_SMTP_HOST |
– | Mail server; empty = no email. |
CLIPR_SMTP_PORT |
587 |
Port (465 with ssl). |
CLIPR_SMTP_SECURITY |
starttls |
starttls or ssl. |
CLIPR_SMTP_USER |
– | Username. |
CLIPR_SMTP_PASSWORD |
– | Password (often an app password). |
CLIPR_SMTP_FROM |
– | Sender address, e.g. clipr@example.org. |
CLIPR_SMTP_CA_FILE |
= CLIPR_IMAP_CA_FILE |
Additional CA certificate (PEM, path inside the container) for a mail server with its own certificate. |
Check that sending works in the app under Settings → Administration → Test email to me.
Operation
| Variable | Default | Meaning |
|---|---|---|
TZ |
Europe/Berlin |
Time zone for deadlines, calendar and logs. |
CLIPR_MAX_UPLOAD_MB |
20 |
Maximum size per uploaded file. |
CLIPR_IMAP_ENABLED |
1 |
Automatic mail retrieval on (1) or off (0); "Fetch now" always works. |
CLIPR_IMAP_INTERVAL |
30 |
System-wide retrieval interval in minutes (at least 5). |
CLIPR_IMAP_MIN_INTERVAL |
5 |
Lower bound for CLIPR_IMAP_INTERVAL (only change it if your mail provider requires fewer requests). |
CLIPR_IMAP_WORKERS |
2 |
Maximum number of mailboxes fetched at the same time (1–8). |
CLIPR_IMAP_MANUAL_COOLDOWN |
120 |
Minimum gap between "Fetch now" per mailbox, in seconds. |
CLIPR_IMAP_ALLOW_PRIVATE |
0 |
1 allows mail servers in the home network (private IP, localhost). Blocked otherwise (SSRF protection). |
CLIPR_IMAP_ALLOW_HOSTS |
– | More targeted: allow individual mail servers in a private network, host:port, comma-separated. |
CLIPR_IMAP_CA_FILE |
– | Additional CA certificate (PEM) for mail servers with their own certificate; system CAs stay valid. |
CLIPR_OCR_LANG |
deu+eng+nld |
Languages of the first text recognition pass. If Clipr detects French, Italian, Spanish or Polish, a second pass follows. |
CLIPR_MAX_PDF_PAGES |
60 |
PDFs with more pages are rejected. |
CLIPR_SANDBOX |
1 |
Analyse foreign files in an isolated subprocess (no secrets, memory and time limits). |
CLIPR_SANDBOX_MEM_MB |
768 |
Memory limit of the sandbox. |
CLIPR_SANDBOX_TIMEOUT |
180 |
Time limit of the sandbox in seconds. |
CLIPR_LOG_LEVEL |
INFO |
DEBUG, INFO, WARNING or ERROR. |
Containers
| Variable | Default | Meaning |
|---|---|---|
CLIPR_SUBNET |
172.30.53.0/24 |
Docker network between Caddy and the services. Proxy headers are only accepted from here. Change it if it overlaps an existing network. |
CLIPR_MEM_LIMIT |
1g |
Memory limit of the app. |
CLIPR_MAX_BODY |
220MB |
Maximum size of a request to Caddy (several files at once). |
COMPOSE_FILE |
docker-compose.yml |
Compose files in use, separated by :. Best maintained with cliprctl overlay. |
Proton Mail Bridge
Only with docker-compose.protonbridge.yml, guide under Mailboxes.
| Variable | Default | Meaning |
|---|---|---|
CLIPR_GATEWAY |
172.30.53.1 |
First address of CLIPR_SUBNET; the IMAP relay listens here. cliprctl sets it accordingly. |
CLIPR_BRIDGE_IMAP_PORT |
1143 |
IMAP port of the bridge on the host. |
CLIPR_BRIDGE_SMTP_PORT |
– | SMTP port of the bridge if outgoing email should use it too (e.g. 1025); empty = IMAP only. |
Wiki
Only with docker-compose.wiki.yml, see Running the wiki.
| Variable | Default | Meaning |
|---|---|---|
CLIPR_WIKI_DOMAIN |
– (required) | The wiki's own hostname, e.g. wiki.clipr.example.com. Must differ from CLIPR_DOMAIN. |
CLIPR_WIKI_EDIT |
0 |
1 = Clipr admins may edit in the browser (sign-in via Clipr). |
CLIPR_WIKI_TITLE |
Clipr Wiki |
Title in the header and browser tab. |
CLIPR_WIKI_MAX_IMAGE_MB |
10 |
Maximum image size in the editor. |
CLIPR_WIKI_DEV_UID / CLIPR_WIKI_DEV_GID |
1000 |
Only with docker-compose.wiki-dev.yml: your own user (id -u / id -g) so changes in docs/wiki belong to you. |
Sign-in for other services (single sign-on)
| Variable | Default | Meaning |
|---|---|---|
CLIPR_SSO_CLIENTS |
– | Further services Clipr may send admins to after sign-in, as name=https://origin, comma-separated. Exact https origins without a path only. The wiki needs no entry. See Security. |
Internal and development
These values are set by the images or compose files themselves. Do not change them in normal operation.
| Variable | Where | Meaning |
|---|---|---|
CLIPR_DATA_DIR |
app | Data directory (/data). |
CLIPR_WEB_DIR |
app | Directory of the interface (/app/web). |
CLIPR_COOKIE_SECURE |
app, wiki | 1 (default) = cookies over HTTPS only. 0 only for local development without TLS. |
CLIPR_ALLOW_PLAIN_IMAP |
app | Tests only: allows unencrypted IMAP against the test mail server. Never set in production. |
FORWARDED_ALLOW_IPS |
app, wiki | X-Forwarded-* headers are accepted from here; the compose files set CLIPR_SUBNET. |
CLIPR_WIKI_APP_URL |
wiki | Internal address of the app for keys and sign-in checks (http://app:8000). |
CLIPR_WIKI_SSO_KEYS |
wiki | Optionally pinned public keys (kid=base64url,…) instead of fetching them from the app. |
CLIPR_WIKI_CONTENT_DIR |
wiki | Shipped content (/app/content). |
CLIPR_WIKI_DATA_DIR |
wiki | Wiki data (/data). |
CLIPR_WIKI_STATIC_DIR |
wiki | CSS, scripts, fonts (/app/static). |
CLIPR_WIKI_DEV |
wiki | 1 = development mode (set by docker-compose.wiki-dev.yml). |
CLIPR_CTL_LANG |
cliprctl | Language of cliprctl: de or en. |