Skip to main content

Configuration Reference

Values used in snippets are the default properties.

Environment Variables

Properties that have an environment variable specified will still be overridden if the property's value is defined in your conf file.

The order of configuration precedence is:

  1. Property in konifer.conf
  2. Environment variable (for available properties)
  3. Default value (if specified)

Datastore

Properties for configuring the datastore.

data-store {
provider = postgresql
postgresql {
database = konifer
host = localhost
port = 5432
user = postgres
password = ""
}
}
PropertyDescriptionAllowed InputDefaultEnvironment variable
data-store.providerThe implementation of your metadata storein-memory, postgresqlpostgresql
data-store.postgresql.databaseDatabase to use within the RDBMSStringkonifer
data-store.postgresql.hostPostgresql hostStringlocalhost
data-store.postgresql.portPostgresql portInteger5432
data-store.postgresql.userPostgresql userStringpostgresPG_USER
data-store.postgresql.passwordPostgresql passwordString""PG_PASSWORD
data-store.postgresql.ssl-modePostgresql SSL ModeStringprefer

HTTP

http {
public-url = "http://localhost"
}
PropertyDescriptionAllowed InputDefault
http.public-urlThe URL used to resolve content selector links. This is the root public URL of your website/platform/API.Any URL beginning with http:// or https://http://localhost

Object Store

Properties for configuring the datastore.

objectstore {
provider = filesystem
s3 { # No defaults - overrides Default Provider Chain if supplied
access-key = "[no default]"
endpoint-url = "[no default]"
region = "[no default]"
secret-key = "[no default]"
}
filesystem {
mount-path = "[no default]"
}
}
PropertyDescriptionAllowed InputDefaultEnvironment variable
objectstore.providerThe implementation of your object storein-memory, s3, filesystemfilesystem
objectstore.s3.access-key The access key of your S3 (or S3-compatible) object storeStringNone
objectstore.s3.endpoint-urlThe endpoint URL of your S3 (or S3-compatible) object storeStringNone
objectstore.s3.regionThe region of your object storeStringNone
objectstore.s3.secret-keyThe secret key of your object storeStringNoneS3_SECRET_KEY
objectstore.s3.force-path-styleCommunicate with S3 API using path-style or virtual-host styleBooleanfalse
objectstore.filesystem.mount-pathThe path that your filesystem is mounted to within your containerValid linux path (ex: /mnt/store)None

Source

source {
url {
allowed-domains = []
max-bytes = 1048576 # 100MB
}
multipart {
max-bytes = 1048576 # 100MB
}
}
PropertyDescriptionAllowed InputDefault
source.url.allowed-domainsDomains that Konifer is permitted to access when storing assets from a URL sourceAny valid domain[]
source.url.max-bytesMaximum size of supplied asset content downloaded from URL. Will reject assets larger than this.Positive integer representing bytes1048576
source.multipart.max-bytesMaximum size of supplied asset content uploaded from Multipart source. Will reject assets larger than this.Positive integer representing bytes1048576

Variant Profiles

variant-profiles = [
# Empty by default
{
name = ""
}
]
PropertyDescriptionAllowed InputDefault
variant-profilesArray of defined variant profiles that canfor eager variants and on-demand variants.Variant profile object[]
variant-profiles.nameName of the variant profileAny url-safe stringNone

All image transformation parameters can be used within a variant profile object.

Variant Generation

variant-generation {
queue-size = 1000
synchronous-priority = 80
workers = [2 X CPU cores]
}
PropertyDescriptionAllowed InputDefault
variant-generation.queue-sizeAmount of variant generation requests that can be queued up awaiting processing. Requests over this limit suspend the request.Positive integer1000
variant-generation.synchronous-priorityPercentage priority to give to synchronous variant generation tasks. The remaining priority is reversed for async tasks.1-9980
variant-generation.workersAmount of concurrent image processor workersPositive integer2 x CPU cores

URL Signing

url-signing {
enabled = false
algorithm = hmac_sha256
secret-key = "[no default]"
}
PropertyDescriptionAllowed InputDefaultEnvironment variable
url-signing.enabledEnable url-signing for GET requests or notBooleanfalse
url-signing.algorithmHMAC signing algorithm that signatures usehmac_sha256, hmac_sha384, hmac_sha512hmac_sha256
url-signing.secret-keyHMAC secret key used for validating signaturesStringNoneURL_SIGNING_SECRET_KEY

Path Configuration Reference

By default, nothing is configured within paths. If nothing was configured, this is how your paths would be configured by default

paths = [
{
path = "/**" # Match everything greedily after /
image {
lqip = []
}
preprocessing {
enabled = false
image {
# Preprocessing disabled by default
# Populate with URL manipulation parameters i.e. w = 100, h = 200, r = 90, etc.
}
}
eager-variants = []
object-store {
bucket = assets
}
return-format {
redirect {
strategy = none
template {
string = localhost
}
presigned {
enabled = false
ttl = 30m
}
}
}
cache-control {
enabled = false
max-age = "[no default]"
s-maxage = "[no default]"
visibility = "[no default]"
revalidate = "[no default]"
stale-while-revalidate = "[no default]"
stale-if-error = "[no default]"
immutable = false
}
}
]

Image

{
path = "/**"
image {
lqip = []
}
}
PropertyDescriptionAllowed InputDefault
image.lqipLQIP algorithms enabledblurhash, thumbhash[]

Preprocessing

{
path = "/**"
preprocessing {
enabled = false
image {
# Preprocessing disabled by default
}
}
}
PropertyDescriptionAllowed InputDefault
preprocessing.enabled Enable preprocessingBooleanfalse

All image transformation parameters can be used within the image block.

Eager Variants

{
path = "/**"
eager-variants = []
}
PropertyDescriptionAllowed InputDefault
eager-variantsList of variant profiles to generate eager variants fromprofiles names from variant-profiles arrayNone

Object Store

{
path = "/**"
object-store {
bucket = assets
}
}
PropertyDescriptionAllowed InputDefault
object-store.bucketBucket to persist assets and variants in. This can be safely changed without de-referencing existing assets, however, existing assets are not moved to new bucket.Valid bucket nameassets

Return Format

{
path = "/**"
return-format {
redirect {
strategy = none
template {
string = localhost
}
presigned {
ttl = 30m
}
}
}
}
PropertyDescriptionAllowed InputDefault
return-format.redirect.strategyHow to serve redirect URLsnone, presigned, templatenone
return-format.redirect.template.stringTemplate string to use if strategy is templateValid URL stringlocalhost
return-format.redirect.presigned.ttlTime-to-live for presigned redirect URLs if strategy is presignedDuration-style format. Not less than 7 days (7d)30m (30 minutes)

Cache Control

{
path = "/**"
cache-control {
enabled = false
max-age = "[no default]"
s-maxage = "[no default]"
visibility = "[no default]"
revalidate = "[no default]"
stale-while-revalidate = "[no default]"
stale-if-error = "[no default]"
immutable = false
}
}
PropertyDescriptionAllowed InputDefault
enabledWhether the Cache-Control header should be returnedBooleanfalse
max-ageSet the max-age descriptorInteger > 0
s-maxageSet the max-age descriptorInteger > 0
visibilitySet the visbility of the cached assetpublic, private
revalidateCache control revalidationmust-revalidate, proxy-revalidate, no-cache
stale-while-revalidate Set the stale-while-revalidate descriptorInteger > 0
stale-if-error Set the stale-if-error descriptorInteger > 0
immutableWhether to set the immutable descriptorBooleanfalse