Table Of Contents

Previous topic

Are you ready to gear up?

Next topic

TurboGears Configuration

Starting Up The Server

As soon as you have quickstarted a project, you are ready to fire up CherryPy’s built-in server and get moving! To run the server for development you should:

  1. Switch to the top level directory of your newly created project. If, for example, your project is called “MyTGApp”, open a command line and then do:

    $ cd /path/to/MyTGApp
  2. Run the provided start script called start-<pkg-name>.py with Python. E.g., if your application’s package name is “mytgapp”, then run:


You will then see console messages telling you that the server has started up and on which port it is listening.

Accessing the Application

By default, the CherryPy server for your quickstarted TurboGears project listens on port 8080, so you should see the standard welcome page by pointing your browser at http://localhost:8080/.


Mac Bonjour Support

On the Mac, you’ll be able to see your development site in safari’s Bonjour bookmarks.

Automatically Restart

The server watches for changes to files in your project and will automatically restart if it sees any.

Stop the Server

You can stop the server at any time by pressing Control-C (in the console).

Using a Different Server Configuration

The start script accepts one optional argument on the command line, which specifies the path to an alternate server configuration file to use. If no file is given, it will look for dev.cfg in the current directory, if a file is also present (development mode). If not, it will then look for prod.cfg in the current directory and, finally, if this is not found also, it will look for config/default.cfg within the application’s egg.

Please refer to the configuration documentation for a reference of the server settings that you can use in the deployment configuration files.

Previous: Create a new project : Next: The Big Picture