Skip to content

Latest commit

 

History

History
51 lines (31 loc) · 1.95 KB

File metadata and controls

51 lines (31 loc) · 1.95 KB

Deployment

Recommended production setup with a virtualenv, uWSGI, and systemd.

  1. Use webpass.service.example as a guide for where the Python virtualenv should live.

  2. Create a new Python virtualenv in that location (matching the service file) with appropriate permissions. You may want a dedicated user added to the web server group (www-data or equivalent).

  3. Clone this repository somewhere on the host.

  4. Activate the virtualenv:

source /path/to/venv/bin/activate
  1. Install the package:
pip install /path/to/cloned/repo
  1. Create webpass.ini from webpass.ini.example and place it in the virtualenv root.

  2. Place wsgi.py in the virtualenv root.

  3. Create a webpass.service from webpass.service.example. Adjust paths, user/groups, and set APP_PATH to the URL path prefix for the app on the host.

  4. Copy the unit file to /etc/systemd/system and run systemctl daemon-reload.

  5. Start the service once so it creates the instance folder. It will likely crash without a database; stop it afterward.

  6. Find the instance folder under the virtualenv (typically under a var path for the package).

  7. Put a config.py and your passwords.kdbx file in that instance folder. See Examples.

  8. Reverse proxy with nginx, for example:

location /password {
    include uwsgi_params;
    uwsgi_pass unix:/srv/http/webpass-venv/webpass.sock;
}

With Apache, unix sockets may not work; configure uWSGI with a TCP listener instead and adjust webpass.ini accordingly. See the uWSGI configuration docs.

  1. Create a static directory in the webroot for that virtual host and copy the js and css folders from the pywebpass package static directory into it.

  2. Reload/restart nginx (or Apache) and restart webpass.service.