d.val(newStringListValue(&d.Log.Topics,[]string{},","),"log.topics","CORE_LOG_TOPICS",nil,"Show only selected log topics",false,false)
d.val(newIntValue(&d.Log.MaxLines,1000),"log.max_lines","CORE_LOG_MAXLINES",nil,"Number of latest log lines to keep in memory",false,false)
// DB
d.val(newMustDirValue(&d.DB.Dir,"./config"),"db.dir","CORE_DB_DIR",nil,"Directory for holding the operational data",false,false)
// Host
d.val(newStringListValue(&d.Host.Name,[]string{},","),"host.name","CORE_HOST_NAME",nil,"Comma separated list of public host/domain names or IPs",false,false)
d.val(newBoolValue(&d.Host.Auto,true),"host.auto","CORE_HOST_AUTO",nil,"Enable detection of public IP addresses",false,false)
// API
d.val(newBoolValue(&d.API.ReadOnly,false),"api.read_only","CORE_API_READ_ONLY",nil,"Allow only ready only access to the API",false,false)
d.val(newCIDRListValue(&d.API.Access.HTTP.Allow,[]string{},","),"api.access.http.allow","CORE_API_ACCESS_HTTP_ALLOW",nil,"List of IPs in CIDR notation (HTTP traffic)",false,false)
d.val(newCIDRListValue(&d.API.Access.HTTP.Block,[]string{},","),"api.access.http.block","CORE_API_ACCESS_HTTP_BLOCK",nil,"List of IPs in CIDR notation (HTTP traffic)",false,false)
d.val(newCIDRListValue(&d.API.Access.HTTPS.Allow,[]string{},","),"api.access.https.allow","CORE_API_ACCESS_HTTPS_ALLOW",nil,"List of IPs in CIDR notation (HTTPS traffic)",false,false)
d.val(newCIDRListValue(&d.API.Access.HTTPS.Block,[]string{},","),"api.access.https.block","CORE_API_ACCESS_HTTPS_BLOCK",nil,"List of IPs in CIDR notation (HTTPS traffic)",false,false)
d.val(newBoolValue(&d.API.Auth.Enable,false),"api.auth.enable","CORE_API_AUTH_ENABLE",nil,"Enable authentication for all clients",false,false)
d.val(newBoolValue(&d.API.Auth.DisableLocalhost,false),"api.auth.disable_localhost","CORE_API_AUTH_DISABLE_LOCALHOST",nil,"Disable authentication for clients from localhost",false,false)
d.val(newStringValue(&d.API.Auth.JWT.Secret,rand.String(32)),"api.auth.jwt.secret","CORE_API_AUTH_JWT_SECRET",nil,"JWT secret, leave empty for generating a random value",false,true)
d.val(newTenantListValue(&d.API.Auth.Auth0.Tenants,[]Auth0Tenant{},","),"api.auth.auth0.tenants","CORE_API_AUTH_AUTH0_TENANTS",nil,"List of Auth0 tenants",false,false)
d.val(newFileValue(&d.TLS.CertFile,""),"tls.cert_file","CORE_TLS_CERTFILE",nil,"Path to certificate file in PEM format",false,false)
d.val(newFileValue(&d.TLS.KeyFile,""),"tls.key_file","CORE_TLS_KEYFILE",nil,"Path to key file in PEM format",false,false)
// Storage
d.val(newFileValue(&d.Storage.MimeTypes,"./mime.types"),"storage.mimetypes_file","CORE_STORAGE_MIMETYPES_FILE",[]string{"CORE_MIMETYPES_FILE"},"Path to file with mime-types",false,false)
// Storage (Disk)
d.val(newMustDirValue(&d.Storage.Disk.Dir,"./data"),"storage.disk.dir","CORE_STORAGE_DISK_DIR",nil,"Directory on disk, exposed on /",false,false)
d.val(newInt64Value(&d.Storage.Disk.Size,0),"storage.disk.max_size_mbytes","CORE_STORAGE_DISK_MAXSIZEMBYTES",nil,"Max. allowed megabytes for storage.disk.dir, 0 for unlimited",false,false)
d.val(newBoolValue(&d.Storage.Disk.Cache.Enable,true),"storage.disk.cache.enable","CORE_STORAGE_DISK_CACHE_ENABLE",nil,"Enable cache for /",false,false)
d.val(newUint64Value(&d.Storage.Disk.Cache.Size,0),"storage.disk.cache.max_size_mbytes","CORE_STORAGE_DISK_CACHE_MAXSIZEMBYTES",nil,"Max. allowed cache size, 0 for unlimited",false,false)
d.val(newInt64Value(&d.Storage.Disk.Cache.TTL,300),"storage.disk.cache.ttl_seconds","CORE_STORAGE_DISK_CACHE_TTLSECONDS",nil,"Seconds to keep files in cache",false,false)
d.val(newUint64Value(&d.Storage.Disk.Cache.FileSize,1),"storage.disk.cache.max_file_size_mbytes","CORE_STORAGE_DISK_CACHE_MAXFILESIZEMBYTES",nil,"Max. file size to put in cache",false,false)
d.val(newStringListValue(&d.Storage.Disk.Cache.Types,[]string{}," "),"storage.disk.cache.types","CORE_STORAGE_DISK_CACHE_TYPES",nil,"File extensions to cache, empty for all",false,false)
// Storage (Memory)
d.val(newBoolValue(&d.Storage.Memory.Auth.Enable,true),"storage.memory.auth.enable","CORE_STORAGE_MEMORY_AUTH_ENABLE",nil,"Enable basic auth for PUT,POST, and DELETE on /memfs",false,false)
d.val(newStringValue(&d.Storage.Memory.Auth.Username,"admin"),"storage.memory.auth.username","CORE_STORAGE_MEMORY_AUTH_USERNAME",nil,"Username for Basic-Auth of /memfs",false,false)
d.val(newStringValue(&d.Storage.Memory.Auth.Password,rand.StringAlphanumeric(18)),"storage.memory.auth.password","CORE_STORAGE_MEMORY_AUTH_PASSWORD",nil,"Password for Basic-Auth of /memfs",false,true)
d.val(newInt64Value(&d.Storage.Memory.Size,0),"storage.memory.max_size_mbytes","CORE_STORAGE_MEMORY_MAXSIZEMBYTES",nil,"Max. allowed megabytes for /memfs, 0 for unlimited",false,false)
d.val(newBoolValue(&d.Storage.Memory.Purge,false),"storage.memory.purge","CORE_STORAGE_MEMORY_PURGE",nil,"Automatically remove the oldest files if /memfs is full",false,false)
// Storage (CORS)
d.val(newCORSOriginsValue(&d.Storage.CORS.Origins,[]string{"*"},","),"storage.cors.origins","CORE_STORAGE_CORS_ORIGINS",nil,"Allowed CORS origins for /memfs and /data",false,false)
d.val(newExecValue(&d.FFmpeg.Binary,"ffmpeg"),"ffmpeg.binary","CORE_FFMPEG_BINARY",nil,"Path to ffmpeg binary",true,false)
d.val(newInt64Value(&d.FFmpeg.MaxProcesses,0),"ffmpeg.max_processes","CORE_FFMPEG_MAXPROCESSES",nil,"Max. allowed simultaneously running ffmpeg instances, 0 for unlimited",false,false)
d.val(newStringListValue(&d.FFmpeg.Access.Input.Allow,[]string{}," "),"ffmpeg.access.input.allow","CORE_FFMPEG_ACCESS_INPUT_ALLOW",nil,"List of allowed expression to match against the input addresses",false,false)
d.val(newStringListValue(&d.FFmpeg.Access.Input.Block,[]string{}," "),"ffmpeg.access.input.block","CORE_FFMPEG_ACCESS_INPUT_BLOCK",nil,"List of blocked expression to match against the input addresses",false,false)
d.val(newStringListValue(&d.FFmpeg.Access.Output.Allow,[]string{}," "),"ffmpeg.access.output.allow","CORE_FFMPEG_ACCESS_OUTPUT_ALLOW",nil,"List of allowed expression to match against the output addresses",false,false)
d.val(newStringListValue(&d.FFmpeg.Access.Output.Block,[]string{}," "),"ffmpeg.access.output.block","CORE_FFMPEG_ACCESS_OUTPUT_BLOCK",nil,"List of blocked expression to match against the output addresses",false,false)
d.val(newIntValue(&d.FFmpeg.Log.MaxLines,50),"ffmpeg.log.max_lines","CORE_FFMPEG_LOG_MAXLINES",nil,"Number of latest log lines to keep for each process",false,false)
d.val(newIntValue(&d.FFmpeg.Log.MaxHistory,3),"ffmpeg.log.max_history","CORE_FFMPEG_LOG_MAXHISTORY",nil,"Number of latest logs to keep for each process",false,false)
// Playout
d.val(newBoolValue(&d.Playout.Enable,false),"playout.enable","CORE_PLAYOUT_ENABLE",nil,"Enable playout proxy where available",false,false)
d.val(newPortValue(&d.Playout.MinPort,0),"playout.min_port","CORE_PLAYOUT_MINPORT",nil,"Min. playout server port",false,false)
d.val(newPortValue(&d.Playout.MaxPort,0),"playout.max_port","CORE_PLAYOUT_MAXPORT",nil,"Max. playout server port",false,false)
// Debug
d.val(newBoolValue(&d.Debug.Profiling,false),"debug.profiling","CORE_DEBUG_PROFILING",nil,"Enable profiling endpoint on /profiling",false,false)
d.val(newIntValue(&d.Debug.ForceGC,0),"debug.force_gc","CORE_DEBUG_FORCEGC",nil,"Number of seconds between forcing GC to return memory to the OS",false,false)
d.val(newInt64Value(&d.Metrics.Range,300),"metrics.range_seconds","CORE_METRICS_RANGE_SECONDS",nil,"Seconds to keep history data",false,false)
d.val(newInt64Value(&d.Metrics.Interval,2),"metrics.interval_seconds","CORE_METRICS_INTERVAL_SECONDS",nil,"Interval for collecting metrics",false,false)
// Sessions
d.val(newBoolValue(&d.Sessions.Enable,true),"sessions.enable","CORE_SESSIONS_ENABLE",nil,"Enable collecting HLS session stats for /memfs",false,false)
d.val(newCIDRListValue(&d.Sessions.IPIgnoreList,[]string{"127.0.0.1/32","::1/128"},","),"sessions.ip_ignorelist","CORE_SESSIONS_IP_IGNORELIST",nil,"List of IP ranges in CIDR notation to ignore",false,false)
d.val(newIntValue(&d.Sessions.SessionTimeout,30),"sessions.session_timeout_sec","CORE_SESSIONS_SESSION_TIMEOUT_SEC",nil,"Timeout for an idle session",false,false)
d.val(newBoolValue(&d.Sessions.Persist,false),"sessions.persist","CORE_SESSIONS_PERSIST",nil,"Whether to persist session history. Will be stored as sessions.json in db.dir",false,false)
d.val(newIntValue(&d.Sessions.PersistInterval,300),"sessions.persist_interval_sec","CORE_SESSIONS_PERSIST_INTERVAL_SEC",nil,"Interval in seconds in which to persist the current session history",false,false)
d.val(newUint64Value(&d.Sessions.MaxBitrate,0),"sessions.max_bitrate_mbit","CORE_SESSIONS_MAXBITRATE_MBIT",nil,"Max. allowed outgoing bitrate in mbit/s, 0 for unlimited",false,false)
d.val(newUint64Value(&d.Sessions.MaxSessions,0),"sessions.max_sessions","CORE_SESSIONS_MAXSESSIONS",nil,"Max. allowed number of simultaneous sessions, 0 for unlimited",false,false)
// Service
d.val(newBoolValue(&d.Service.Enable,false),"service.enable","CORE_SERVICE_ENABLE",nil,"Enable connecting to the Restreamer Service",false,false)
d.val(newStringValue(&d.Service.Token,""),"service.token","CORE_SERVICE_TOKEN",nil,"Restreamer Service account token",false,true)
d.val(newURLValue(&d.Service.URL,"https://service.datarhei.com"),"service.url","CORE_SERVICE_URL",nil,"URL of the Restreamer Service",false,false)
// Router
d.val(newStringListValue(&d.Router.BlockedPrefixes,[]string{"/api"},","),"router.blocked_prefixes","CORE_ROUTER_BLOCKED_PREFIXES",nil,"List of path prefixes that can't be routed",false,false)
d.val(newStringMapStringValue(&d.Router.Routes,nil),"router.routes","CORE_ROUTER_ROUTES",nil,"List of route mappings",false,false)
d.val(newDirValue(&d.Router.UIPath,""),"router.ui_path","CORE_ROUTER_UI_PATH",nil,"Path to a directory holding UI files mounted as /ui",false,false)