io7m | single-page | multi-page | epub | Idstore User Manual 0.0.6
2. Installation
Previous
2. Installation
Up
2.2. Admin Client Installation
Next

# 2.1. Server Installation

- 2.1.1. Overview
- 2.1.2. PostgreSQL
- 2.1.3. Podman/Docker
- 2.1.4. Maven Central
- 2.1.5. Initialization
- 2.1.6. Running

## 2.1.1. Overview

1
The idstore server package is available from several sources:

### 2.1.1.2. Sources

- Podman / Docker
- Maven Central

3
Regardless of the distribution method, the idstore package will contain a command named idstore that acts as the main entrypoint to all of the server's functionality. The idstore command expects environment variables named IDSTORE_SERVER_HOME and IDSTORE_SERVER_LOG_DIRECTORY to be defined that point to the installation directory and log directory, respectively. See the documentation for the installation methods below for details.

## 2.1.2. PostgreSQL

1
The idstore server requires a PostgreSQL server. The idstore server will create the required tables and database objects on first startup, given the name of a running PostgreSQL database, and a PostgreSQL role and password.

## 2.1.3. Podman/Docker

1
The idstore package can be installed from Docker Hub using docker or podman.

### 2.1.3.2. Docker/Podman Pull

    $ docker pull docker.io/io7m/idstore:0.0.6

    $ podman pull docker.io/io7m/idstore:0.0.6

3
The image is configured such that IDSTORE_SERVER_HOME=/idstore, with the idstore command existing at /idstore/bin/idstore, and IDSTORE_SERVER_LOG_DIRECTORY=/idstore/log. The image is configured with the expectation that users will mount a volume at /idstore/etc containing a configuration file, and a volume at /idstore/log that will contain log files. The container can otherwise be run without any privileges, and with a read-only root filesystem.

### 2.1.3.4. Run

    $ podman run \
    --read-only \
    --volume /x/y/a:/idstore/etc:Z \
    --volume /x/y/b:/idstore/log:Z \
    -i \
    -t \
    docker.io/io7m/idstore:0.0.6 idstore
    info: Usage: idstore [options] [command] [command options]
    ...

## 2.1.4. Maven Central

1
A distribution package can be found at Maven Central.
2
The idstore command requires that a Java 17+ compatible JVM be accessible via /usr/bin/env java.
3
Verify the integrity of the distribution zip file:

### 2.1.4.4. Verify

    $ gpg --verify com.io7m.idstore.server.main-0.0.6-distribution.zip.asc
    gpg: assuming signed data in 'com.io7m.idstore.server.main-0.0.6-distribution.zip.asc'
    gpg: Signature made Tue 28 Jun 2022 15:01:56 GMT
    gpg:                using RSA key 3CCE59428B30462D10459909C5607DA146E128B8
    gpg:                issuer "contact@io7m.com"
    gpg: using pgp trust model
    gpg: Good signature from "io7m.com (2022 maven-rsa-key) <contact@io7m.com>" [unknown]

5
Unzip the zip file, and set up the environment appropriately:

### 2.1.4.6. Extract

    $ unzip com.io7m.idstore.server.main-0.0.6-distribution.zip
    $ export IDSTORE_SERVER_HOME=$(realpath idstore)
    $ export IDSTORE_SERVER_LOG_DIRECTORY=/var/log/idstore
    $ ./idstore/bin/idstore
    info: Usage: idstore [options] [command] [command options]
    ...

## 2.1.5. Initialization

1
Given an appropriate configuration file in server.conf, it's necessary to tell idstore to configure the database and create an initial administrator user:

### 2.1.5.2. Initialize

    $ idstore initialize \
      --admin-email 'someone@example.com' \
      --admin-realname 'Someone Else' \
      --admin-username 'someone' \
      --admin-password 12345678 \
      --configuration server.conf

## 2.1.6. Running

1
The server can now be run with idstore server:

### 2.1.6.2. Run

    $ idstore server --configuration server.conf
    info: [localhost/<unresolved>:50000] User API server started
    info: [localhost/<unresolved>:50001] User view server started
    info: [localhost/<unresolved>:51000] Admin API server started

3
The server does not fork into the background and is designed to be run under process supervision.
2. Installation
Previous
2. Installation
Up
2.2. Admin Client Installation
Next
io7m | single-page | multi-page | epub | Idstore User Manual 0.0.6