Skip to the content
Documentation
Help Start
Reading in:
  • German: 9,219 of 9,219 pages
About the help in other languages
All help pages

Demo mode in bundles

When a bundle may use demo mode (EXP_DEMO_MODE=1) and when it must never - what it changes, how a demo bundle sets it for every process, installing with a published password, rebuilding on a schedule, and how to keep it…

Download as PDF

Address: https://doc.exponential.earth/exphelp/viewer/help/bundlers/demo-mode-in-bundles.md

On this page

Demo mode in bundles

This page is for bundlers who build public demonstrations, and for every other bundler, so they keep demo mode out of their bundles. Demo mode is switched on only by the environment variable EXP_DEMO_MODE=1 (Demo mode).

Contents

  1. What demo mode does
  2. The rule for bundles
  3. Setting it in a demo bundle
  4. Installing with a published password
  5. Rebuilding on a schedule
  6. Checks

What demo mode does

  • Administrator passwords "cannot be changed or reset": the Change password form, Forgot your password?, user edit, exp:resetuserpassword, web services and imports refuse it for administrators.
  • Every administration page shows a Demo mode banner.
  • The installers accept a published, well-known or short administrator password (publish, publishing); an empty one is still refused.
  • It "does not make the site read-only: a visitor can edit content, create users, change roles and settings. That is why a demo is rebuilt from scratch on a schedule."

Source: Demo mode, Demo mode: the upgrade note.

The rule for bundles

BundleDemo mode
Public demo with a published sign-inon, for that demo's processes only
Trade-show or sales laptop showing a published sign-inon, if the sign-in is published
Classroom where every student knows the passwordon, only if the image never becomes a real site
Every bundle meant for a real sitenever

"Demo mode means that the administrator password is known to everyone." Because it is environment only ("No INI setting, no request parameter and no administration page can switch it on"), a settings file or database copied from a demo does not carry it. Your images, units and panel templates for real sites must not set it either.

Setting it in a demo bundle

Every process that serves or maintains the demo needs it (Demo mode for hosts):

Where PHP runsSetting
PHP-FPMenv[EXP_DEMO_MODE] = 1 in the demo's own pool
ApacheSetEnv EXP_DEMO_MODE 1 in the demo's virtual host
Velocityexport EXP_DEMO_MODE=1 in the demo's site envvars /etc/vc/sites-available/<site>.envvars, or the environment of the process that starts the demo's server; never the shared /etc/vc/envvars, which the workers refuse for demo mode
CronEXP_DEMO_MODE=1 at the top of the demo user's crontab
ContainersENV EXP_DEMO_MODE=1 in the demo image, or -e EXP_DEMO_MODE=1 for the demo service only

"Only the exact value 1" turns it on. config.env.php explicitly says demo mode "IS NOT A SETTING OF THIS FILE": a constant there does nothing (config.env.php.example).

Installing with a published password

EXP_DEMO_MODE=1 php bin/php/console exp:install --apply --db=sqlite --password='<the published demo password>'

The same works for the kickstarter ([site_admin] Password) and the setup wizard. "Only the administrator password of the new installation is relaxed."

Rebuilding on a schedule

"A demo that is rebuilt on a schedule (every few hours, from the current code) does this in its build script: install with the variable, swap the new site in, keep the variable in the running site's PHP environment and crontab. The script must not write the variable into config.php, settings/ or anything that is copied to other sites." exp:install on SQLite is "the usual choice" for such demos (4.7).

Checks

  • To do: The administration of the demo shows the Demo mode banner.
  • To do: Bundles for real sites do not show it, and none of their files mention EXP_DEMO_MODE.
  • To do: The demo's page says plainly that it is public and reset regularly ("Do not enter anything private here").

Become an Exponential Partner

Partners share their information, provide funding, contribute back and develop the products with us, and that is how Exponential grows. A partner website and dashboard are planned for mid-2027: please become a partner today to speed up our growth rate and land new features faster.

Something wrong on this page? Report an error

Documentation license

This documentation is free documentation, licensed under the GNU Free Documentation License 1.3 or later.

Exponential Copyright © 1998-2026 Exponential Foundation and 7x