Installing OpenPSA

OpenPSA can run on any Linux or Mac OS machine. You'll need roughly the following:

  • a web server (Apache, nginx, and lighttpd are known to work)
  • a database (MySQL, SQLite, PostgreSQL and others)
  • PHP 5.3.3+
  • Memcache & bytecode cache (e.g. APC) are recommended

Installing via Composer

You can install OpenPSA via Composer from Packagist. Simply require it in your composer.json and run composer install.

Manual Installation

Alternatively, you can clone the OpenPSA repository from github like so:

$ git clone git://

Change into the new directory and run composer install to install PHP dependencies

Database Setup

Install the midgard-portable backend by including it in your composer.json:

$ php composer.phar require openpsa/midgard-portable

Then, create a new database, and save the connection information in config/

Next, set it up for OpenPSA usage with openpsa/installer. This can be done by running:

$ ./vendor/bin/openpsa-installer midgard2:setup

The installer will ask you about the database type and some related settings. When finished, it will write a file called midgard.ini with the connection information.

Setting up Lighttpd

Link OpenPSA's web directory to your document root:

$ ln -s [your-project-root-dir]/web /var/www/[your-project-name]

Enable rewrite and fastcgi modules in your Lighttpd config (by default /etc/lighttpd/lighttpd.conf):

server.modules += (

Also enable FastCGI to talk to your PHP installation:

fastcgi.server = ( 
    ".php" => (
            "bin-path" => "/usr/bin/php-cgi",
            "socket" => "/tmp/php.socket"

Then just configure your Lighttpd to pass all requests to the OpenPSA rootfile:

url.rewrite-once = ( 
    "^/midcom-static/OpenPsa2/(.*)$" => "/themes/OpenPsa2/static/$1",
    "^/midcom-static/(.*)$" => "/static/$1",
    "^([^\?]*)(\?(.+))?$" => "rootfile.php$2"

Restart your Lighttpd and point your browser to the address you're using with the server. Default login to OpenPSA is admin/password.


Installing on Apache involves the same steps: Enable PHP and mod_rewrite and set up the appropriate rules. Restart the web server and you're good to go.


To use the Midgard2 extension instead of the PHP-only midgard-portable library, you need php-cgi (typically at /etc/php5/cgi/conf.d/midgard2.ini) with some settings that open a Midgard2 database connection:

midgard.engine = On
midgard.http = On

Midgard 1

Alternatively, you can also run OpenPSA on a Midgard1 backend. You'll find the necessary Midgard packages here. After installing, run

datagard -a install -p openpsa

Layout Copyright © 2006 Finnish Teleservice Center Ltd Oy - Site Powered by Midgard CMS, hosted by CONTENT CONTROL