Install Invenio

Now that all the prerequisites have been set up in Install prerequisites, we can proceed with the installation of the Invenio itself. The installation is happening on the web node (

We start by creating and configuring a new Invenio instance, continue by populating it with some example records, and finally we start the web application. This can be done in an automated unattended way by running the following scripts:

source .inveniorc


If you want to install the very-bleeding-edge Invenio packages from GitHub, you can run the script with the --devel argument:

./scripts/ --devel

Let’s see in detail about every Invenio installation step.

Create instance

We start by creating a fresh new Python virtual environment that will hold our brand new Invenio v3.0 instance:

mkvirtualenv "${INVENIO_WEB_VENV}"

We continue by installing Invenio v3.0 Integrated Library System flavour demo site from PyPI:

pip install invenio-app-ils[postgresql,elasticsearch2]

Let’s briefly customise our instance with respect to the location of the database server, the Redis server, the Elasticsearch server, and all the other dependent services in our multi-server environment:

mkdir -p "var/instance/"
pip install "jinja2-cli>=0.6.0"
jinja2 "$scriptpathname/instance.cfg" > "var/instance/${INVENIO_WEB_INSTANCE}.cfg"

In the instance folder, we run Npm to install any JavaScript libraries that Invenio needs:

cdvirtualenv "var/instance/static"
CI=true npm install

We can now collect and build CSS/JS assets of our Invenio instance:

${INVENIO_WEB_INSTANCE} assets build

Our first new Invenio instance is created and ready for loading some example records.

Populate instance

We proceed by creating a dedicated database that will hold persistent data of our installation, such as bibliographic records or user accounts. The database tables can be created as follows:


We continue by creating a user account:

${INVENIO_WEB_INSTANCE} users create \
       "${INVENIO_USER_EMAIL}" \
       --password "${INVENIO_USER_PASS}" \

We can now create the Elasticsearch indexes and initialise the indexing queue:

sleep 20
${INVENIO_WEB_INSTANCE} index queue init

We proceed by populating our Invenio demo instance with some example demo MARCXML records:


Start instance

Let’s now start the web application:


and the web server:

    $sudo service nginx restart

We should now see our demo records on the web:

firefox http://${INVENIO_WEB_HOST}/records/1

and we can access them via REST API:

curl -i -H "Accept: application/json" \

We are done! Our first Invenio v3.0 demo instance is fully up and running.