Heroku

As of 2026, we strongly recommend hosting directly on oTree.org (link) rather than using Heroku. This gives you access to the most reliable server with the latest features.

Heroku setup

To deploy to Heroku, you should use the oTree website, which automates your server setup and ensures your server is correctly configured.

The oTree website also offers error/performance monitoring.

Server performance

Heroku offers different performance tiers for resources such as your dyno and database. What tier you need depends on how much traffic your app will get, and how it is coded.

Performance is a complicated subject since there are many factors that affect performance. The oTree website’s Pro plan has a “monitor” section that will analyze your logs to identify performance issues.

General tips:

  • Upgrade oTree to the latest version

  • Use browser bots to stress-test your app.

  • With the higher dyno tiers, Heroku provides a “Metrics” tab. Look at “Dyno load”. If users are experiencing slow page load times and your your dyno load stays above 1, then you should get a faster dyno. (But don’t run more than 1 web dyno.)

  • If your dyno load stays under 1 but page load times are still slow, the bottleneck might be something else like your Postgres database.

The most demanding sessions are the ones with a combination of (1) many rounds, (2) players spending just a few seconds on each page, and (3) many players playing concurrently, because these sessions have a high number of page requests per second, which can overload the server. Consider adapting these games to use Live pages, which will result in much faster performance.