# Configuration reference

Everything is optional and set through environment variables. `deploy/env.example` in the repository has the same list with comments. An invalid value stops the server at startup with a clear message.

Settings used to be called `SISO_*`. Those names still work, and a `FUZZY_*` value wins when both are set.

| Variable | Default | Meaning |
|---|---|---|
| `FUZZY_ADDR` | `:8080` | Listen address |
| `FUZZY_DIR` | `./data` | Storage directory |
| `FUZZY_MAX_SIZE` | `50MB` | Largest single file |
| `FUZZY_USER_QUOTA` | `1GB` | Live storage per person. Can be lowered, never raised above 1 GB |
| `FUZZY_DEFAULT_TTL` | `24h` | Lifetime when the caller sends none |
| `FUZZY_MAX_TTL` | `14d` | Longest lifetime a caller may ask for. Can be lowered, never raised above 14 days |
| `FUZZY_PLANS` | `off` | `on` runs the hosted service: each account has a plan (Free, Pro or Team) with its own limits, and the settings above no longer apply. Leave it off to self-host; every account then gets the limits above and nothing is locked |
| `FUZZY_DODO_KEY` | unset | Hosted service only, with `FUZZY_PLANS=on`. A Dodo Payments API key. Needs the settings below |
| `FUZZY_DODO_WEBHOOK_SECRET` | unset | The signing secret (`whsec_...`) of the Dodo webhook endpoint `https://your-host/billing/webhook` |
| `FUZZY_DODO_MODE` | `test` | `live` uses Dodo's live environment. A test key only works in `test` |
| `FUZZY_DODO_PRODUCT_PRO_MONTH`, `_PRO_YEAR`, `_TEAM_MONTH`, `_TEAM_YEAR` | unset | The Dodo product id of each plan and billing period. A plan with no product is not on sale |
| `FUZZY_ALLOW_PUBLIC` | `true` | `false` turns off public links and `visibility=public` (`403`); every link must then be private |
| `FUZZY_ADMIN_KEY` | unset | Lets its holder list and remove users |
| `FUZZY_SIGNUP_CODE` | unset | Require this code to register |
| `FUZZY_SIGNUPS_PER_HOUR` | `10` | Registrations per IP per hour |
| `FUZZY_ACCESS_LOG` | `full` | Link activity log: `full`, `anonymous` or `off` |
| `FUZZY_TRUST_PROXY` | `false` | Read the client IP from `X-Forwarded-For` |
| `FUZZY_PUBLIC_URL` | derived | Address used in links, snippets, `robots.txt` and the sitemap |
| `FUZZY_SMTP_HOST`, `FUZZY_MAIL_FROM` | none | Send a confirmation email before an account is created. Needs `FUZZY_MAIL_FROM` such as `FuzzyShare <no-reply@example.com>`. See [Email confirmation](self-hosting-email.md) |
| `FUZZY_SMTP_PORT` | `587` | `587` uses STARTTLS, `465` uses TLS from the start |
| `FUZZY_SMTP_USER`, `FUZZY_SMTP_PASS` | none | SMTP login, set both or neither |
| `FUZZY_GITHUB_CLIENT_ID`, `FUZZY_GITHUB_CLIENT_SECRET` | none | Turn on sign in with GitHub. Set both. See [Sign in with GitHub and Google](self-hosting-social-login.md) |
| `FUZZY_GOOGLE_CLIENT_ID`, `FUZZY_GOOGLE_CLIENT_SECRET` | none | Turn on sign in with Google. Set both |
| `FUZZY_APP_HOST` | none | A hostname such as `app.example.com` that serves the web app at its root, with no `/dashboard` in any address. The main host then sends `/dashboard`, `/access` and `/signup` there. See [HTTPS and reverse proxies](self-hosting-https.md#a-separate-app-hostname) |
| `FUZZY_SWEEP_INTERVAL` | `1m` | How often expired files are deleted from disk |
| `FUZZY_DL_DIR` | `<FUZZY_DIR>/dl` | Where `/dl/` serves CLI binaries from |

## Sizes and lifetimes

Sizes accept units such as `50MB` and `1GB`. Lifetimes accept seconds, or a number with `s m h d w` (`90m`, `24h`, `14d`). `FUZZY_DEFAULT_TTL` cannot exceed `FUZZY_MAX_TTL`.

## The admin key

Generate one with `openssl rand -hex 24`. The admin key manages accounts only: it lists and removes users, and sees how many keys each holds. It has no files and cannot read link activity.

## Closing registration

`FUZZY_SIGNUP_CODE` makes `POST /register` need `signup_code`, and the CLI needs `--signup-code` or `FUZZY_SIGNUP_CODE`. Keep `FUZZY_SIGNUPS_PER_HOUR` low. The rate limit is in memory and per address.

## Link activity

`FUZZY_ACCESS_LOG` decides what link owners can see:

- `full`: visitor IPs as seen.
- `anonymous`: IPv4 last octet zeroed, IPv6 cut to /64. Session ids use the masked value.
- `off`: nothing recorded.

Visitor IPs are personal data in many places. See the [privacy page](legal-privacy.md).

## Behind a proxy

Set `FUZZY_TRUST_PROXY=true` so the signup and passphrase limits and the activity log see real client addresses, and `FUZZY_PUBLIC_URL=https://fuzzyshare.example.com` so links use your domain. See [HTTPS and reverse proxies](self-hosting-https.md).
