Skip to main content

Configuration

Lolorito reads its settings from config/config.yaml, relative to its working directory. In the Docker image that is /app/config/config.yaml. The file is created with defaults on the first start. See Setup.

Missing keys get their default value. On every start Lolorito writes the complete file back, so new keys from an update show up in your file on their own.

Full file with defaults​

baseSettings:
botGuild: 0
botOwner: []
token: ""
catalog:
enabled: true
initialDelaySeconds: 15
intervalHours: 24
database:
database: "db"
host: "localhost"
password: "pw"
poolSize: 5
port: "5432"
schema: "lolorito"
user: "user"
discordOauth:
clientId: ""
clientSecret: ""
http:
frontendBaseUrl: ""
guildRecheckTtlBackgroundMinutes: 60
guildRecheckTtlMinutes: 60
host: "0.0.0.0"
port: 8080
publicBaseUrl: "http://localhost:8080"
secureCookies: true
sessionCookieName: "lolorito_session"
sessionMaxAgeDays: 90
sweeperIntervalMinutes: 15
tokenEncryptionKey: ""
planner:
attentionBudgetHours: 8.0
attentionFraction: 0.25
budget: 1000000
candidateTopK: 250
craftChainMaxDepth: 3
hopWeightGilPerSecond: 100
ilpMaxNodes: 200000
inventorySlots: 140
maxWorlds: 5
retainerAttentionFraction: 0.05
retainerListingSlots: 40
retainerListingStackTarget: 20
retainerShelfHoursThreshold: 6.0
retainerSlots: 20
tDcSeconds: 15
tRegionSeconds: 45
universalis:
regions:
- "Europe"
- "North-America"
- "Oceania"
- "Japan"
- "中国"
value:
alertScanIntervalMinutes: 5
alertWebhookUrl: ""
craftSecondsPerUnit: 5.0
ghostListingWindowDays: 14
listingFreshnessHours: 24
mbTax: 0.05
mbTaxByDataCenter: {}
minSamplesPerKey: 5
modelRefreshMinutes: 60
priceHalfLifeDays: 7
rateWindowDays: 14
refitBatchSize: 2000
residualShrinkagePriorK: 20
residualWindowDays: 14
responseCacheMaxSize: 1000
responseCacheSeconds: 30

baseSettings​

KeyTypeDefaultMeaning
tokentext""The bot token of your Discord application.
botGuildnumber0The id of your Discord server. The bot registers its slash commands there, and only members of this server can log in to the web app.
botOwnerlist of numbers[]Discord user ids that may use the admin endpoints of the web API.

database​

KeyTypeDefaultMeaning
hosttext"localhost"Host of the PostgreSQL server.
porttext"5432"Port of the PostgreSQL server.
databasetext"db"Name of the database.
schematext"lolorito"Schema for Lolorito's tables. It is created on start.
usertext"user"Database user.
passwordtext"pw"Password of the database user.
poolSizenumber5Maximum number of database connections.

discordOauth​

KeyTypeDefaultMeaning
clientIdtext""OAuth2 client id of your Discord application.
clientSecrettext""OAuth2 client secret of your Discord application.

The redirect for the Discord login is not set here. It is <frontend address>/auth/callback, see http.

http​

KeyTypeDefaultMeaning
hosttext"0.0.0.0"Address the web server listens on.
portnumber8080Port the web server listens on.
publicBaseUrltext"http://localhost:8080"The public address of the web app, for example https://lolorito.example.com.
frontendBaseUrltext""Address the browser loads the web app from, if it differs from publicBaseUrl. Empty means publicBaseUrl. The Discord login redirect is this address plus /auth/callback, and users land here after the login.
secureCookiestrue/falsetrueSend session cookies with the Secure flag. Set it to false only for testing on plain HTTP.
sessionCookieNametext"lolorito_session"Name of the session cookie.
sessionMaxAgeDaysnumber90Days without any activity before a session ends. Every request moves this window forward.
tokenEncryptionKeytext""Base64 encoded 32 byte key that encrypts the Discord tokens of logged in users in the database. If empty, Lolorito creates one on start and saves it here.
guildRecheckTtlMinutesnumber60Minutes after which a request checks again that the user is still on your server.
guildRecheckTtlBackgroundMinutesnumber60Minutes after which the background check looks at a session again, even if it is idle.
sweeperIntervalMinutesnumber15How often the background check runs. It also deletes expired sessions.

Users who leave your server lose access to the web app right away. The checks above are a second line of defense.

catalog​

Lolorito refreshes its item icons, recipes and desynth data from XIVAPI in the background.

KeyTypeDefaultMeaning
enabledtrue/falsetrueRun the background refresh at all.
initialDelaySecondsnumber15Seconds after start before the first refresh.
intervalHoursnumber24Hours between two refreshes.

universalis​

KeyTypeDefaultMeaning
regionslist of textsall five regionsUniversalis regions to receive market data for. Allowed values: Europe, North-America, Oceania, Japan, 中国. An empty list receives nothing.

Lolorito only has market data for worlds in the regions you list. Fewer regions means less data to store.

value​

Settings of the market models and the price math.

KeyTypeDefaultMeaning
mbTaxdecimal0.05Market board tax as a fraction. It is taken off every expected sale.
mbTaxByDataCentermap{}Tax per data center. Keys are Universalis data center ids, values are fractions like mbTax. Data centers not listed use mbTax.
modelRefreshMinutesnumber60How often the market models are fitted again.
refitBatchSizenumber2000How many models are fitted per batch.
minSamplesPerKeynumber5Below this many weighted sales a model counts as too thin to trust.
priceHalfLifeDaysnumber7Half life of a sale's weight in the price fit. Newer sales count more.
rateWindowDaysnumber14Days of sales used for the fit. Older sales are ignored.
residualWindowDaysnumber14Days of past prediction errors used to correct the next fit.
residualShrinkagePriorKnumber20How strongly past prediction errors correct the model. A smaller value corrects faster.
ghostListingWindowDaysnumber14Window in days for spotting ghost listings.
craftSecondsPerUnitdecimal5.0Seconds of your time one craft takes. It is counted as time spent when crafts are rated.
listingFreshnessHoursnumber24Listings older than this are ignored when the cheapest price for a craft ingredient or a desynth source is looked up.
responseCacheSecondsnumber30How long answers for offers, plans and item details are cached. 0 turns the cache off.
responseCacheMaxSizenumber1000Maximum number of cached answers per kind.
alertScanIntervalMinutesnumber5How often alert rules are checked.
alertWebhookUrltext""A URL that receives every fired alert as JSON, in addition to the Discord DM. A user's own webhook from the web app settings takes its place for that user's alerts.

planner​

Defaults for the route planner. The web app sends its own values with every plan, so these only fill in values that are missing from a request.

KeyTypeDefaultMeaning
hopWeightGilPerSecondnumber100What one second of travel is worth in gil.
tDcSecondsnumber15Seconds for one hop between two worlds of the same data center.
tRegionSecondsnumber45Seconds for one hop between two data centers of the same region.
maxWorldsnumber5Maximum number of worlds a plan visits to buy.
candidateTopKnumber250How many of the best rated candidates the planner looks at.
attentionBudgetHoursdecimal8.0Hours of your time a plan may take.
attentionFractiondecimal0.25Share of your attention a run gets.
inventorySlotsnumber140Free inventory slots.
budgetnumber1000000Gil you can spend.
ilpMaxNodesnumber200000Search limit of the exact solver. Above it, the planner falls back to a faster, simpler method.
retainerSlotsnumber20How many different items the planner may put into the retainer basket.
retainerListingSlotsnumber40Sell listings across all your retainers.
retainerListingStackTargetnumber20Units per listing when a retainer pick is split into stacks.
retainerAttentionFractiondecimal0.05Share of your attention for retainer picks.
retainerShelfHoursThresholddecimal6.0Items expected to sit on the market at least this many hours go to the retainer basket.
craftChainMaxDepthnumber3How many recipe levels deep the planner looks for crafts. Deeper ingredients are priced as buys.

Environment variables​

Most keys can also be set with an environment variable. The name is the section prefix and the key in upper case, with no extra underscores inside the key:

SectionPrefixExample
baseSettingsBOT_BOT_TOKEN, BOT_BOTGUILD
databaseDB_DB_HOST, DB_POOLSIZE
discordOauthDISCORD_OAUTH_DISCORD_OAUTH_CLIENTID, DISCORD_OAUTH_CLIENTSECRET
httpHTTP_HTTP_PUBLICBASEURL, HTTP_SECURECOOKIES
catalogCATALOG_CATALOG_ENABLED
valueVALUE_VALUE_MBTAX, VALUE_ALERTWEBHOOKURL
plannerPLANNER_PLANNER_MAXWORLDS, PLANNER_TDCSECONDS

A set variable wins over the value in the file. These keys have no variable and can only be set in the file: baseSettings.botOwner, universalis.regions and value.mbTaxByDataCenter.

warning

Lolorito writes the complete configuration back to config.yaml on every start, including values that came from environment variables. A token or password you pass as a variable ends up in the file as well. Protect the config folder like you would protect the variables.