Skip to content
This repository

This is mySociety's popular map-based reporting platform: easy to install in new countries and regions

branch: packaging

This branch is 0 commits ahead and 3073 commits behind master

Fetching latest commit…


Cannot retrieve the latest commit at this time

Octocat-spinner-32 android
Octocat-spinner-32 bin
Octocat-spinner-32 commonlib @ 7486b07
Octocat-spinner-32 conf
Octocat-spinner-32 data
Octocat-spinner-32 db
Octocat-spinner-32 iphone
Octocat-spinner-32 locale
Octocat-spinner-32 notes
Octocat-spinner-32 perl-external
Octocat-spinner-32 perllib
Octocat-spinner-32 script Move to web directory February 22, 2011
Octocat-spinner-32 t
Octocat-spinner-32 templates
Octocat-spinner-32 web
Octocat-spinner-32 .gitignore
Octocat-spinner-32 .gitmodules Adding commonlib as submodule January 25, 2010
Octocat-spinner-32 LICENSE.txt
Octocat-spinner-32 Makefile.PL
Octocat-spinner-32 README.pod
Octocat-spinner-32 carton.lock
Octocat-spinner-32 move location of use List::MoreUtils to make sure we get our version January 12, 2012
Octocat-spinner-32 urls.txt




FixMyStreet is a project that allows anyone to report an issue such as potholes, broken street lights, severe littering, water leaks. These issues are then routed to the correct body who can arrange to have them fixed. By default it supports routing problems via email or using an Open311 WebService.

It's written in Perl and uses the Catalyst web framework.



If you're reasonably sure what you are doing then you can follow the quickstart instructions. Otherwise there are more detailed instructions further down.

  • Fetch the latest version from Github
  • Untar this in the vhost directory
  • Create a new PostGIS enabled database
  • Run db/schema.sql and the db/alert_types.sql
  • Run ./bin/install_perl_modules
  • Create a new Apache vhost based on conf/httpd-conf.example
  • Copy conf/general.yml-example to conf/general.yml and update the defaults accordingly
  • Generate the CSS by running bin/make_css
  • Restart the webserver
  • Install the crontab from conf/crontab


Fetch the latest version from github


On the server you are installing FixMyStreet on you will need the following things:

Software requirements

  • PostgreSQL and the PostGis extension
  • Perl 5.8 or above
  • ImageMagick and the perl bindings.
  • A webserver that supports FastCGI
  • gettext
  • The CSS for FixMyStreet is generated from SCSS sources so you will need a SCSS to CSS convertor. You can get one from

If you're expecting a lot of traffic it's recommended that you install memcached

If you are using a Debian based linux distribution there is a list of relevant packages in conf/packages.

Service dependencies

For most uses of FixMyStreet you'll also need access to a MaPit server with data for the types of bodies you are reporting issues to. For more details on how to install MaPit see the mapit pypi page

You will also need a Tile Server to serve up Map tiles. FixMyStreet can use Google, Bing and OpenStreetMap Tile servers.

Finally, you will need a geolocation service to turn addresses into longitude and latitudes. FixMyStreet currently includes code to use both Bing and Google geolocation services.


Unpacking the Code

Once you've downloaded the code you should unpack it. The best place to do this is in the location you want the web server vhost to be.

Creating the database

The default settings file assumes the database is called fms and the user the same. You can change these if you like.

The database you create for FixMyStreet should be a PostGis enabled one. The best way to do this is to use a PostGIS template database. There are good instructions on how to create one on the django site as well as some bash scripts that automate the process.

Set up the database

Once you've created the database you can use the sql in db/schema.sql to create the required tables, triggers and stored procedures. You will also need to run db/alert_types.sql which populates the alert_types table.

Install Perl modules

FixMyStreet uses a number of CPAN modules which are installed by the install_perl_modules script. This will install them into a directory called local.

It uses cpanminus and Carton under the hood but should install these of they are missing. You may need to install some source packages to allow some of the included modules to be built, including:

The GMP math library

You will also need a development toolchain in place ( gcc, make etc )

If you need to add a module manually you can do it using:

    ./bin/cron_wrapper ./local/bin/carton install Module::To::Add

which will install the module into the local directory

Set up Webserver

It is recommended that you run FixMyStreet using FastCGI. It should also be possible to run it using Plack/PSGI.

There is an example Apache vhost configuration file on conf/httpd.conf-example which you can copy and update the paths in if you are running FixMyStreet under FastCGI.

If you are using Apache and the sample configuration you will need the following modules enabled:

  • mod_rewrite
  • mod_proxy
  • mod_expires
  • mod_fastcgi


The settings for FixMyStreet are defined in conf/general.yml using the YAML markup language. There are some defaults in conf/general.yml-example which you should copy to conf/general.yml.

The bare minimum of settings you will need to fill in or update are:


This is the password for the database.


The URL for the homepage of your FixMyStreet install.


The email domain that emails will be sent from


The email address to be used on the site for the contact us form.


If this is 1 then all email ( alerts and reports ) will be sent to the contact email address. Use this for development sites.


This is the location where imaged will be stored as they are being uploaded. It should be accessible by and writeable by the FixMyStreet process.


This is the location where Geolocation data will be cached. It should be accessible by and writeable by the FixMyStreet process.

If you are using Bing or Google maps you should also set one of BING_MAPS_API_KEY or GOOGLE_MAPS_API_KEY.

If you are using a MaPit install you should update MAPIT_URL.

Generate CSS

There is a script, bin/make_css, that uses sass to convert the SCSS files to CSS files.

Restart the webserver

At this point you be able to restart the webserver and see your FixMyStreet installation at the configured URL.

Cron jobs

There is an example crontab in conf/crontab.ugly. At the moment this is in the format used by mySociety's internal deployment tools. To convert this to a valid crontab the following should be done:

  • Replace !!(*= $user *)!! with the name of the user the cron should run under
  • Replace !!(* $vhost *)!! with the path to the FixMyStreet code.

Check it's working

You can run the unit tests using prove -r t in the FixMyStreet directory. Note that this may leave entries in your database at the moment and should not be run on a live site.

Next Steps

The admin site should be protected using HTTP AUTH.

Customise your install using Templates, CSS and a Cobrand module. See "customisation.pod" in notes for details.

Add contact details for authorities and categories using the admin interface.

Add authority data to the MaPit install if required.



By default FixMyStreet uses the en_GB.UTF-8 locale. If it is not installed then it may not start

Template caching

FixMyStreet caches compiled templates alongside the source files so the templates directory needs to be writable by the process that is running FixMyStreet.

Image::Magick perl module

If your OS has a way to install a binary version of Image::Magick then it's recommended that you do that rather than install via CPAN.

Something went wrong with that request. Please try again.