Environment Variables with Special Scopes

Introduction

Some environment variables have a special, extended or global scope. Variables with special scope are related to a deployment method only. Variables with an extended scope do not directly configure services but functions underneath. Variables with a global scope can configure more than one service.

Examples:

  • The global environment variable OCIS_LOG_LEVEL is available in multiple services.

  • The extended environment variable OCIS_CONFIG_DIR can be used with ocis init.

  • The special environment variable OCIS_RUN_SERVICES is only available with a binary deployment.

Special Environment Variables

The following environment variables are only available with the Binary Setup. Read the Environment Variable Types documentation for important details.

  • 4.0.5

Name Description

OCIS_RUN_SERVICES

A comma-separated list of service names. Will start only the listed services.

OCIS_EXCLUDE_RUN_SERVICES

A comma-separated list of service names. Will start all default services except of the ones listed. Has no effect when OCIS_RUN_SERVICES is set.

OCIS_ADD_RUN_SERVICES

A comma-separated list of service names. Will add the listed services to the default configuration. Has no effect when OCIS_RUN_SERVICES is set. Note that one can add services not started by the default list and exclude services from the default list by using both envvars at the same time.

Note to get the current list of services started by default, you need to run ocis server without restriction which services to start and afterwards ocis list.

Extended Environment Variables

The extended variables are defined in the following way. Read the Environment Variable Types documentation for important details.

  • 4.0.5

Environment variables with extended scope not included in a service
Name Type Default Value Description

MICRO_LOG_LEVEL

string

Error

Set the log level for the internal go micro framework. Only change on supervision of ownCloud Support.

MICRO_REGISTRY

string

Go micro registry type to use. Supported types are: 'nats', 'kubernetes', 'etcd', 'consul', 'memory' and 'mdns'. Will be selected automatically. Only change on supervision of ownCloud Support.

MICRO_REGISTRY_ADDRESS

string

The bind address of the internal go micro framework. Only change on supervision of ownCloud Support.

OCIS_BASE_DATA_PATH

string

'/var/lib/ocis' or '$HOME/.ocis/'

The base directory location used by several services and for user data. Predefined to '/var/lib/ocis' for container images (inside the container) or '$HOME/.ocis/' for binary releases. Services can have, if available, an individual setting with an own environment variable.

OCIS_CONFIG_DIR

string

'/etc/ocis' or '$HOME/.ocis/config'

The default directory location for config files. Predefined to '/etc/ocis' for container images (inside the container) or '$HOME/.ocis/config' for binary releases.

Global Environment Variables

Note that the descriptions of these environment variables may differ depending on the service context.

The global variables are defined in the following way. Read the Environment Variable Types documentation for important details.

  • 4.0.5

Note that some global environment variables have been deprecated and replaced by a new one starting with OCIS_ for naming consistency:

  • All envvars starting with LDAP_

  • All envvars starting with IDM_ except IDM_CREATE_DEMO_USERS

  • The following envvars: REVA_GATEWAY, STORAGE_TRANSFER_SECRET, STORAGE_USERS_OCIS_ASYNC_UPLOADS, USERLOG_MACHINE_AUTH_API_KEY.

  • Note that WEB_UI_CONFIG_FILE is not a global envar and will dropped from the list in a later release.

Environment variables with global scope available in multiple services
Name Services Type Default Value Description

IDM_CREATE_DEMO_USERS

bool

false

Flag to enable or disable the creation of the demo users.

LDAP_BIND_PASSWORD

string

Password to use for authenticating the 'bind_dn'.

OCIS_ADMIN_USER_ID

string

ID of the user who collects all necessary information for deletion. Consider that the UUID can be encoded in some LDAP deployment configurations like in .ldif files. These need to be decoded beforehand.

OCIS_ASYNC_UPLOADS

bool

false

Enable asynchronous file uploads.

OCIS_CACHE_DATABASE

string

ocis

The database name the configured store should use.

OCIS_CACHE_SIZE

int

0

The maximum quantity of items in the user info cache. Only applies when store type 'ocmem' is configured. Defaults to 512.

OCIS_CACHE_STORE

string

memory

The type of the cache store. Supported values are: 'memory', 'ocmem', 'etcd', 'redis', 'redis-sentinel', 'nats-js', 'noop'. See the text description for details.

OCIS_CACHE_STORE_NODES

[]string

[]

A comma separated list of nodes to access the configured store. This has no effect when 'memory' or 'ocmem' stores are configured. Note that the behaviour how nodes are used is dependent on the library of the configured store.

OCIS_CACHE_TTL

Duration

24m0s

Default time to live for user info in the user info cache. Only applied when access tokens has no expiration. The duration can be set as number followed by a unit identifier like s, m or h. Defaults to '10s' (10 seconds).

