Configuration

pryv can be configured using a configuration file. By default, the configuration is read from ~/.pryv/pryv.ini, however you can set the path to the configuration path be either using the PRYV_CONFIG_PATH environment variable or by setting the -c/--config option at start-up, i.e.:

pryv start -c path/to/pryv.ini

The configuration file has the following format:

# Comments
[section]
option1 = value1
option2 = value2

pryv uses three different sections:

Paths

All paths can be given in several format. For use of the local file system (i.e. the machine pryv runs on), you can either use a standard path, or explicitely prefix it with file://:

/some/absolute/path
file:///some/absolute/path

some/relative/path
file://some/relative/path

Relative paths are interpreted as relative to the current working directory.

You can optionally choose to use pryv’s integration with Amazon Web Services (AWS), and in particular write and read files to an AWS S3 Bucket. To enable this behavior, make sure you installed pryv using the aws option (see the quickstart). In addition you should configure you credentials for AWS (see AWS - Configuration and Credential Files for details) and ensure your AWS user has the required access level to the AWS S3 Bucket. Using paths prefixed with s3 will tell pryv to save and load files to an AWS S3 Bucket. Paths should look as below:

s3://bucket-name/key/to/object

where the object can either be a directory or a file.

Core

This section configures the core of pryv: where projects data and packages are stored.

Projects path

This option defines the path to the directory where projects data are stored.

Usage

[core]
projects-path = file:///path/to/projects

Default

file://~/.pryv/projects

Packages path

This option defines the path to the directory where packages are stored.

Usage

[core]
packages-path = file:///path/to/packages

Default

file://~/.pryv/packages

User

This section configures the path to the files were users data are loaded from. These files are used to load authentication data.

Users path

This option defines the path to the file where users data are stored.

Note

If the htpasswd-path option is set, this option is not used.

Warning

The users file contains sensitive data (username and password hash). Make sure its location is safe.

Usage

[user]
users-path = file:///path/to/users.json

Default

file://~/.pryv/users.json

.htpasswd path

This option defines the path to the .htpasswd where users credentials are stored. Use this option if you want to share the credentials among different servers on the same machine. The file at the configured path is expected to be .htpasswd file that meets the required format (see apache’s documentation for details).

Usage

[user]
htpasswd-path = file:///path/to/.htpasswd

Default: None

Server

This section configures the server’s options.

Host

This option defines the host name the server listens to. By default, it is set such that the server only listens for requests from the same machine (i.e. 127.0.0.1). Set its value to 0.0.0.0 to listen to everyone.

Usage

[server]
host = 123.234.123.234

Default

127.0.0.1

Port

This options defines the port the server listens to.

Usage

[server]
port = 1234

Default

5555

Secret key

This option defines the secret key used by the explorer to sign cookies.

Usage

[server]
secret-key = super-secret-key

Default: By default, the server generates a new random secret key each time you start it. It uses the host operating system’s urandom function.

Note

Generating a new random secret key at each start up means all old sessions are obsolete. The users will have to login again.

Debug

This option defines whether the server should show logs or not. If set, logs will be shown on request.

Usage

[server]
debug = true

Default: None