Skip to content

Environment variables

This page lists all the environment variables used by PerfShop. The reference is the .env.example file at the root of the repository, supplemented by the variables injected by docker-compose.yml into certain services.

Source

.env.example, docker-compose.yml, docker-compose.desktop.yml, docker-compose.build.yml

Philosophy

PerfShop follows the 12-factor app principle: all configuration goes through environment variables. No sensitive value (password, key, token) is hard-coded in the code or in the images. The .env file (copied from .env.example on first deployment) centralizes everything and is never committed.

The variables are grouped below by theme.

Host address

Variable Type Default Role
HOST_IP string localhost The host's network address (IP) or its domain; used by the welcome page in ip mode. build.sh writes it for desktop and unix; for nas and prod it is REQUIRED in the owner's .env — missing, or set to localhost, the installer refuses (2026-10-18)

Language

Variable Type Default Role
PERFSHOP_LANG fr, en, … fr Active language of the entire stack (see i18n overview)
PERFSHOP_UI_LOCALE locale fr-FR Derived locale used for date formatting in some UIs

Public URLs

These are the URLs that the browser uses to call the APIs. In ip mode (Docker Desktop, local Unix), the default values point at localhost with the exposed ports. In dns mode (NAS, production), they are replaced with the actual HTTPS subdomains. The welcome page chooses its mode from them (WELCOME_MODE=auto, the default): dns as soon as one of them is not on the host (http://${HOST_IP}:<port>), ip otherwise.

Variable Default Target service
PUBLIC_API_URL http://localhost:9080 Spring Boot backend
PUBLIC_FRONTEND_URL http://localhost:8090 React shop frontend
PUBLIC_MONITORING_URL http://localhost:3001 Monitoring HTML dashboard
PUBLIC_GRAFANA_URL http://localhost:3002 Grafana
PUBLIC_PROMETHEUS_URL empty Prometheus (welcome page, dns mode: empty = not listed)
PUBLIC_PYROSCOPE_URL empty Pyroscope (welcome page, dns mode: empty = not listed)
PUBLIC_CHAOS_URL http://localhost:3003 chaos-admin (panel + student page)
PUBLIC_ADMIN_URL http://localhost:3004 Admin backoffice
PUBLIC_DOCS_URL http://localhost:9087 MkDocs documentation
PUBLIC_JMETER_URL http://localhost:3005 JMeter UI
PUBLIC_SQUASH_URL http://localhost:9086/squash/ Squash TM (the /squash/ path is part of the address: its root returns 404)
PUBLIC_SELENIUM_VNC_URL http://localhost:7900 Selenium VNC viewer
PUBLIC_FORGEJO_URL http://localhost:3009 Forgejo (self-hosted Git)
PUBLIC_SCRIPTS_URL http://localhost:3008 Scripts UI
PUBLIC_OPENSEARCH_URL http://localhost:5601 OpenSearch Dashboards
Variable Default Role
PERFSHOP_FRONTEND_INTERNAL PUBLIC_FRONTEND_URL, else http://perfshop-frontend Shop address as the test containers reach it (Robot runner, Scripts UI, Test-AI). With desktop and unix, the installer (build.sh) writes the host address and the published port there ; delivered blank, it stays so in prod : the compose files then take PUBLIC_FRONTEND_URL, your domain ; http://perfshop-frontend only applies without a .env file

Ports exposed on the host machine

These variables control only the Docker Compose port mappings to the host. Changing these values has no impact on internal communications between containers.

Variable Default Service
BACKEND_HTTP_PORT 9080 Spring Boot backend
BACKEND_METRICS_PORT 9090 Management / actuator (heap dump) — internal Docker
FRONTEND_HTTP_PORT 8090 Nginx frontend
MONITORING_HTTP_PORT 3001 Node.js monitoring
GRAFANA_HTTP_PORT 3002 Grafana
PROMETHEUS_HTTP_PORT 9092 Prometheus
CHAOS_HTTP_PORT 3003 chaos-admin
ADMIN_HTTP_PORT 3004 Admin backoffice
LOKI_HTTP_PORT 19100 Loki — ⚠️ port 3100 reserved by Hyper-V/WSL2 on Windows
DOCS_HTTP_PORT 9087 MkDocs documentation
TEMPO_HTTP_PORT 19200 Tempo query — ⚠️ port 3200 reserved by Hyper-V/WSL2 on Windows
TEMPO_OTLP_GRPC_PORT 4317 Tempo OTLP gRPC ingress
TEMPO_OTLP_HTTP_PORT 4318 Tempo OTLP HTTP ingress
PYROSCOPE_HTTP_PORT 4040 Pyroscope
SQUASH_HTTP_PORT 9086 Squash TM (Docker Desktop rule: no 80xx)
SQUASH_DB_PORT 5433 Squash PostgreSQL
SELENIUM_HTTP_PORT 4444 Selenium Grid Hub
SELENIUM_VNC_PORT 7900 noVNC VNC viewer
SELENIUM_VNC_BIND 0.0.0.0 Listening address of the Selenium noVNC desktop. 0.0.0.0 (the value of the example file) opens it to the network: students watch it from their own machine; it stays view-only. 127.0.0.1 keeps it on the machine only — set it on an Internet-facing machine; it is also the compose default when the key is missing. The welcome page and the installer summary announce the desktop where it is published. Port 4444 has no variable: the machine only, always.
FORGEJO_HTTP_PORT 3009 Forgejo
SCRIPTS_UI_PORT 3008 Scripts UI
JMETER_UI_PORT 3005 JMeter UI
JMETER_PROMETHEUS_PORT 9270 JMeter Prometheus exporter
OPENSEARCH_HTTP_PORT 5601 OpenSearch Dashboards
OPENSEARCH_API_PORT 9201 OpenSearch REST API

Docker Desktop rule

No port in the 80xx range is used — Docker Desktop (Windows/macOS) reserves these ports for internal use and may generate conflicts. That's why Squash TM is on 9086 (not 8086) and the backend is on 9080 (not 8080).

HTTP session

Variable Type Default Role
SESSION_COOKIE_SECURE boolean false Secure flag on the session cookie — set to true over HTTPS
SESSION_COOKIE_SAME_SITE lax/strict/none lax Cookie SameSite policy
SESSION_SECRET string perfshop-dev-secret Secret key for Express sessions (scripts-ui) — change in production

Administration

Variable Default Role
ADMIN_EMAIL admin@perfshop.fr Email of the superadmin created at bootstrap
ADMIN_PASSWORD perfshop Superadmin password — see Admin authentication

The default password must be changed for any public exposure, either through this variable followed by a restart, or through the "My account" page of the instructor panel.

CORS

No key to set: both compose files build the backend's list of allowed origins (CORS_ALLOWED_ORIGINS, a container variable) from PUBLIC_FRONTEND_URL, PUBLIC_MONITORING_URL, PUBLIC_CHAOS_URL and PUBLIC_ADMIN_URL. For the Vite development server, see Build frontend.

PerfShop database (MySQL)

Variable Default Role
DB_ROOT_PASSWORD rootpass123 root password of the MySQL container
DB_PASSWORD perfshop123 Password of the perfshop user
DB_PORT 19306 MySQL port exposed on the host — ⚠️ port 3306 reserved by Hyper-V/WSL2 on Windows

The database name (perfshop) and the user name (perfshop) are fixed in docker-compose.yml and in the backend application.yml.

Squash TM database (PostgreSQL)

Squash TM uses PostgreSQL (and not MySQL like the rest of PerfShop).

Variable Default Role
SQUASH_DB_PASSWORD squash123 PostgreSQL password for Squash
SQUASH_ADMIN_LOGIN admin Admin login for the Squash TM interface
SQUASH_ADMIN_PASSWORD admin Squash TM admin password
SQUASH_JWT_SECRET (long token) Signed JWT key for the Squash automation API
SQUASH_ADMIN_EMAIL admin@perfshop.fr Seeded admin email

See Squash TM for stack details.

Grafana

Variable Default Role
GF_SECURITY_ADMIN_USER admin Grafana admin login
GF_SECURITY_ADMIN_PASSWORD perfshop Grafana admin password
GRAFANA_STUDENT_USER eleve Grafana student account (Editor role), created by perfshop-grafana-seed when missing
GRAFANA_STUDENT_PASSWORD perfshop-eleve Initial password of the Grafana student account — never reset afterwards

These variables are prefixed GF_ because they are consumed directly by Grafana in its native env-based configuration format.

JMeter

Variable Default Role
JMETER_IMAGE justb4/jmeter:latest Docker image used to run JMeter plans
JMETER_MAX_RAM 512 Max RAM (in MB) allocated to each JMeter execution
PERFSHOP_API_INTERNAL http://perfshop-app:8080 Alias of the internal backend URL, used by several components (monitoring, test-runner)

QA stack — test runner

Variable Default Role
RF_RUNNER_SELENIUM_URL http://perfshop-selenium:4444/wd/hub Selenium hub URL used by the Robot Framework runner
PERFSHOP_FRONTEND_INTERNAL PUBLIC_FRONTEND_URL, else http://perfshop-frontend Shop address for Robot/pytest tests and for Test-AI runs : the host address and published port, written by the installer (desktop, unix) ; left blank in prod, the domain in PUBLIC_FRONTEND_URL (http://perfshop-frontend only applies without a .env file)

Forgejo — self-hosted Git

Variable Default Role
FORGEJO_DOMAIN localhost Domain declared in the Forgejo configuration
FORGEJO_ADMIN_USER forgejo-admin Admin account created at seed
FORGEJO_ADMIN_PASSWORD perfshop Forgejo admin password
FORGEJO_CI_USER perfshop-ci Account dedicated to continuous integration
FORGEJO_CI_PASSWORD perfshop CI account password
FORGEJO_CI_EMAIL ci@perfshop.fr CI account email
FORGEJO_REPO perfshop-tests Name of the repository seeded at startup

See Forgejo.

OpenSearch

Variable Default Role
OPENSEARCH_ADMIN_USER admin OpenSearch Dashboards admin login
OPENSEARCH_ADMIN_PASSWORD perfshop OpenSearch admin password
OPENSEARCH_JAVA_OPTS -Xms512m -Xmx512m OpenSearch JVM heap — 512m recommended in dev, 1g in prod

See OpenSearch and Vector.

PerfShop license

Variable Default Role
PERFSHOP_LICENSE_KEY (empty) PFSH-xxx.yyy license key preloaded at backend startup

Two license activation paths are possible — see License system:

  • Option A — inject into .env before startup:
    # Unix / macOS
    echo "PERFSHOP_LICENSE_KEY=PFSH-xxx.yyy" >> .env
    # Windows PowerShell
    Add-Content .env "PERFSHOP_LICENSE_KEY=PFSH-xxx.yyy"
    
  • Option B — activate from the UI (chaos-admin panel → license management → paste the key)

Without a license, the shop stays accessible, but protected interfaces respond with HTTP 402. See Freemium vs Pro.

Cross-references

The .env.example file itself is commented and groups variables by section with ASCII headers. It serves as the source of truth in case of divergence with this documentation. When in doubt, always refer to the content of the .env.example shipped with the source code version you are using.

See also