Table Of Contents

Previous topic

Creating Big Applications

Next topic

Hosting TurboGears Applications

Deploying TurboGears

Where to Deploy

Python isn’t as widely available on commodity hosting as other environments (read PHP) are. If you don’t have your own server, take a look at our list of hosting companies for top picks.

Installation

Before you configure your server, you need to install your application on the target server. To make this easy for yourself and others, you should use Python eggs:

Normally, you don’t have root access on rented hosting space.

Configuration

There are many ways to run a TurboGears application. Before deployment, make sure you go over the Runtime Configuration to setup your application for maximum performance.

Next, you should decide how to deploy your application. Here are a few sample configurations, each having its pros and cons.

Please also consider how many threads are appropriate to be used in your deployment.

If you run the TurboGears/CherryPy server behind a proxy, you also might want to read our remarks on making HTTPS redirects work properly in this configuration.

Autostarting

If want to use TurboGears standalone (or behind a reverse proxy), you need to make sure that the TurboGears server is started automatically. On Unix like system you can treat your app like every other system daemon by adding a custom init script which starts the server automatically when your system boots.

We also recommend using the Supervisor system for starting your TurboGears application since it has some additional advantages and features.