
# Fill in the legal notices

Before opening the instance to its staff, you set the organiser's legal information in the environment: without five of them (the five required keys of `LEGAL_MENTIONS`), the application refuses to start on a **public** instance (`PUBLIC_INSTANCE=true`) and says so with a warning everywhere else.

## Why they do not stay empty

The notices are `""` by default, and the public `/mentions-legales` page says so itself ("No legal information has been entered for this deployment"). That is acceptable on a demo, not on an instance in service, where the LCEN wants an identified publisher and host, and the GDPR a controller, a legal basis and a retention period.

This information is **the organiser's**: employer of the people scheduled and controller. You who host are a **processor** (art. 28 GDPR), which requires a written agreement between the two parties from the first hosting, even free: [what the host must write and keep](rgpd.md).

## The variables to fill

The notices are set by **one variable**, `LEGAL_MENTIONS`, of the form `key=value;key=value`: a literal semicolon in a value is written `\;`, an unknown key is flagged at startup then ignored.

| `LEGAL_MENTIONS` key | Status | What it carries |
| --- | --- | --- |
| `editeur` | **required** | Publisher: name, legal form, address, registration |
| `hebergeur` | **required** | Host: name and address |
| `contact` | **required** | Contact address, including to exercise one's rights |
| `base-legale` | **required** | Legal basis for processing personal data |
| `conservation` | **required** | Retention period of personal data |
| `responsable-traitement` | optional | Controller, if different from the publisher; empty, it is the publisher |
| `directeur-publication` | optional | Publication director |

Example, in the compose `.env`:

```
LEGAL_MENTIONS="editeur=Association Exemple, 1 rue des Pions, 79000 Niort;hebergeur=Hébergeur Fictif SAS, Paris;contact=planning@exemple.invalid;base-legale=Intérêt légitime de l'organisateur;conservation=Jusqu'au 31 décembre de l'année suivant l'édition"
```

The five required keys make a **public instance** fail to start when empty, like an `ADMIN_PASSWORD` left on its example. On an instance not declared public (`PUBLIC_INSTANCE` absent or `false`), the same sentence is a startup-log **warning** and the application starts: an instance only your team reaches has nobody to publish a page to. In both cases the message names **all of them at once**. The other two stay optional on purpose: an empty `responsable-traitement` falls back to the publisher, and not every publisher is required to have a publication director.

Pay attention to `conservation`: this period is shown in the privacy policy and **nothing in the code enforces it**. Announce only what you will keep, through the [annual purge](conservation-des-donnees.md#la-purge-annuelle).

The seven old variables (`LEGAL_EDITEUR`, `LEGAL_HEBERGEUR`, `LEGAL_CONTACT`, `LEGAL_BASE_LEGALE`, `LEGAL_CONSERVATION`, `LEGAL_RESPONSABLE_TRAITEMENT`, `LEGAL_DIRECTEUR_PUBLICATION`) are no longer read since 5.0: startup names those still set, and a public instance that carries its notices through them alone refuses to start ([Moving from 4.x to 5.0](passer-a-la-5-0.md)).

## The accessibility statement

A second variable, `LEGAL_ACCESSIBILITE`, fills the `/declaration-accessibilite` page and does not block startup: the empty page says no audit is declared rather than announcing compliance. The four keys and the detail are in [accessibility](accessibilite.md).

## An instance not in service

A demo or acceptance instance sets `LEGAL_DEMO_INSTANCE=true` and starts with an empty page, with no refusal or warning. The flag is explicit rather than deduced from `PUBLIC_URL` or the launch mode: what an instance is *made for* is written nowhere in its configuration ([decision 0040](repo:docs/decisions/0040-mentions-legales-exigees-au-demarrage.md)). Do not set it on an instance open to its staff.

A demo or acceptance server can also show the day-of mode and the staff space out of season. Started with `HORLOGE_SIMULEE_AUTORISEE=true`, it shows in *Settings*, *Instance* tab ("Advanced settings"), the "Simulated date and time" card: a date, an optional time, and "Back to the machine's clock". While a date is set, a red hourglass in the top bar reminds you. Without the variable, the card does not appear and the API refuses the write (`400`). Never enable it in production: it would make the day-of screen lie on a real event.

## Upgrading with an instance already in service

If your instance in service is public (`PUBLIC_INSTANCE=true`) and never set these variables, it **will not restart** until they are: the obligation already existed, nothing enforced it. Prepare them before the update window. An instance not declared public starts and warns: in 3.x the refusal applied to every instance, without this distinction, so **declare `PUBLIC_INSTANCE=true` if the instance is open to strangers**, otherwise nothing stops you publishing it without notices.

## Check

After restart, `scripts/verifier-deploiement.sh` checks that the five required notices are not empty ([the script's detail](installation.md#mettre-la-pile-en-route)), and the instance's `/mentions-legales` page shows what you entered.
