Documentation

Configuring by hand.

Almost everything is set in the admin. The rest — secrets, domain, database — lives in a single file, the .env, which updates never touch. Here are both, setting by setting.

In the admin: the Settings menu

Whatever changes the site's look or behaviour is set online, with no terminal and no restart.

  1. General — logo, favicon, admin language, site languages, and the « Clear cache » button.
  2. Identity and social networks — name, contact details, links to your networks.
  3. Fonts, Theme, Global CSS — typography, colour palette, and as a last resort a few shared CSS rules.
  4. Media library — images, automatically produced in five widths.
  5. Social logins — Google, Apple, Facebook for customer sign-in.
  6. Google API — the key for PageSpeed measurements.
  7. Email server — SMTP server, port, username, password (encrypted in the database).
  8. Sent emails, Cookies, Legal pages — message texts, the consent banner, legal notice, terms of use and terms of sale.
  9. AI agents — the accounts and tokens that let Claude drive the site.
  10. Update JEIKO — the installed version and one-click updates.

Stripe is set in Store › Payment methods, Google Calendar in Appointments › Google connection, course video hosting in Courses › Video hosting.

The .env file

It is the only place where one site differs from another. settings.py is identical everywhere and replaced on every update: a setting written in it would vanish at the first click on « Update ». The installer generates the .env and protects it: readable by the site's own account only.

/var/www/mysite/mysite/.env # next to settings.py, mode 0600

VariableDefaultRole
SECRET_KEYgeneratedDjango's secret key; also derives the key that encrypts secrets in the database.
SECRET_KEY_FALLBACKSemptyPrevious keys, comma-separated, during a rotation.
JEIKO_SALT_KEYderived from SECRET_KEYSalt for secret encryption.
DEBUGFalseNever True in production.
JEIKO_SITE_NAMEfolder nameTechnical name of the site.
DOMAIN_NAMEemptyDomain served, without https://.
JEIKO_SSLFalseHTTPS: redirect, HSTS, secure cookies. Set to True only once the certificate is in place.
DB_NAME, DB_USER, DB_PASS—The site's PostgreSQL database.
GUNICORN_SOCKET—Application service socket, set by the installer.
JEIKO_LANGUAGEfr-frThe site's original language.
JEIKO_TIMEZONEEurope/ParisTime zone: appointments, emails, logs.
JEIKO_SANITIZE_HTMLTrueStrips scripts and dangerous attributes from entered HTML. Only set to False if every editor is trusted.
JEIKO_TRUST_X_FORWARDED_FORTrueReads the visitor's address passed on by Nginx. False if Gunicorn is exposed directly.
JEIKO_AGENTS_APPELS_PAR_HEURE600Calls per hour per agent token (each agent can have its own).
JEIKO_AGENTS_ECHECS_PAR_IP20Invalid tokens tolerated per address in fifteen minutes.
JEIKO_UPDATE_REQUIRES_SUPERUSERTrueRestricts updates to superusers.
JEIKO_UNVERIFIED_ACCOUNT_TTL_DAYS30Never-confirmed accounts: deleted after this delay.
JEIKO_USER_SESSIONS_RETENTION_DAYS30Retention of session history.
JEIKO_SECURITY_EVENTS_RETENTION_DAYS365Retention of the security log.

Applying a change

The .env is only read when the service starts. After editing it, restart the service:

sudo nano /var/www/mysite/mysite/.env
sudo systemctl restart gunicorn-mysite
sudo systemctl status gunicorn-mysite # should say « active (running) »

Changing the SECRET_KEY

It protects sessions and encrypts the secrets stored in the database — Stripe keys, SMTP password, provider credentials. Changing it carelessly makes those secrets unreadable.

SECRET_KEY="new-key"
SECRET_KEY_FALLBACKS="old-key"

# restart, re-save the screens concerned (Stripe, Email server…),
# then remove the old key and restart again

If a duration value is unreadable, the site still starts: purges fall back to their default.

InstallationAutomatic installation