OCIS_CORS_ALLOW_CREDENTIALS

bool

true

Allow credentials for CORS.See following chapter for more details: Access-Control-Allow-Credentials at https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Access-Control-Allow-Credentials.

OCIS_CORS_ALLOW_HEADERS

[]string

[Origin Accept Content-Type Depth Authorization Ocs-Apirequest If-None-Match If-Match Destination Overwrite X-Request-Id X-Requested-With Tus-Resumable Tus-Checksum-Algorithm Upload-Concat Upload-Length Upload-Metadata Upload-Defer-Length Upload-Expires Upload-Checksum Upload-Offset X-HTTP-Method-Override Cache-Control]

A blank or comma-separated list of allowed CORS headers. See following chapter for more details: Access-Control-Request-Headers at https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Access-Control-Request-Headers.

OCIS_CORS_ALLOW_METHODS

[]string

[OPTIONS HEAD GET PUT POST DELETE MKCOL PROPFIND PROPPATCH MOVE COPY REPORT SEARCH]

A comma-separated list of allowed CORS methods. See following chapter for more details: Access-Control-Request-Method at https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Access-Control-Request-Method

OCIS_CORS_ALLOW_ORIGINS

[]string

[*]

A comma-separated list of allowed CORS origins. See following chapter for more details: Access-Control-Allow-Origin at https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Access-Control-Allow-Origin

OCIS_DECOMPOSEDFS_METADATA_BACKEND

string

messagepack

The backend to use for storing metadata. Supported values are 'messagepack' and 'xattrs'. The setting 'messagepack' uses a dedicated file to store file metadata while 'xattrs' uses extended attributes to store file metadata. Defaults to 'messagepack'.

OCIS_DECOMPOSEDFS_PROPAGATOR

string

sync

The propagator used for decomposedfs. At the moment, only 'sync' is fully supported, 'async' is available as an experimental option.

OCIS_DISABLE_PREVIEWS

bool

false

Set this option to 'true' to disable rendering of thumbnails triggered via webdav access. Note that when disabled, all access to preview related webdav paths will return a 404.

OCIS_EDITION

string

Community

OCIS_EVENTS_CLUSTER

string

ocis-cluster

The clusterID of the event system. The event system is the message queuing service. It is used as message broker for the microservice architecture. Mandatory when using NATS as event system.

OCIS_EVENTS_ENABLE_TLS

bool

false

Enable TLS for the connection to the events broker. The events broker is the ocis service which receives and delivers events between the services..

OCIS_EVENTS_ENDPOINT

string

127.0.0.1:9233

The address of the event system. The event system is the message queuing service. It is used as message broker for the microservice architecture.

OCIS_EVENTS_TLS_ROOT_CA_CERTIFICATE

string

The root CA certificate used to validate the server’s TLS certificate. If provided AUDIT_EVENTS_TLS_INSECURE will be seen as false.

OCIS_GATEWAY_GRPC_ADDR

string

127.0.0.1:9142

The bind address of the GRPC service.

OCIS_GRPC_CLIENT_TLS_CACERT

string

Path/File name for the root CA certificate (in PEM format) used to validate TLS server certificates of the go-micro based grpc services.

OCIS_GRPC_CLIENT_TLS_MODE

string

TLS mode for grpc connection to the go-micro based grpc services. Possible values are 'off', 'insecure' and 'on'. 'off': disables transport security for the clients. 'insecure' allows using transport security, but disables certificate verification (to be used with the autogenerated self-signed certificates). 'on' enables transport security, including server certificate verification.

OCIS_HTTP_TLS_CERTIFICATE

string

Path/File name of the TLS server certificate (in PEM format) for the http services.

OCIS_HTTP_TLS_ENABLED

bool

false

Activates TLS for the http based services using the server certifcate and key configured via OCIS_HTTP_TLS_CERTIFICATE and OCIS_HTTP_TLS_KEY. If OCIS_HTTP_TLS_CERTIFICATE is not set a temporary server certificate is generated - to be used with PROXY_INSECURE_BACKEND=true.

OCIS_HTTP_TLS_KEY

string

Path/File name for the TLS certificate key (in PEM format) for the server certificate to use for the http services.

OCIS_INSECURE

bool

false

Whether to verify the server TLS certificates.

OCIS_JWT_SECRET

string

The secret to mint and validate jwt tokens.

OCIS_KEYCLOAK_BASE_PATH

string

The URL to access keycloak.

OCIS_KEYCLOAK_CLIENT_ID

string

The client id to authenticate with keycloak.

OCIS_KEYCLOAK_CLIENT_REALM

string

The realm the client is defined in.

OCIS_KEYCLOAK_CLIENT_SECRET

string

