How to install latest privacyIDEA

Hello,
I’d like to install and start using the privacyIDEA server. However, I haven’t found any official way to install privacyIDEA.

The documentation (https://privacyidea.readthedocs.io/en/latest/installation/index.html) describes several ways. However, they all look very old.
E.g. for Debian, Wheezy and Jessie are unsupported in the long run.

The Ubuntu tutorial (https://privacyidea.readthedocs.io/en/latest/installation/ubuntu.html#ubuntu-packages) states: “Starting with privacyIDEA 3.0 packages are available for Ubuntu 16.04LTS and 18.04LTS”.
However, I have not found a functional package repository anywhere.

The repository of the link in the “http://lancelot.netknights.it/community/bionic/stable” don’t work.
The PPA package source for Ubuntu has the latest package from 2018 and almost no packages in it.

When I searched for privacyIDEA in pypi (https://pypi.org/project/privacyIDEA/), the latest version is from December 2019.
Is installation via python pip the best way?

Instruction: https://privacyidea.readthedocs.io/en/latest/installation/pip.html don’t work. At least it is necessary to install via pip package “Flask-Versioned”.
Next, the command “pi-manage runserver” is given for running. The documentation does not solve startup at system startup. How is my privacyIDEA running? Should I write a systemd service, who runs the command?

According to the documentation, privacyIDEA relies on unsupported Python 2.7. Do I have to use unsupported Python, or can I use Python 3?

I’d like to install privacyIDEA on Debian 10. Is this possible?
What is the best way to install?

And is there any actual documentation?

Thank you,
Martin

You are right, a lot of the top level entry points are outdated (like not mentioning PI runs with Python 3.5, 3.6, 3.7). I am sorry for this. Unfortunately we did not receive any pull requests regarding this from the community.

Let me put some things straight here. The installation of privacyIDEA e.g.with the python package index and with the Ubuntu repositories work very smoothly. There are reasons, why they did not work out for you.

With the Python package index the reason is, you did not read the documentation you are complaining about properly. You obviously forgot to run a pip install -r lib/privacyidea/requirements.txt.
(It will install flask-versioned and all other packages in the supported versions)

I can not know the reasons, why the Ubuntu installation does not work out for you, since you only mentioned “it does not work”. It works for a lot of other people. So it would be helpfull if you mention, what you did and what error you experienced.

Besides that your post rather looks to me like a frustrated complaining than helpful information with the intent to get help. I always would like to ignore such posts, but it is really hard for me, to not answer. But hey, thanks for pointing out, that we need to update the documentation entry points.

You can install privacyIDEA on Debian 10. From the python package index.
(Noone from the community built deb packages for Debian 10.)

Yes, there is a current documentation. It is https://privacyidea.readthedocs.io.

The original author explained in detail what steps he took and what problems he encountered. You are saying yourself that the documentation is very outdated in different places. It is bid sad to see this post discredited like this. :-/

I appreciate a lot what PI had archived in the past years and also knowledge that you are a big part of this. But let us improve the situation together instead of dropping to such a tone.

He did describe what problems he had and asked if there is any current documentation. I do very much understand his frustration as I am going through the very same frustrating process right now.

The docs state ‘To achieve a deterministic installation, you can now pin the installed versions to our tested versions like this’ which does sound like an optional step to pin the deps. My naive assumption is that after installing the package ‘privacyidea’ I would have all dependencies installed required to run ‘privacyidea’. Not a pip expert here, but that does sound like a packaging issue.

Granted, I need to run debian 9 (oldstable) which complicates things.

The version from pip does come with a lot of different dependencies that need to be built when running the pip process, like psycopg2. Even if I do not need postgres support. It requires libpq-dev and python3-dev… and now my pip is throwing yet another error at me.

I assume the current issue about the documentation would be https://github.com/privacyidea/privacyidea/issues/1967

I am not able to address all of the sub-tasks of this issue, but if I ever get it installed, I will happily create a PR and add what I found out.

Sincrely
Draget

2 Likes

Sounds like you are facing the same issues as I do :slight_smile:
I’m running Debian9 as well, installed from PyPI, tossed in python3.5 and mariadb10.4. Found some apache-config for PI on github.

Now I’m stuck with this error:

mod_wsgi (pid=18889): Target WSGI script '/opt/privacyidea/etc/privacyidea/privacyideaapp.wsgi' cannot be loaded as Python module.
mod_wsgi (pid=18889): Exception occurred processing WSGI script '/opt/privacyidea/etc/privacyidea/privacyideaapp.wsgi'.
Traceback (most recent call last):
  File "/opt/privacyidea/etc/privacyidea/privacyideaapp.wsgi", line 3, in <module>
    from privacyidea.app import create_app
ImportError: No module named 'privacyidea'
mod_wsgi (pid=18889): Target WSGI script '/opt/privacyidea/etc/privacyidea/privacyideaapp.wsgi' cannot be loaded as Python module.

You wouldn’t have seen that error yourself?
Or have a few pointers what you did to get things up and running?

Found the missing piece:
I needed to add
WSGIPythonHome /opt/privacyidea

to the file /etc/apache2/mods-enabled/wsgi.conf