Skip to main content

Configuration reference

Every setting in config/config.yaml, by section. Required means Lyna doesn't run properly until you set it. How the overrides work is on How configuration works.

A starting file​

A file for an instance with a bot, Discord sign-in and a Nexus, behind https://lyna.example.com. The secrets are left empty here and come from the environment, see secrets.

baseSettings:
token: ""
botEnabled: true
botOwner:
- 123456789012345678
botGuild: 234567890123456789
database:
host: "postgres"
port: "5432"
database: "lyna"
schema: "lyna"
user: "lyna"
password: ""
poolSize: 5
api:
hostname: "lyna.example.com"
url: "https://lyna.example.com"
links:
frontend: "https://lyna.example.com"
invite: "https://discord.com/oauth2/authorize?client_id=YOUR_CLIENT_ID&scope=bot&permissions=2415921152"
auth:
jwtSecret: ""
sessionDays: 30
renewAfterHours: 24
tokenKey: ""
discord:
oauth:
clientId: "YOUR_CLIENT_ID"
clientSecret: ""
redirectUri: "https://lyna.example.com/api/auth/discord/callback"
apiUrl: "https://discord.com/api"
nexus:
host: "nexus.example.com"
username: "lyna"
password: ""
mailing:
enabled: false

baseSettings​

The Discord bot. Environment prefix BOT.

KeyDefaultEnvironmentWhat it does
token""BOT_TOKENThe bot token. Required while botEnabled is on.
botEnabledtrueBOT_BOTENABLEDWhether Lyna connects to Discord at all. Off, only the web app and its API run.
botOwner[]BOT_BOTOWNERDiscord user ids of the operators. They can always use the admin area. See first sign-in.
botGuild0BOT_BOTGUILDThe id of the one guild the bot serves. Its slash commands are registered there. Required with a bot.

database​

PostgreSQL. Environment prefix DB.

KeyDefaultEnvironmentWhat it does
host"localhost"DB_HOSTDatabase host.
port"5432"DB_PORTDatabase port.
database"db"DB_DATABASEDatabase name.
schema"lyna"DB_SCHEMASchema Lyna creates its tables in. It is created if missing.
user"user"DB_USERDatabase user.
password"pw"DB_PASSWORDDatabase password. Required.
poolSize5DB_POOLSIZEMost connections Lyna keeps open.

Lyna creates and upgrades its tables itself on every start. See upgrading.

api​

The HTTP server the web app talks to. Environment prefix API.

KeyDefaultEnvironmentWhat it does
hostname""API_HOSTNAMEYour public host name, without https://. It goes into the Content-Security-Policy header. Required: Lyna doesn't start without it.
url""API_URLYour public address, with https:// and without a trailing slash. Download links, webhook addresses and the "Download on Lyna" button are built from it. Required: Lyna doesn't start without it.
host"0.0.0.0"API_HOSTAddress to listen on.
port8888API_PORTPort to listen on. The frontend expects 8888 unless you change NUXT_BACKEND_URL.
allowedOrigins[]API_ALLOWEDORIGINSBrowser origins allowed to call the API from another address. Not needed when the frontend serves the API under its own address, as it does by default.
iconHosts[]API_ICONHOSTSExtra hosts that pages may load images from.
staticUifalseAPI_STATICUIServes a UI bundled into the backend. Leave it off; the frontend image is the UI.

Addresses Lyna puts into mails and pages. Environment prefix LINKS.

KeyDefaultEnvironmentWhat it does
frontend"http://localhost:3000"LINKS_FRONTENDYour public address. Links in mails (verify an address, reset a password, purchases) point here. Required.
invite""LINKS_INVITEYour bot's invite link. /info shows it when set.
website""LINKS_WEBSITEYour website. The web app and /info show it when set.
support, tos, faq""LINKS_SUPPORT, LINKS_TOS, LINKS_FAQYour support server, terms and FAQ. /info shows each one that is set.

auth​

Sign-in sessions. Environment prefix AUTH.

KeyDefaultEnvironmentWhat it does
jwtSecret""AUTH_JWTSECRETThe secret sessions are signed with. Required: Lyna doesn't start without it. Changing it signs everybody out.
sessionDays30AUTH_SESSIONDAYSDays a session lasts without being used.
renewAfterHours24AUTH_RENEWAFTERHOURSHours after which an active session is renewed, which moves its end along.
tokenKey""AUTH_TOKENKEYBase64 key for stored Discord tokens. Empty uses config/token.key. See secrets.

discord​

Signing in with Discord. Leave all three of clientId, clientSecret and redirectUri empty to turn Discord sign-in off; set all three to turn it on. Environment prefix DISCORD_OAUTH.

