Self-host & build › Self-hosting › Server settings
Server settings
The environment variables a self-hosted Looona reads, and what it does without them.
A few settings live on the server, not in Settings. Looona reads them from its environment when it starts.
Where to set them
They go in the .env file, in Looona's folder, one per line. For example, on a server set up with the install guide:
- Open the file
It already holds Looona's secret keys: leave their lines as they are.
Terminalsudo nano /opt/looona/.env - Add a line at the end
One setting per line, with no spaces around
=.FileLOOONA_FORM_RATE_LIMIT=50 - Save and close
Press Ctrl+O, then Enter, then Ctrl+X.
- Restart Looona
It reads the file when it starts.
Terminalsudo systemctl restart looona
On a Mac or Windows, the .env file is in Looona's folder too: open it with any text editor, then start Looona again.
They can also go in the service file, as Environment= lines under [Service]. LOOONA_DATA_DIR must go there: the .env file lives in that folder. See Run it as a service.
The settings
| Variable | What it does | When it's not set |
|---|---|---|
LOOONA_DATA_DIR | The folder for the database, the backups, the logs and .env. | The folder Looona starts in. |
LOOONA_TRUST_PROXY | true when a proxy stands in front. Looona reads each visitor's address from X-Forwarded-For, to count limits per visitor. | Every visitor seems to come from the proxy. |
LOOONA_CLIENT_IP_HEADER | With LOOONA_TRUST_PROXY, a header the proxy always writes itself, read in place of X-Forwarded-For. Behind Cloudflare: cf-connecting-ip. | X-Forwarded-For is read. |
LOOONA_FORM_RATE_LIMIT | How many responses one visitor can send to one form, per 10 minutes. Uploads get twice as many. | 60. |
LOOONA_FILE_QUOTA_MB | How many megabytes of files sent with responses Looona keeps, e.g. 2048. Past it, new files are refused, responses never. See Files and screenshots. | No limit but the disk. |
LOOONA_LOGS_MAX_ENTRIES | How many warnings and errors Server logs keeps. The oldest go first. | 10,000. |
LOOONA_ALLOWED_ORIGINS | Other sites whose pages may call Looona's API while signed in, separated by commas, e.g. https://app.example.com. | Only Looona's own pages. |
LOOONA_SERVICE_URL | Where Looona reaches the service that connects Slack, Discord, Jira, Linear, GitHub and GitLab. | https://services.looona.fr. |
Set LOOONA_TRUST_PROXY only when the proxy is the only way to reach Looona. Otherwise anyone can write their own address and get past the limits.
Hosted forms and the embed script work on any site without LOOONA_ALLOWED_ORIGINS. See Share or embed a form.
Secret keys
At the first start, Looona writes three keys in .env: LOOONA_ENCRYPTION_KEY, LOOONA_SECRET_ACCESS_KEY and LOOONA_ENCRYPTION_FILE_TOKEN_KEY. Keep them, and share them with no one.
If one is missing, Looona makes a new one at start. A new LOOONA_SECRET_ACCESS_KEY signs everyone out.
The LOOONA_WEBHOOK_ variables call your own server before or after each change. See Webhooks.