The client secret to use in authentication.

OCIS_KEYCLOAK_INSECURE_SKIP_VERIFY

bool

false

Disable TLS certificate validation for Keycloak connections. Do not set this in production environments.

OCIS_KEYCLOAK_USER_REALM

string

The realm users are defined.

OCIS_LDAP_BIND_DN

string

uid=reva,ou=sysusers,o=libregraph-idm

LDAP DN to use for simple bind authentication with the target LDAP server.

OCIS_LDAP_BIND_PASSWORD

string

Password to use for authenticating the 'bind_dn'.

OCIS_LDAP_CACERT

string

~/.ocis/idm/ldap.crt

Path/File name for the root CA certificate (in PEM format) used to validate TLS server certificates of the LDAP service. If not defined, the root directory derives from $OCIS_BASE_DATA_PATH:/idm.

OCIS_LDAP_DISABLED_USERS_GROUP_DN

string

cn=DisabledUsersGroup,ou=groups,o=libregraph-idm

The distinguished name of the group to which added users will be classified as disabled when 'disable_user_mechanism' is set to 'group'.

OCIS_LDAP_DISABLE_USER_MECHANISM

string

attribute

An option to control the behavior for disabling users. Valid options are 'none', 'attribute' and 'group'. If set to 'group', disabling a user via API will add the user to the configured group for disabled users, if set to 'attribute' this will be done in the ldap user entry, if set to 'none' the disable request is not processed.

OCIS_LDAP_GROUP_BASE_DN

string

ou=groups,o=libregraph-idm

Search base DN for looking up LDAP groups.

OCIS_LDAP_GROUP_FILTER

string

LDAP filter to add to the default filters for group searches.

OCIS_LDAP_GROUP_OBJECTCLASS

string

groupOfNames

The object class to use for groups in the default group search filter ('groupOfNames').

OCIS_LDAP_GROUP_SCHEMA_DISPLAYNAME

string

cn

LDAP Attribute to use for the displayname of groups (often the same as groupname attribute).

OCIS_LDAP_GROUP_SCHEMA_GROUPNAME

string

cn

LDAP Attribute to use for the name of groups.

OCIS_LDAP_GROUP_SCHEMA_ID

string

ownclouduuid

LDAP Attribute to use as the unique id for groups. This should be a stable globally unique ID like a UUID.

OCIS_LDAP_GROUP_SCHEMA_ID_IS_OCTETSTRING

bool

false

Set this to true if the defined 'id' attribute for groups is of the 'OCTETSTRING' syntax. This is e.g. required when using the 'objectGUID' attribute of Active Directory for the group ID’s.

OCIS_LDAP_GROUP_SCHEMA_MAIL

string

mail

LDAP Attribute to use for the email address of groups (can be empty).

OCIS_LDAP_GROUP_SCHEMA_MEMBER

string

member

LDAP Attribute that is used for group members.

OCIS_LDAP_GROUP_SCOPE

string

sub

LDAP search scope to use when looking up groups. Supported scopes are 'base', 'one' and 'sub'.

OCIS_LDAP_INSECURE

bool

false

Disable TLS certificate validation for the LDAP connections. Do not set this in production environments.

OCIS_LDAP_SERVER_WRITE_ENABLED

bool

true

Allow creating, modifying and deleting LDAP users via the GRAPH API. This can only be set to 'true' when keeping default settings for the LDAP user and group attribute types (the 'OCIS_LDAP_USER_SCHEMA_* and 'OCIS_LDAP_GROUP_SCHEMA_* variables).

OCIS_LDAP_URI

string

ldaps://localhost:9235

URI of the LDAP Server to connect to. Supported URI schemes are 'ldaps://' and 'ldap://'

OCIS_LDAP_USER_BASE_DN

string

ou=users,o=libregraph-idm

Search base DN for looking up LDAP users.

OCIS_LDAP_USER_ENABLED_ATTRIBUTE

string

ownCloudUserEnabled

LDAP Attribute to use as a flag telling if the user is enabled or disabled.

OCIS_LDAP_USER_FILTER

string

LDAP filter to add to the default filters for user search like '(objectclass=ownCloud)'.

OCIS_LDAP_USER_OBJECTCLASS

string

inetOrgPerson

The object class to use for users in the default user search filter ('inetOrgPerson').

OCIS_LDAP_USER_SCHEMA_DISPLAYNAME

string

displayname

LDAP Attribute to use for the displayname of users.

OCIS_LDAP_USER_SCHEMA_ID

string

ownclouduuid

LDAP Attribute to use as the unique id for users. This should be a stable globally unique id like a UUID.

OCIS_LDAP_USER_SCHEMA_ID_IS_OCTETSTRING

bool

false

Set this to true if the defined 'ID' attribute for users is of the 'OCTETSTRING' syntax. This is e.g. required when using the 'objectGUID' attribute of Active Directory for the user ID’s.

OCIS_LDAP_USER_SCHEMA_MAIL

string

mail

LDAP Attribute to use for the email address of users.

OCIS_LDAP_USER_SCHEMA_USERNAME

string

uid

LDAP Attribute to use for username of users.

OCIS_LDAP_USER_SCHEMA_USER_TYPE

string

ownCloudUserType

LDAP Attribute to distinguish between 'Member' and 'Guest' users. Default is 'ownCloudUserType'.

OCIS_LDAP_USER_SCOPE

string

sub

LDAP search scope to use when looking up users. Supported scopes are 'base', 'one' and 'sub'.

OCIS_LOG_COLOR

bool

false

Activates colorized log output.

OCIS_LOG_FILE

string

The path to the log file. Activates logging to this file if set.

OCIS_LOG_LEVEL

string

The log level. Valid values are: 'panic', 'fatal', 'error', 'warn', 'info', 'debug', 'trace'.

OCIS_LOG_PRETTY

bool

false

Activates pretty log output.

OCIS_MACHINE_AUTH_API_KEY

string

Machine auth API key used to validate internal requests necessary for the access to resources from other services.

OCIS_OIDC_ISSUER

string

https://localhost:9200

The identity provider value to set in the group IDs of the CS3 group objects for groups returned by this group provider.

OCIS_PERSISTENT_STORE

string

memory

The type of the store. Supported values are: 'memory', 'ocmem', 'etcd', 'redis', 'redis-sentinel', 'nats-js', 'noop'. See the text description for details.

OCIS_PERSISTENT_STORE_NODES

[]string

[]

A comma separated list of nodes to access the configured store. This has no effect when 'memory' or 'ocmem' stores are configured. Note that the behaviour how nodes are used is dependent on the library of the configured store.

OCIS_PERSISTENT_STORE_SIZE

int

0

The maximum quantity of items in the store. Only applies when store type 'ocmem' is configured. Defaults to 512.

OCIS_PERSISTENT_STORE_TTL

Duration

336h0m0s

Time to live for events in the store. The duration can be set as number followed by a unit identifier like s, m or h. Defaults to '336h' (2 weeks).

OCIS_REVA_GATEWAY

string

com.owncloud.api.gateway

The CS3 gateway endpoint.

OCIS_SHARING_PUBLIC_WRITEABLE_SHARE_MUST_HAVE_PASSWORD

bool

false

Set this to true if you want to enforce passwords on Uploader, Editor or Contributor shares.

OCIS_SPACES_MAX_QUOTA

uint64

0

Set the global max quota value in bytes. A value of 0 equals unlimited. The value is provided via capabilities.

OCIS_SYSTEM_USER_API_KEY

string

API key for the STORAGE-SYSTEM system user.

OCIS_SYSTEM_USER_ID

string

ID of the oCIS storage-system system user. Admins need to set the ID for the STORAGE-SYSTEM system user in this config option which is then used to reference the user. Any reasonable long string is possible, preferably this would be an UUIDv4 format.

OCIS_SYSTEM_USER_IDP

string

internal

IDP of the oCIS STORAGE-SYSTEM system user.

OCIS_TRACING_COLLECTOR

string

The HTTP endpoint for sending spans directly to a collector, i.e. http://jaeger-collector:14268/api/traces. Only used if the tracing endpoint is unset.

OCIS_TRACING_ENABLED

bool

false

Activates tracing.

OCIS_TRACING_ENDPOINT

string

The endpoint of the tracing agent.

OCIS_TRACING_TYPE

string

The type of tracing. Defaults to '', which is the same as 'jaeger'. Allowed tracing types are 'jaeger' and '' as of now.

OCIS_TRANSFER_SECRET

string

The storage transfer secret.

OCIS_URL

string

https://localhost:9200

The identity provider value to set in the group IDs of the CS3 group objects for groups returned by this group provider.

STORAGE_USERS_ASYNC_PROPAGATOR_PROPAGATION_DELAY

Duration

0s

The delay in seconds between a change made to a tree and the propagation start on treesize and treetime. Multiple propagations are computed to a single one.

STORAGE_USERS_PERMISSION_ENDPOINT

string

com.owncloud.api.settings

Endpoint of the permissions service. The endpoints can differ for 'ocis' and 's3ng'.

USERLOG_MACHINE_AUTH_API_KEY

string

Machine auth API key used to validate internal requests necessary to access resources from other services.

WEB_UI_CONFIG_FILE

string

Read the ownCloud Web json based configuration from this path/file. The config file takes precedence over WEB_OPTION_xxx environment variables. See the text description for more details.