Using the dev server

From OpenStreetMap Wiki
Jump to: navigation, search

The OSMF provides a development server to help contributors try things out. It's a general-purpose development machine, in contrast to the dedicated service machines such as the main database server, tile server, etc - which only the sysadmins have access to. This page gives some details to help OSM developers get up and running with a dev server account.

You don't need an account on the development server (a “dev account”) in order to help develop OpenStreetMap — all the software that powers OSM can be downloaded and run on your own machine. Having a dev account doesn't give you any special abilities when doing development. But for some tasks where your own resources aren't sufficient, you can request an account.

The Server

The Gorilla-server.svgDev/Tool Server is running Ubuntu 12.04 (Precise Pangolin). Major packages are updated from time to time. This will help ensure development packages remain compatible with recent software releases, and enable development against the newest and greatest software. On the other hand, expect packages to break!

Getting An Account

First you should read the Dev Server Account Policy, and then request an account at Dev Server Account. A sysadmin will then get in contact with you to sort things out and give you your password.

Using Your Account


You can login to the server using the SSH protocol. For Windows users, the Putty SSH Client is available at PuTTY download or if you prefer a command line ssh try the OpenSSH version from Cygwin

The server is at

The RSA host key fingerprint is 2c:a9:74:8c:46:d3:2a:50:09:86:3c:1d:f8:dd:8c:6b


Both PostgreSQL and MySQL are available - please contact the dev server administrator if you require access to either of these.

Databases can be administered using the psql and mysql command line tools or the phppgadmin and phpmyadmin web interfaces.


Postgres 8.3 and 9.1 are available, with 9.1 as the default. Command line tools such as psql can select which one to use with the "--cluster x.y/main" switch and network connections should use port 5432 for 8.3 and port 5433 for 9.1.

See pg_wrapper(1) for different ways to set your choice permanently. Also note that the contrib module isn't available for 8.3, so if you want e.g. hstore you'll need to use 9.1.

Apache User Directories

Every user on the dev server has web space at

This is enabled by creating a directory named public_html in your home directory and placing files within.

CGI scripts can only be executed from the public_html/cgi-bin directory. Scripts will run with your own permissions, so there is no need to make files globally writeable (666).

If problems are experienced with CGI scripts, also try, to view debug output produced by the security wrapper script, which may prevent execution due to bad permissions or other security issues.

PHP scripts are currently executed from anywhere within the public_html tree, but this may change in the future.

Rails Applications

Rails applications can be run from your web space - the server is setup with passenger (aka mod_rails) and will detect correctly configured applications automatically. To run a rails application:

  • Place the application in a subdirectory under your home directory (eg: ~/myrailsapp) and configure the database. You will need to set the port number in your database.yml configuration, while commenting out the host section to enable correct authentication with postgresql.
  • Create a symbolic link under public_html that points to the public directory in the rails application (eg: ln -s ~/myrailsapp/public public_html/myrailsapp).
  • Add RailsBaseURI /path to public_html/.htaccess where path is the location of the link relative to the public_html directory.

You should then be able to visit and you see your application.

To restart the application just touch tmp/restart.txt under the rails root directory.

WSGI Applications

Files in the public_html/wsgi-bin directory will be run as WSGI applications.

Flask example

To use a Flask application, first create a .wsgi file in public_html/wsgi-bin/ that imports and runs your app. If you have an application installed at ~/my_application with the main file named, you can create a file my_application.wsgi:

from my_application import site

application =

For the site to be visible at, add RewriteRule ^path/?(.*)$ /wsgi-bin/my_application.wsgi/$1 [P] to public_html/.htaccess.

Dev Apis

For more details see