PoWA-web

Installation

You can install PoWA-web either using pip or manually.

On Centos 6, you can avoid installing the header files for Python and PostgreSQL by using the package for psycopg2:

yum install python-pip python-psycopg2
pip install powa-web

Manual install

You’ll need the following dependencies:

debian

apt-get install python python-psycopg2 python-sqlalchemy python-tornado

archlinux

pacman -S python python-psycopg2 python-sqlalchemy python-tornado

fedora

TODO

Then, download the latest release on pypi, uncompress it, and copy the sample configuration file:

wget https://pypi.io/packages/source/p/powa-web/powa-web-3.1.3.tar.gz
tar -zxvf powa-web-3.1.3.tar.gz
cd powa-web-3.1.3
cp ./powa-web.conf-dist ./powa-web.conf
./powa-web

Then, jump on the next section to configure powa-web.

Configuration

The powa-web configuration is stored as a simple python file. Powa-web will search its config as either of these files, in this order:

  • /etc/powa-web.conf
  • ~/.config/powa-web.conf
  • ~/.powa-web.conf
  • ./powa-web.conf

You’ll then be noticed of the address and port on which the UI is available. The default is 0.0.0.0:888, as indicated in this message:

  • [I 161105 20:27:39 powa-web:12] Starting powa-web on 0.0.0.0:8888

The following options are required:

servers (dict):

A dictionary mapping server names to connection information.

servers={
  'main': {
    'host': 'localhost',
    'port': '5432',
    'database': 'powa'
  }
}

Warning

If any of your databases is not in utf8 encoding, you should specify a client_encoding option as shown below. This requires at least psycopg2 version 2.4.3
servers={
  'main': {
    'host': 'localhost',
    'port': '5432',
    'database': 'powa',
    'query': {'client_encoding': 'utf8'}
  }
}

Note

You can set a username and password to allow logging into powa-web without providing credentials. In this case, the powa-web.conf file must be modified like this:
servers={
  'main': {
    'host': 'localhost',
    'port': '5432',
    'database': 'powa',
    'username' : 'pg_username',
    'password' : 'the password',
    'query': {'client_encoding': 'utf8'}
  }
}
cookie_secret (str):

A secret key used to secure cookies transiting between the web browser and the server.

cookie_secret="SECRET_STRING"

The following options are optional:

port (int):
The port on which the UI will be available (default 8888)
address (str):
The IP address on which the UI will be available (default 0.0.0.0)

See also: