From ecc2243513383df50b3921059e1ca0b3e71451fd Mon Sep 17 00:00:00 2001 From: kolaente Date: Tue, 24 Mar 2026 19:45:41 +0100 Subject: [PATCH] feat(config): add license.key configuration option Add license key configuration under the license section. When empty or absent, Vikunja runs in community mode with no licensed features. --- config-raw.json | 10 ++++++++++ pkg/config/config.go | 4 ++++ 2 files changed, 14 insertions(+) diff --git a/config-raw.json b/config-raw.json index fabdadbfd..dd395b768 100644 --- a/config-raw.json +++ b/config-raw.json @@ -1056,6 +1056,16 @@ "comment": "The plugin loader to use. \"yaegi\" loads plugins from Go source files (directories of .go files). \"native\" (deprecated) loads compiled Go plugin shared libraries (.so files)." } ] + }, + { + "key": "license", + "children": [ + { + "key": "key", + "default_value": "", + "comment": "The license key for Vikunja. If empty or absent, Vikunja runs in community mode with all non-licensed features available." + } + ] } ] } diff --git a/pkg/config/config.go b/pkg/config/config.go index 27b913c1b..6ca03a334 100644 --- a/pkg/config/config.go +++ b/pkg/config/config.go @@ -232,6 +232,8 @@ const ( PluginsEnabled Key = `plugins.enabled` PluginsDir Key = `plugins.dir` PluginsLoader Key = `plugins.loader` + + LicenseKey Key = `license.key` ) var maxFileSizeInBytes uint64 @@ -503,6 +505,8 @@ func InitDefaultConfig() { log.Warningf("Config key %q is deprecated and will be removed in a future release. Please use %q instead.", WebhooksProxyPassword, OutgoingRequestsProxyPassword) OutgoingRequestsProxyPassword.Set(proxyPassword) } + // License + LicenseKey.setDefault("") } // ResolvePath resolves a path relative to service.rootpath.