SOTA Server has a number of configuration options that can be set using environment variables. In general, the defaults are sane options for running a local development instance. The docker-compose files also set a number of these environment variables to values which are sane defaults for a Docker-based local setup.

Core configuration options

Value Default Description

AKKA_HTTP_REQUEST_TIMEOUT

15 minutes

HTTP request timeout.

AKKA_HTTP_IDLE_TIMEOUT

15 minutes

HTTP idle timeout.

BIND_HOST

“0.0.0.0”

Hosts Core should listen on.

BIND_PORT

8080

Port number Core should run on.

CORE_INTERACTION_PROTOCOL

“http”

Interaction protocol for clients. May be “http” or “rvi”.

DEFAULT_NAMESPACE

“default”

Default namespace to use, if not otherwise specified.

CORE_AWS_ACCESS_KEY

null

AWS access key for package storage. If undefined, packages will be stored locally on Core.

CORE_AWS_SECRET_KEY

null

AWS secret key for package storage. If undefined, packages will be stored locally on Core.

CORE_AWS_BUCKET_ID

null

AWS S3 bucket ID for package storage. If undefined, packages will be stored locally on Core.

RVI_URI

"http://127.0.0.1:8801"

URI for the RVI server node, if RVI is in use.

SOTA_SERVICES_URI

URI to register with RVI for SOTA services. Should normally be the rvi endpoint at Core’s ip and port, e.g. “http://core:8080/rvi”.

SOTA_RESOLVER_PORT

8081

Port of the Resolver.

SOTA_RESOLVER_HOST

localhost

Location of the Resolver.

DEVICE_REGISTRY_PORT

8083

Port of the Device Registry.

DEVICE_REGISTRY_HOST

localhost

Location of the Device Registry.

USE_USER_PROFILE

false

Whether or not the User Profile service should be used.

USER_PROFILE_HOST

localhost

Location of the User Profile.

USER_PROFILE_PORT

8081

Port of the User Profile.

PACKAGE_STORAGE_PATH

“/tmp/”

A path on Core to store uploaded packages, if S3 storage is not in use.

PACKAGES_VERSION_FORMAT

"^\d+\.\d+\.\d+$"

A regular expression that package version numbers will be validated against.

PACKAGES_PATH

/usr/local/packages

Location to store packages.

PACKAGES_EXTENSION

rpm

Package container format.

PACKAGES_CHECKSUM_EXTENSION

sha1

Checksum extension for packages.

CORE_DB_URL

"jdbc:mariadb://localhost:3306/sota_core"

The URL of the Core database.

CORE_DB_USER

“sota”

Username with access to the Core database.

CORE_DB_PASSWORD

“s0ta”

Password for Core database user.

DB_NUM_THREADS

10

DB_QUEUE_SIZE

1000

DB_CONNECTION_TIMEOUT

1s

DB_VALIDATION_TIMEOUT

1s

DB_MIGRATE

FALSE

When set to true, runs database migrations on startup.

AUTH_PROTOCOL

“oauth.accesstoken”

The protocol to use for authentication. OAuth will require some integration work; “none” will disable authentication for devices. (If RVI is enabled, authentication is handled through RVI.)

AUTH_VERIFICATION

“local”

If Oauth is being used for authentication, defines how tokens should be verified. Currently, valid options are “none”, “local”, and “auth-plus”. An Oauth implementation would require defining a new validation method.

JWT_SECRET

A secret for JSON Web Tokens.

SCOPES_DOMAIN

empty string

Config option for a future feature. Currently unused.

AUTH_PLUS_HOST

localhost

Location of Auth Plus.

AUTH_PLUS_PORT

9001

Port of Auth Plus.

AUTH_PLUS_CLIENT_ID

Auth Plus client id.

AUTH_PLUS_CLIENT_SECRET

Auth Plus client secret.

USE_TUF

false

Whether or not TUF should be used.

TUF_REPOSERVER_HOST

localhost

Location of the TUF service.

Resolver configuration options

Value Default Description

AUTH_PROTOCOL

oauth.idtoken

The protocol to use for authentication. OAuth will require some integration work; “none” will disable authentication for devices. (If RVI is enabled, authentication is handled through RVI.)

JWT_SECRET

A secret for JSON Web Tokens.

SCOPES_DOMAIN

“”

Config option for a future feature. Currently unused.

DEVICE_REGISTRY_PORT

8083

Port of the Device Registry.

DEVICE_REGISTRY_HOST

localhost

Location of the Device Registry.

