d.vars.Register(value.NewBool(&d.CheckForUpdates,true),"update_check","CORE_UPDATE_CHECK",nil,"Check for updates and send anonymized data",false,false)
d.vars.Register(value.NewInt(&d.Log.MaxLines,1000),"log.max_lines","CORE_LOG_MAX_LINES",[]string{"CORE_LOG_MAXLINES"},"Number of latest log lines to keep in memory",false,false)
d.vars.Register(value.NewStringList(&d.Host.Name,[]string{},","),"host.name","CORE_HOST_NAME",nil,"Comma separated list of public host/domain names or IPs",false,false)
d.vars.Register(value.NewBool(&d.Host.Auto,true),"host.auto","CORE_HOST_AUTO",nil,"Enable detection of public IP addresses",false,false)
d.vars.Register(value.NewBool(&d.API.ReadOnly,false),"api.read_only","CORE_API_READ_ONLY",nil,"Allow only ready only access to the API",false,false)
d.vars.Register(value.NewCIDRList(&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.vars.Register(value.NewCIDRList(&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.vars.Register(value.NewCIDRList(&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.vars.Register(value.NewCIDRList(&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.vars.Register(value.NewBool(&d.API.Auth.Enable,false),"api.auth.enable","CORE_API_AUTH_ENABLE",nil,"Enable authentication for all clients",false,false)
d.vars.Register(value.NewBool(&d.API.Auth.DisableLocalhost,false),"api.auth.disable_localhost","CORE_API_AUTH_DISABLE_LOCALHOST",nil,"Disable authentication for clients from localhost",false,false)
d.vars.Register(value.NewString(&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.vars.Register(value.NewTenantList(&d.API.Auth.Auth0.Tenants,[]value.Auth0Tenant{},","),"api.auth.auth0.tenants","CORE_API_AUTH_AUTH0_TENANTS",nil,"List of Auth0 tenants",false,false)
d.vars.Register(value.NewFile(&d.TLS.CertFile,"",d.fs),"tls.cert_file","CORE_TLS_CERT_FILE",[]string{"CORE_TLS_CERTFILE"},"Path to certificate file in PEM format",false,false)
d.vars.Register(value.NewFile(&d.TLS.KeyFile,"",d.fs),"tls.key_file","CORE_TLS_KEY_FILE",[]string{"CORE_TLS_KEYFILE"},"Path to key file in PEM format",false,false)
d.vars.Register(value.NewFile(&d.Storage.MimeTypes,"./mime.types",d.fs),"storage.mimetypes_file","CORE_STORAGE_MIMETYPES_FILE",[]string{"CORE_MIMETYPES_FILE"},"Path to file with mime-types",false,false)
d.vars.Register(value.NewMustDir(&d.Storage.Disk.Dir,"./data",d.fs),"storage.disk.dir","CORE_STORAGE_DISK_DIR",nil,"Directory on disk, exposed on /",false,false)
d.vars.Register(value.NewInt64(&d.Storage.Disk.Size,0),"storage.disk.max_size_mbytes","CORE_STORAGE_DISK_MAX_SIZE_MBYTES",[]string{"CORE_STORAGE_DISK_MAXSIZEMBYTES"},"Max. allowed megabytes for storage.disk.dir, 0 for unlimited",false,false)
d.vars.Register(value.NewBool(&d.Storage.Disk.Cache.Enable,true),"storage.disk.cache.enable","CORE_STORAGE_DISK_CACHE_ENABLE",nil,"Enable cache for /",false,false)
d.vars.Register(value.NewUint64(&d.Storage.Disk.Cache.Size,0),"storage.disk.cache.max_size_mbytes","CORE_STORAGE_DISK_CACHE_MAX_SIZE_MBYTES",[]string{"CORE_STORAGE_DISK_CACHE_MAXSIZEMBYTES"},"Max. allowed cache size, 0 for unlimited",false,false)
d.vars.Register(value.NewInt64(&d.Storage.Disk.Cache.TTL,300),"storage.disk.cache.ttl_seconds","CORE_STORAGE_DISK_CACHE_TTL_SECONDS",[]string{"CORE_STORAGE_DISK_CACHE_TTLSECONDS"},"Seconds to keep files in cache",false,false)
d.vars.Register(value.NewUint64(&d.Storage.Disk.Cache.FileSize,1),"storage.disk.cache.max_file_size_mbytes","CORE_STORAGE_DISK_CACHE_MAX_FILE_SIZE_MBYTES",[]string{"CORE_STORAGE_DISK_CACHE_MAXFILESIZEMBYTES"},"Max. file size to put in cache",false,false)
d.vars.Register(value.NewStringList(&d.Storage.Disk.Cache.Types.Allow,[]string{}," "),"storage.disk.cache.type.allow","CORE_STORAGE_DISK_CACHE_TYPES_ALLOW",[]string{"CORE_STORAGE_DISK_CACHE_TYPES"},"File extensions to cache, empty for all",false,false)
d.vars.Register(value.NewStringList(&d.Storage.Disk.Cache.Types.Block,[]string{".m3u8",".mpd"}," "),"storage.disk.cache.type.block","CORE_STORAGE_DISK_CACHE_TYPES_BLOCK",nil,"File extensions not to cache, empty for none",false,false)
d.vars.Register(value.NewBool(&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.vars.Register(value.NewString(&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.vars.Register(value.NewString(&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.vars.Register(value.NewInt64(&d.Storage.Memory.Size,0),"storage.memory.max_size_mbytes","CORE_STORAGE_MEMORY_MAX_SIZE_MBYTES",[]string{"CORE_STORAGE_MEMORY_MAXSIZEMBYTES"},"Max. allowed megabytes for /memfs, 0 for unlimited",false,false)
d.vars.Register(value.NewBool(&d.Storage.Memory.Purge,false),"storage.memory.purge","CORE_STORAGE_MEMORY_PURGE",nil,"Automatically remove the oldest files if /memfs is full",false,false)
d.vars.Register(value.NewS3StorageListValue(&d.Storage.S3,[]value.S3Storage{},"|"),"storage.s3","CORE_STORAGE_S3",nil,"List of S3 storage URLS",false,false)
d.vars.Register(value.NewCORSOrigins(&d.Storage.CORS.Origins,[]string{"*"},","),"storage.cors.origins","CORE_STORAGE_CORS_ORIGINS",nil,"Allowed CORS origins for /memfs and /data",false,false)
d.vars.Register(value.NewInt64(&d.FFmpeg.MaxProcesses,0),"ffmpeg.max_processes","CORE_FFMPEG_MAXPROCESSES",nil,"Max. allowed simultaneously running ffmpeg instances, 0 for unlimited",false,false)
d.vars.Register(value.NewStringList(&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.vars.Register(value.NewStringList(&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.vars.Register(value.NewStringList(&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.vars.Register(value.NewStringList(&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.vars.Register(value.NewInt(&d.FFmpeg.Log.MaxLines,50),"ffmpeg.log.max_lines","CORE_FFMPEG_LOG_MAX_LINES",[]string{"CORE_FFMPEG_LOG_MAXLINES"},"Number of latest log lines to keep for each process",false,false)
d.vars.Register(value.NewInt(&d.FFmpeg.Log.MaxHistory,3),"ffmpeg.log.max_history","CORE_FFMPEG_LOG_MAX_HISTORY",[]string{"CORE_FFMPEG_LOG_MAXHISTORY"},"Number of latest logs to keep for each process",false,false)
d.vars.Register(value.NewPort(&d.Playout.MinPort,0),"playout.min_port","CORE_PLAYOUT_MIN_PORT",[]string{"CORE_PLAYOUT_MINPORT"},"Min. playout server port",false,false)
d.vars.Register(value.NewPort(&d.Playout.MaxPort,0),"playout.max_port","CORE_PLAYOUT_MAX_PORT",[]string{"CORE_PLAYOUT_MAXPORT"},"Max. playout server port",false,false)
d.vars.Register(value.NewBool(&d.Debug.Profiling,false),"debug.profiling","CORE_DEBUG_PROFILING",nil,"Enable profiling endpoint on /profiling",false,false)
d.vars.Register(value.NewInt(&d.Debug.ForceGC,0),"debug.force_gc","CORE_DEBUG_FORCE_GC",[]string{"CORE_DEBUG_FORCEGC"},"Number of seconds between forcing GC to return memory to the OS",false,false)
d.vars.Register(value.NewInt64(&d.Debug.MemoryLimit,0),"debug.memory_limit_mbytes","CORE_DEBUG_MEMORY_LIMIT_MBYTES",nil,"Impose a soft memory limit for the core, in megabytes",false,false)
d.vars.Register(value.NewInt64(&d.Metrics.Range,300),"metrics.range_seconds","CORE_METRICS_RANGE_SECONDS",nil,"Seconds to keep history data",false,false)
d.vars.Register(value.NewInt64(&d.Metrics.Interval,2),"metrics.interval_seconds","CORE_METRICS_INTERVAL_SECONDS",nil,"Interval for collecting metrics",false,false)
d.vars.Register(value.NewBool(&d.Sessions.Enable,true),"sessions.enable","CORE_SESSIONS_ENABLE",nil,"Enable collecting HLS session stats for /memfs",false,false)
d.vars.Register(value.NewCIDRList(&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.vars.Register(value.NewInt(&d.Sessions.SessionTimeout,30),"sessions.session_timeout_sec","CORE_SESSIONS_SESSION_TIMEOUT_SEC",nil,"Timeout for an idle session",false,false)
d.vars.Register(value.NewBool(&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.vars.Register(value.NewInt(&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.vars.Register(value.NewUint64(&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.vars.Register(value.NewUint64(&d.Sessions.MaxSessions,0),"sessions.max_sessions","CORE_SESSIONS_MAX_SESSIONS",[]string{"CORE_SESSIONS_MAXSESSIONS"},"Max. allowed number of simultaneous sessions, 0 for unlimited",false,false)
d.vars.Register(value.NewBool(&d.Service.Enable,false),"service.enable","CORE_SERVICE_ENABLE",nil,"Enable connecting to the Restreamer Service",false,false)
d.vars.Register(value.NewString(&d.Service.Token,""),"service.token","CORE_SERVICE_TOKEN",nil,"Restreamer Service account token",false,true)
d.vars.Register(value.NewURL(&d.Service.URL,"https://service.datarhei.com"),"service.url","CORE_SERVICE_URL",nil,"URL of the Restreamer Service",false,false)
d.vars.Register(value.NewStringList(&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.vars.Register(value.NewStringMapString(&d.Router.Routes,nil),"router.routes","CORE_ROUTER_ROUTES",nil,"List of route mappings",false,false)
d.vars.Register(value.NewDir(&d.Router.UIPath,"",d.fs),"router.ui_path","CORE_ROUTER_UI_PATH",nil,"Path to a directory holding UI files mounted as /ui",false,false)