Operations

Configuration

Every setting of the database server, and how to set it.

The database server reads its settings from appsettings.json, appsettings.{Environment}.json, environment variables and command-line arguments, in that order. In environment variables, use __ for :: OmniCore__Auth__Audience. With occtl, put extra settings in the deployment file's env maps.

Host

Section OmniCore.

SettingDefaultDescription
DataDirectorydataThe folder for every database file. Relative paths are from the content root. In Docker: /data.
DurableWritestrueFlush every write to disk before answering. false survives a process crash but not a power cut, and is faster.
SeedSampleSchemafalse (true in Development)Define the sample Contact, Customer and Staff schema at start-up when the schema is empty.
DefaultPageSize100Page size for lists and queries when $take isn't given.
MaxPageSize1000The largest $take a client may ask for.
InstallBuiltInWebPartstrueWrite OmniCore's own web part packages (the charts and the basic parts) into the resources at start-up, unless the same version is there. A package that can't be written is logged, and the server starts without it.

Authentication

Section OmniCore:Auth. See Authentication and identity for examples.

SettingDefaultDescription
EnabledtrueWhen false, every request is treated as a System Admin, with a warning. Local experiments only.
Authority—The identity provider's issuer URL, such as https://login.microsoftonline.com/{tenant}/v2.0. Keys and the issuer are read from its OpenID metadata.
MetadataAddress{Authority}/.well-known/openid-configurationWhere to read the metadata, when the server shouldn't use the public authority URL (in a cluster, the identity server's internal address). Tokens must still carry the public authority as their issuer.
Audienceomnicore-apiThe audience tokens must be issued for, usually the API's application id.
Issuer—The expected issuer. Taken from the metadata if not set; required with SigningKey.
SigningKey— (a dev key in Development)A shared HMAC-SHA256 key of at least 32 bytes, instead of an authority. Development and tests only.
SubjectClaimsubThe claim that identifies the caller, matched against role assignments. Use oid for Entra ID.
RoleClaim—A claim (such as roles) whose values also count as roles.
ClientId—The public client id tools such as OmniCore Admin should sign in with; advertised by /api/auth/config.
BootstrapAdmins[] (["dev-admin"] in Development)Subjects that are always System Admins.
RequireHttpsMetadatatrueRequire HTTPS for the authority's metadata. false only for a local http:// provider.
EnableDevTokensfalse (true in Development)Turns on POST /api/dev/token. Works only in Development with a SigningKey.

A JSON null in appsettings binds as an empty string. The server treats blank values as not set.

Resources

Section OmniCore:Resources.

SettingDefaultDescription
MaxFileBytes67108864 (64 MB)The largest file that can be uploaded (413 above it).
MaxTotalBytes— (no limit)Uploads are refused (507) once all resources together would pass this.
MaxBytesPerUser— (no limit)Uploads are refused (507) once one user's resources would pass this. System Admins are exempt. Replacing a file counts only the difference.
AdditionalContentTypes{}Extra extension-to-type mappings, which win over the built-in table: { ".owp": "application/zip" }.

Start-up checks

Outside Development, authentication is on, and the server refuses to start until it has an identity provider:

Authentication is enabled but neither OmniCore:Auth:Authority (your identity provider) nor OmniCore:Auth:SigningKey is set.

This is deliberate. Configure an Authority, or set OmniCore:Auth:Enabled=false for local experiments only.

Examples

powershell
# Environment variables, for a container
$env:OmniCore__DataDirectory = "/data"
$env:OmniCore__Auth__Authority = "https://login.microsoftonline.com/<tenant-id>/v2.0"
$env:OmniCore__Auth__Audience = "<api application id>"
$env:OmniCore__MaxPageSize = "500"
yaml
# In an OmniCoreDeployment file
spec:
  database:
    env:
      OmniCore__MaxPageSize: "500"
      OmniCore__Resources__MaxBytesPerUser: "1073741824"

The identity provider

OmniCore.Identity's settings are in the Identity section; see Authentication and identity.