BIND_HOST

localhost

Host to listen for connections on.

BIND_PORT

8081

Port to listen on.

DEFAULT_NAMESPACE

default

Default namespace to use, if not otherwise specified.

RESOLVER_DB_URL

jdbc:mariadb://localhost:3306/sota_resolver

The URL of the resolver database.

RESOLVER_DB_USER

sota

Username with access to the resolver database.

RESOLVER_DB_PASSWORD

s0ta

Password for resolver database user.

DB_NUM_THREADS

10

DB_QUEUE_SIZE

1000

DB_CONNECTION_TIMEOUT

1s

DB_VALIDATION_TIMEOUT

1s

RESOLVER_DB_MIGRATE

FALSE

When set to true, runs database migrations on startup.

PACKAGES_VERSION_FORMAT

"^\d+\.\d+\.\d+$"

A regular expression that package version numbers will be validated against.

Device Registry configuration options

Value Default Description

AUTH_PROTOCOL

oauth.idtoken

The protocol to use for authentication. OAuth will require some integration work; “none” will disable authentication for devices. (If RVI is enabled, authentication is handled through RVI.)

SCOPES_DOMAIN

“”

Config option for a future feature. Currently unused.

BIND_HOST

localhost

Hosts device registry should listen on.

BIND_PORT

8083

Port number device registry should run on.

DEFAULT_NAMESPACE

default

Default namespace to use, if not otherwise specified.

DEVICE_REGISTRY_DB_URL

jdbc:mariadb://localhost:3306/sota_device_registry

The URL of the device registry database.

DEVICE_REGISTRY_DB_USER

sota

Username with access to the device registry database.

DEVICE_REGISTRY_DB_PASSWORD

s0ta

Password for device registry database user.

DB_NUM_THREADS

20

DB_QUEUE_SIZE

1000

DB_CONNECTION_TIMEOUT

1s

DB_VALIDATION_TIMEOUT

1s

DB_MIGRATE

FALSE

When set to true, runs database migrations on startup.

PACKAGES_VERSION_FORMAT

"^\d+\.\d+\.\d+$"

A regular expression that package version numbers will be validated against.

TEST_RANDOM_MINSUCCESSFUL

100

The minimum number of successes for property tests

Web server configuration options

Value Default Description

PACKAGES_VERSION_FORMAT

"^\d+\.\d+\.\d+$"

A regular expression that package version numbers will be validated against.

LDAP_HOST

localhost

The hostname of an LDAP server.

LDAP_PORT

8389

The port the LDAP service is running on.

LDAP_AUTHN_ID

uid=sota,ou=users,dc=genivi,dc=org

LDAP_PASSWORD

“s0ta”

LDAP_KEY_STORE_TYPE

“JKS”

LDAP_KEY_STORE_PATH

“conf/certs/client.jks”

LDAP_KEY_STORE_PASSWORD

LDAP_TRUST_STORE_PATH

"conf/certs/exampletrust.jks"

AUTHN_BASE_DN

ou=users,dc=genivi,dc=org

AUTHN_SEARCH_FILTER

"uid=%s"

LDAP_INMEMORY_ENABLE

null

If set to true, will run an in-memory LDAP server with a few hard-coded users, for easy testing.

CORE_TEST_DB_URL

"jdbc:mariadb://localhost:3306/sota_core"

The URL of the Core test database.

CORE_TEST_DB_USER

“sota”

Username with access to the Core test database.

CORE_TEST_DB_PASSWORD

“s0ta”

Password for Core test database user.

CORE_API_URI

"http://localhost:8080"

Core’s URI.

RESOLVER_API_URI

"http://localhost:8081"

Resolver’s URI.

DEVICE_REGISTRY_API_URI

"http://localhost:8083"

Device Registry’s URI.

SOTA_CORE_PORT

8080

Port of the Core.

SOTA_CORE_HOST

localhost

Location of the Core.

SOTA_CORE_API_URI

Uri of the Core.

SOTA_RESOLVER_PORT

8081

Port of the Resolver.

SOTA_RESOLVER_HOST

localhost

Location of the Resolver.

SOTA_RESOLVER_API_URI

Uri of the Resolver.

DEVICE_REGISTRY_PORT

8083

Port of the Device Registry.

DEVICE_REGISTRY_HOST

localhost

Location of the Device Registry.

DEVICE_REGISTRY_API_URI

Uri of the Device Registry.

DOCKER_IP

“localhost”

If you are using docker-machine, set this to your docker-machine IP.