Installing OpenPetra on Linux should be fairly easy.

Please note that the server works fine on Linux, but the client is not yet fully reliable. But the more interest and fixes it gets, the chances are higher that the client will become stable on Linux too.

We need for the server a patched version of Mono, for the .Net remoting. In the future we aim to switch away from .net remoting to https, but that is still experimental.
The client should be fine with Mono 2.10 upwards.

Install Mono 3.2.3 with OpenPetra patches:
The mono-openpetra package is available for Debian, Ubuntu and CentOS from
Please follow the instructions there for installing Mono.

I will do this tutorial with Ubuntu LTS 12.04 (precise):

apt-key add - < Release.key echo 'deb /' >> /etc/apt/sources.list.d/mono-openpetra.list
apt-get update
apt-get install mono-openpetra

Next thing is to install Postgresql 9.1:

apt-get install postgresql

Now you download the latest release of OpenPetra for Linux from Sourceforge OpenPetra Downloads:

wget -O openpetraorg-server-debian-postgresql-MyOpenPetra-

There is also a package available for CentOS/RedHat based distributions:

wget -O openpetraorg-server-centos-postgresql-MyOpenPetra-

By the way, the code for this release is currently maintained here:

Now, unpack your server tar.gz file:

tar xzf openpetraorg-server-debian-postgresql-MyOpenPetra-
cd openpetraorg-
# have a look at the INSTALL file
# have a look at; we are not configuring the .net remoting keys at the moment

Next thing, you initialise the database:

/etc/init.d/openpetraMyOpenPetra createdb
/etc/init.d/openpetraMyOpenPetra init
/etc/init.d/openpetraMyOpenPetra start

If you get an error like “Possible cause: Npgsql.NpgsqlException: Failed to establish a connection to ‘localhost’.”, try to edit /etc/postgresql/9.1/main/postgresql.conf and enable listen_addresses = '*'. Then service postgresql restart. I don’t currently know why this is necessary on my computer.

Now you should download an empty database, or a demo database from Sourceforge Demo Databases:

wget -O /tmp/demoWith1ledger.yml.gz

Then load this database:

/etc/init.d/openpetraMyOpenPetra loadYmlGz /tmp/demoWith1ledger.yml.gz

Please note that the path for the demo file must be readable by the user that the openpetra server is running under, that is why I am using the /tmp directory.

For the OpenPetra client on Linux, you also need to install mono-openpetra-libgdiplus:

apt-get install mono-openpetra-libgdiplus

Get the linux client, and unpack it:

wget -O openpetraorg-client-MyOpenPetra-
tar xzf openpetraorg-client-MyOpenPetra-
cd openpetraorg-

At the moment, the communication between client and server is not encrypted. This can be enabled though, or you can use a VPN.
We are working on switching to https, replacing .Net remoting in the near future.

To connect the client to another server than localhost, you need to modify the file etc30/PetraClientRemote.config in the client directory, search for localhost and replace it with the hostname of your server! You might need to work on the firewall settings of the server, to allow communication on port 9000, or change to a more common port, eg. 80.

Known issues in the OpenPetra client for Linux:

  • There will be a message, that the patches cannot be found. Please ignore that, and try to login with user demo and password demo!
  • Partner Find layout of the window is broken.  Sometimes it does not find partners, says: no criteria. Workaround: tab out of current control. It worked for me the second time I opened the Find partner screen.
  • Partner Edit screen: also gives lots of errors. Cannot close without saving, when saving complains about empty address.
    The finance screens (Gift Batch, GL Batch, etc) might work better.

The question is: should we invest into the fat OpenPetra client to run on Linux and on Mac, or should we work on a client running in the browser, eg. based on Twitter Bootstrap, see the OpenPetra Demo with Twitter Bootstrap!

Install OpenPetra on Linux
Tagged on: