Your settings can be found in Here are explanations of a few oTree-specific settings. Full info on all Django’s settings can be found here.


To create a session, you first need to define a “session config”.

In, add an entry to SESSION_CONFIGS like this (assuming you have created apps named my_app_1 and my_app_2):

    'name': 'my_session_config',
    'display_name': 'My Session Config',
    'num_demo_participants': 2,
    'app_sequence': ['my_app_1', 'my_app_2'],

Once you have defined a session config, you can run otree resetdb, then otree runserver, open your browser to the admin interface, and create a new session. You would select “My Session Config” as the configuration to use.

For more info on how to use SESSION_CONFIGS, see Configure sessions and Choosing which treatment to play.


If you set a property in SESSION_CONFIG_DEFAULTS, it will be inherited by all configs in SESSION_CONFIGS, except those that explicitly override it. the session config can be accessed from methods in your apps as self.session.config, e.g. self.session.config['participation_fee']


You can turn off debug mode by setting the environment variable OTREE_PRODUCTION to 1, or by directly modifying DEBUG in

If you turn off DEBUG mode, you need to manually run otree collectstatic before starting your server, or else CSS/JS and other static files will fail to load and your site will look broken. Also, you should set up Sentry to receive email notifications of errors.


See Money and Points.


See Sentry.



It’s somewhat preferable to set the environment variable OTREE_AUTH_LEVEL on your server, rather than setting AUTH_LEVEL directly in This will allow you to develop locally without having to enter a password each time you launch the server, but still get password protection on your actual server.


See Rooms.


See Rooms.


For security reasons, it’s recommended to put your admin password in an environment variable, then read it in like this:


To set OTREE_ADMIN_PASSWORD on Heroku, enter this command, substituting your own password of course:

$ heroku config:set OTREE_ADMIN_PASSWORD=blahblah

If you change ADMIN_USERNAME or ADMIN_PASSWORD, you need to reset the database.