Database Configuration
This article will detail configuration of the Logship database.
The database is the backbone of any logship deployment. Configuration is specified between the database and backend sections, each providing configurable services with a wide range of capabilities.
You can find an example configuration here or in the logship deployments repository on GitHub.
Example
{
"Logging": {
"LogLevel": {
"Default": "Information",
"Microsoft.Hosting.Lifetime": "Information"
}
},
"agent": {
"udpMetricsEndpoint": "host.docker.internal:49999"
},
"database": {
"enable": true,
"master": {
"enable": true
},
"endpoints": {
"worker": ["net.tcp://0.0.0.0:6000"],
"master": ["net.tcp://127.0.0.1:6000"]
},
"services": {
"keyvalue": {
"enable": true,
"dataPath": "/logship/kvs"
},
"transactionManager": {
"enable": true
},
"transactionLog": {
"enable": true,
"disk": {
"enable": true,
"path": "/logship/tlog"
},
"memory": {
"enable": false
}
},
"gateway": {
"enable": true
},
"partitionManager": {
"enable": true
}
}
},
"backend": {
"enable": true,
"endpoints": {
"worker": ["net.tcp://0.0.0.0:6002"],
"master": ["net.tcp://127.0.0.1:6002"]
},
"database": {
"worker": ["net.tcp://127.0.0.1:6000"],
"master": ["net.tcp://127.0.0.1:6000"]
},
"services": {
"configService": {
"enable": true
},
"inflowService": {
"enable": true
},
"collectorService": {
"enable": true,
"tempPath": "/logship/tmp/"
},
"searchExecutorService": {
"enable": true,
"dataPath": "/logship/searchdata/",
"minimumFreeSpaceBytes": 5368709120,
"minimumFreeSpacePercentage": 15.0
},
"searchQueryService": {
"enable": true
},
"accountsService": {
"enable": true,
"jwt": {
"enable": true,
"issuer": "logship-example",
"audience": "logship-example",
"signingKey": "this is a secret signing key for locally-signed JWT tokens"
},
"oauth": {
"enable": false
}
},
"messengerService": {
"enable": true
},
"dashboardService": {
"enable": true
},
"evaluatorManagerService": {
"enable": true
},
"evaluatorRunnerService": {
"enable": true
},
"setupService": {
"enable": true,
"provision": true,
"accounts": [
{
"accountId": "00000000-0000-0000-0000-000000000000",
"accountName": "Default Account"
}
],
"users": [
{
"userId": "00000000-0000-0000-0000-00000000cafe",
"username": "admin",
"password": "admin",
"firstname": "Logship",
"lastname": "Admin",
"email": "admin@logship.io",
"defaultGlobalPermissions": [
"Logship.Global.Admin"
],
"defaultAccounts": [
{
"accountName": "Default Account",
"userPermissions": [
"Logship.Account.Admin"
]
}
]
}
]
}
},
"master": {
"enable": true
}
}
}
Config validation can be ignored for services with enable: false.
Production defaults
- Pin explicit image tags (e.g.,
ghcr.io/logship-io/logship-database:0.8.0) and roll forward deliberately. - Persist
/logship on SSD/NVMe; separate data/log volumes when possible. - Keep
minimumFreeSpaceBytes above 5 GB and minimumFreeSpacePercentage above 15% to avoid throttling. - Run distinct masters for backend and database on separate nodes when scaling horizontally.
- Secure endpoints with network ACLs and TLS offload (via reverse proxy) where required.
Logging
See .NET Logging Configuration for more information.
LogLevel
| Property | Type | Required | Description |
|---|
| Default | String | Yes | Specifies the default log level. |
| Microsoft.Hosting.Lifetime | String | Yes | Specifies the log level for Microsoft.Hosting.Lifetime. |
agent
| Property | Type | Required | Description |
|---|
| udpMetricsEndpoint | String | Yes | Specifies the UDP metrics endpoint. |
database
| Property | Type | Required | Description |
|---|
| enable | Boolean | No | Enables or disables the database. |
| master | Boolean | Yes | Enables or disables the master database. |
| endpoints | Object | Yes | Defines endpoints for worker and master. |
| services | Object | Yes | Defines various database services. |
endpoints
worker
| Value | Type | Required | Description |
|---|
| String[] | Yes | Specifies the worker endpoints. |
master
| Value | Type | Required | Description |
|---|
| String[] | Yes | Specifies the master endpoints. |
services
keyvalue
| Property | Type | Required | Description |
|---|
| enable | Boolean | No | Enables or disables the keyvalue service. |
| dataPath | String | Yes | Specifies the data path for keyvalue service. |
transactionManager
| Property | Type | Required | Description |
|---|
| enable | Boolean | No | Enables or disables the transaction manager service. |
transactionLog
| Property | Type | Required | Description |
|---|
| enable | Boolean | No | Enables or disables the transaction log service. |
| disk | Object | Yes | Defines disk settings for the transaction log service. |
| memory | Object | Yes | Defines memory settings for the transaction log service. |
disk
| Property | Type | Required | Description |
|---|
| enable | Boolean | No | Enables or disables disk storage for the transaction log. |
| path | String | Yes | Specifies the path for disk storage of the transaction log. |
memory
| Property | Type | Required | Description |
|---|
| enable | Boolean | No | Enables or disables memory storage for the transaction log. |
gateway
| Property | Type | Required | Description |
|---|
| enable | Boolean | No | Enables or disables the gateway service. |
partitionManager
| Property | Type | Required | Description |
|---|
| enable | Boolean | No | Enables or disables the partition manager service. |
backend
| Property | Type | Required | Description |
|---|
| enable | Boolean | No | Enables or disables the backend service. |
| endpoints | Object | Yes | Defines endpoints for worker and master. |
| database | Object | Yes | Defines database settings for worker and master. |
| services | Object | Yes | Defines various backend services. |
| master | Boolean | Yes | Enables or disables the master backend service. |
endpoints
worker
| Value | Type | Required | Description |
|---|
| String[] | Yes | Specifies the worker endpoints. |
master
| Value | Type | Required | Description |
|---|
| String[] | Yes | Specifies the master endpoints. |
database
worker
| Value | Type | Required | Description |
|---|
| String[] | Yes | Specifies the worker database endpoint. |
master
| Value | Type | Required | Description |
|---|
| String[] | Yes | Specifies the master database endpoint. |
services
configService
| Property | Type | Required | Description |
|---|
| enable | Boolean | No | Enables or disables the config service. |
inflowService
| Property | Type | Required | Description |
|---|
| enable | Boolean | No | Enables or disables the inflow service. |
collectorService
| Property | Type | Required | Description |
|---|
| enable | Boolean | No | Enables or disables the collector service. |
| tempPath | String | Yes | Specifies the temporary path for the collector service. |
searchExecutorService
| Property | Type | Required | Description |
|---|
| enable | Boolean | No | Enables or disables the search executor service. |
| dataPath | String | Yes | Specifies the data path for the search executor service. |
| minimumFreeSpaceBytes | Number | Yes | Specifies the minimum free space in bytes for the search executor service. |
| minimumFreeSpacePercentage | Number | Yes | Specifies the minimum free space percentage for the search executor service. |
searchQueryService
| Property | Type | Required | Description |
|---|
| enable | Boolean | No | Enables or disables the search query service. |
accountsService
| Property | Type | Required | Description |
|---|
| enable | Boolean | No | Enables or disables the accounts service. |
| jwt | Object | Yes | Defines JWT settings for the accounts service. |
| oauth | Object | Yes | Defines OAuth settings for the accounts service. |
jwt
| Property | Type | Required | Description |
|---|
| enable | Boolean | No | Enables or disables JWT for the accounts service. |
| issuer | String | Yes | Specifies the issuer for JWT tokens. |
| audience | String | Yes | Specifies the audience for JWT tokens. |
| signingKey | String | Yes | Specifies the signing key for JWT tokens. |
oauth
| Property | Type | Required | Description |
|---|
| enable | Boolean | No | Enables or disables OAuth for the accounts service. |
| clientId | String | Yes | The OAuth Client Id |
| scope | String | Yes | OAuth Logship Scope |
| metadataAddress | String | Yes | OAuth Metadata Address |
| authority | String | Yes | OAuth Authority |
| tokenEndpoint | String | Yes | OAuth Token Endpoint |
| authorizeEndpoint | String | Yes | OAuth Authorizer Endpoint |
| deviceEndpoint | String | Yes | OAuth Device Endpoint |
| validIssuers | String[] | Yes | OAuth Token Issuers |
| validAudiences | String[] | Yes | OAuth Token Audiences (typically your Client Id) |
| createDefaultUser | Boolean | Yes | Create a user for new OAuth logins? |
| defaultUserAccount | String | Yes | If creating a default user, the account ID for the new user |
| userIdClaimType | String | No | If creating a default user, the token claim for a User ID |
| firstNameClaimType | String | No | If creating a default user, the token claim for a User First Name |
| lastNameClaimType | String | No | If creating a default user, the token claim for a User Last Name |
| emailClaimType | String | No | If creating a default user, the token claim for a User Email |
messengerService
| Property | Type | Required | Description |
|---|
| enable | Boolean | No | Enables or disables the messenger service. |
dashboardService
| Property | Type | Required | Description |
|---|
| enable | Boolean | No | Enables or disables the dashboard service. |
evaluatorManagerService
| Property | Type | Required | Description |
|---|
| enable | Boolean | No | Enables or disables the evaluator manager service. |
evaluatorRunnerService
| Property | Type | Required | Description |
|---|
| enable | Boolean | No | Enables or disables the evaluator runner service. |
setupService
The setup service can optionally provision accounts and users on startup (useful for local/dev and automation).
| Property | Type | Required | Description |
|---|
| enable | Boolean | Yes | Enables or disables the setup service. |
| provision | Boolean | Yes | When true, provisions configured accounts/users on startup. |
| accounts | Object[] | No | Accounts to create/ensure exist (when provision: true). |
| users | Object[] | No | Users to create/ensure exist (when provision: true). |
| dashboardProvisioningPath | String | No | Optional path containing dashboard provisioning files. |
accounts[]
| Property | Type | Required | Description |
|---|
| accountId | String | Yes | Account id to create/ensure exists. |
| accountName | String | Yes | Human-friendly account name. |
| override | Boolean | No | Re-provision the account even if it already exists. |
users[]
| Property | Type | Required | Description |
|---|
| userId | String | Yes | User id to create/ensure exists. |
| username | String | Yes | Username for password login. |
| password | String | Yes | Password for password login. |
| firstname | String | Yes | First name. |
| lastname | String | Yes | Last name. |
| email | String | Yes | Email address. |
| override | Boolean | No | Re-provision the user even if it already exists. |
| defaultGlobalPermissions | String[] | No | Global permissions granted to the user. |
| defaultAccounts | Object[] | No | Accounts the user should be added to. |
users[].defaultAccounts[]
| Property | Type | Required | Description |
|---|
| accountName | String | Yes | The account name to add the user to (must exist in accounts[]). |
| userPermissions | String[] | No | Permissions granted to the user in that account. |
master
| Property | Type | Required | Description |
|---|
| enable | Boolean | Yes | Enables or disables the master backend service. |