KeyDefaultEnvironmentWhat it does
oauth.clientId""DISCORD_OAUTH_CLIENTIDYour Discord application's client id.
oauth.clientSecret""DISCORD_OAUTH_CLIENTSECRETYour Discord application's client secret.
oauth.redirectUri""DISCORD_OAUTH_REDIRECTURIhttps://<your address>/api/auth/discord/callback. It must match a redirect in the Discord application exactly.
oauth.apiUrl"https://discord.com/api"DISCORD_OAUTH_APIURLDiscord's API. Leave it.

See Discord.

nexus​

The Sonatype Nexus downloads come from. Environment prefix NEXUS.

KeyDefaultEnvironmentWhat it does
host"eldonexus.de"NEXUS_HOSTHost name of your Nexus, without https://. Lyna reaches it over HTTPS.
username""NEXUS_USERNAMEA Nexus user that can read the repositories you serve.
password""NEXUS_PASSWORDThat user's password.

See Nexus.

mailing​

Reading payment receipts from a mailbox and sending mail. Environment prefix MAIL.

KeyDefaultEnvironmentWhat it does
enabledfalseMAIL_ENABLEDWhether Lyna connects to a mail server at all.
user""MAIL_USERMailbox login, used for IMAP and SMTP.
password""MAIL_PASSWORDMailbox password.
imap.host, imap.port, imap.ssl"", 993, truefile onlyThe IMAP server receipts are read from.
smtp.host, smtp.port, smtp.ssl"", 465, truefile onlyThe SMTP server mail is sent through.
properties{}file onlyExtra Jakarta Mail properties, such as mail.smtp.starttls.enable: "true". They win over the ones above.
paypalSenders["service@paypal.de", "service@paypal.com"]MAIL_PAYPALSENDERSAddresses PayPal sends receipts from. Add the one of your PayPal account's country if it is missing.
pollSeconds300MAIL_POLLSECONDSSeconds between two checks of the mailbox.
originMail[]MAIL_ORIGINMAILAddresses trusted to forward receipts to the mailbox. Empty trusts no forwarder.
skipVerifyfalseMAIL_SKIPVERIFYAccepts receipts from any sender. Only for testing: anybody could fake a receipt.
senderName"Lyna"MAIL_SENDERNAMEThe name Lyna signs its mail with.

See mail.

kofi​

Ko-fi webhooks. Environment prefix KOFI.

KeyDefaultEnvironmentWhat it does
verificationTokenrandomKOFI_VERIFICATIONTOKENThe token from your Ko-fi webhook settings. Calls without it are refused.

See Ko-fi.

license​

Environment prefix LICENSE.

KeyDefaultEnvironmentWhat it does
baseSeedrandom, 50 charactersLICENSE_BASESEEDSeed for new license keys. Written into the file on the first start. Keep it once licenses exist.

github​

Reading from GitHub, for product pages that show a project's README. Environment prefix GITHUB.

KeyDefaultEnvironmentWhat it does
token""GITHUB_TOKENOptional GitHub token. Without one, GitHub allows 60 requests an hour, which cached READMEs rarely reach.
apiUrl"https://api.github.com"GITHUB_APIURLGitHub's API. Leave it.

downloads​

Environment prefix DOWNLOADS.

KeyDefaultEnvironmentWhat it does
skipJarSigningfalseDOWNLOADS_SKIPJARSIGNINGServes jars untouched instead of stamping who downloaded them. Only for testing: the stamp is how you tell which copy went to whom.

storage​

Environment prefix STORAGE.

KeyDefaultEnvironmentWhat it does
directory"data"STORAGE_DIRECTORYWhere uploaded files are kept, relative to the working directory unless absolute. Product icons go into icons/ inside it. Put it on a volume.

debugReports​

Debug reports that plugins upload. Environment prefix DEBUGREPORTS.

KeyDefaultEnvironmentWhat it does
retentionDays14DEBUGREPORTS_RETENTIONDAYSDays a report is kept.
maxUploadBytes16777216 (16 MiB)DEBUGREPORTS_MAXUPLOADBYTESLargest upload accepted. This also raises the size limit for every other request.
uploadIntervalSeconds10DEBUGREPORTS_UPLOADINTERVALSECONDSSeconds one address has to wait between two uploads.

demo​

Environment prefix DEMO.

KeyDefaultEnvironmentWhat it does
enabledfalseDEMO_ENABLEDSeeds sample data and lets anybody sign in as a sample account without a password.
resetIntervalMinutes60DEMO_RESETINTERVALMINUTESMinutes between two resets of the sample data. 0 or less never resets.
danger

Never turn on demo mode on an instance with real data. Anybody can sign in without a password, and the reset deletes what the demo made.