Deploying as a Service/DaemonΒΆ

If want to use TurboGears standalone (i.e. use the Paste web server as your primary web-server), or behind a proxy, such as Apache Mod-Proxy or the NGINX Web Server you need to make sure that the TurboGears server is started automatically. There are a number of options to accomplish this:

  • Upstart – used on newer Linux hosts
  • Sys-V Init – traditional Unix/Linux init system
  • supervisord – separate daemon with ability to monitor and restart

Which one you choose is likely up to your familiarity level with the particular tool.


For extremely small non-critical sites, it can sometimes be expedient to use the screen tool to start a paster serve production.ini process and then disconnect from the screen. This isn’t recommended, as a power-cycle of the machine will require you to rush back from your vacation to ssh in and re-start the server, but sometimes you do this kind of thing just to get the job done now.


Provide sample init script


Provide sample upstart


Provide sample supervisord config


Difficulty: Hard. Document usage of to deploy as a Win32 service