Skip to content

Configuration ​

The settings people actually set, grouped by file. 🔒 marks a secret: keep it out of git, logs and screenshots.

How TomYum reads settings ​

TomYum's settings are layered, lowest priority first:

appsettings.json → appsettings.<Environment>.json → tomyum.yaml → TOMYUM_* environment variables

The files live in config/; the server also loads config/.env into its environment when it exists. An environment variable is the setting's path with __ between the parts and a TOMYUM_ prefix: Irc:Port is TOMYUM_IRC__PORT, list items are numbered (TOMYUM_PLUGINS__TRUSTED__0).

In production, everything is an environment variable

The production image has no config/ folder, so the server reads only environment variables: those docker-compose.yml sets from .env, and those in tomyum.env. Examples for local runs: config/.env.example and config/tomyum.yaml.example.

.env (production compose) ​

deploy/production/.env.example, copied to .env. docker-compose.yml reads it and passes the values on.

NameWhat it doesDefault / example
DOMAINYour domain: the site is osu.<DOMAIN>, the game connects with -devserver <DOMAIN>example.com
CLOUDFLARE_TUNNEL_TOKEN 🔒The Cloudflare Tunnel's connector token
DB_ROOT_PASSWORD 🔒MySQL's root passwordopenssl rand -hex 24
DB_PASSWORD 🔒The osuweb account TomYum, the website and ppy's services shareopenssl rand -hex 24
SHARED_INTEROP_SECRET 🔒Signs requests between TomYum, the website and ppy's servicesopenssl rand -hex 32
OSU_WEB_APP_KEY 🔒The website's Laravel keydocker compose run --rm artisan key:generate --show
OSU_WEB_PATHYour osu-web fork's checkout, relative to deploy/production../../../osu-web
SPECTATOR_PATHThe spectator server's checkout../../../tomyum-spectator
OSU_API_KEY 🔒osu! API v1 key (optional, recommended)empty: a keyless mirror
OSU_CLIENT_IDosu! API v2 OAuth app (beatmap descriptions, nominators)empty
OSU_CLIENT_SECRET 🔒Its secretempty
DEVELOPMENT_BANNERThe website's red "development instance" bannerfalse
TCP_BANCHOTCP bancho for builds up to b20130802.1 (ports 13380-13384)false
TCP_BANCHO_BINDWhere the TCP bancho ports listen; 0.0.0.0 opens them to everyone127.0.0.1
GATEWAY_KEY 🔒The secret shared with TomYum.Gateway; empty turns the link offempty
IRC_PORTThe host port for IRC6667
WATCHDOG_DISCORD_TOKEN 🔒A Discord bot token for the watchdog's DMs
COMPOSE_PROJECT_NAMEDocker Compose's project name; the scripts expect tomyum(add it: tomyum)

docker-compose.yml already sets these for TomYum, so don't set them in tomyum.env: TOMYUM_SERVER__DOMAIN, TOMYUM_DATABASE__*, TOMYUM_REDIS__CONFIGURATION, TOMYUM_OSUWEB__INTEROPURL, TOMYUM_OSUWEB__INTEROPSECRET, TOMYUM_OSUWEB__SCOREPROCESSOR, TOMYUM_OSU__APIKEY, TOMYUM_OSU__CLIENTID, TOMYUM_OSU__CLIENTSECRET, TOMYUM_GATEWAY__KEY, TOMYUM_BANCHO__TCP__ENABLED, TOMYUM_REPLAYS__LAZERPATH.

tomyum.env (the game server) ​

deploy/production/tomyum.env.example, copied to tomyum.env. Everything here is optional.

Server ​

NameWhat it doesDefault
TOMYUM_SERVER__NAMEYour server's name in BanchoBot's posts, !version and the restart noticeTomYum
TOMYUM_SERVER__DOMAINThe domain (set by compose from DOMAIN)

Gameplay and ranking ​

NameWhat it doesDefault
TOMYUM_RANKING__CLEARSCORESONRANKDelete a difficulty's scores when it becomes ranked or approved; false keeps themtrue
TOMYUM_RANKING__INACTIVEDAYSA player with no score in a mode for this many days leaves that mode's rankings until the next score (stats stay); the website's TOMYUM_RANKING_INACTIVE_DAYS must match. 0 keeps everyone ranked0
TOMYUM_BANCHO__BOTUSERIDBanchoBot's user id (the website's BANCHO_BOT_USER_ID must match); a server imported from bancho.py may put the bot at 2 so the owner keeps 33
TOMYUM_CLIENTVERIFICATION__ENABLEDNew devices must be confirmed on the website (stable)false
TOMYUM_CLIENTVERIFICATION__OLDCLIENTSBuilds before b20151228: Unverified or RefuseUnverified
TOMYUM_CLIENTVERIFICATION__DOWNLOADSURLWhere refused old clients are senthttps://osu.<domain>/home/download

lazer and the website ​

NameWhat it doesDefault
TOMYUM_DAILYCHALLENGE__ENABLEDKeep lazer's daily challenge queue filledtrue
TOMYUM_DAILYCHALLENGE__DAYSAHEADDays kept queued7
TOMYUM_DAILYCHALLENGE__WEEKLYStar ratings by weekday, as osu! (Thursday 3–3.5★ to Wednesday 6–6.5★)true
TOMYUM_DAILYCHALLENGE__MINSTARS, __MAXSTARSThe star range when WEEKLY is false4, 6.5
TOMYUM_DAILYCHALLENGE__RULESETSRulesets, one per day in turnosu
TOMYUM_LASTFM__APIKEYLast.fm scrobbling (lazer)empty: off
TOMYUM_LASTFM__APISECRET 🔒Its secretempty
TOMYUM_DATABASE__OSUWEBIMPORTPACKSMake osu!'s beatmap packs on the website from importsfalse
TOMYUM_DATABASE__OSUWEBINDEXPREFIXThe website's ES_INDEX_PREFIX, if it sets oneempty
TOMYUM_OSUWEB__OAUTHPUBLICKEYPATHThe website's Passport public key (lazer beatmap submission)oauth-public.key
TOMYUM_OSUWEB__LAZERCLIENTIDlazer's OAuth client id5

IRC and TCP ​

NameWhat it doesDefault
TOMYUM_IRC__ENABLEDThe IRC servertrue
TOMYUM_IRC__PORTIts port inside the container6667
TOMYUM_IRC__SERVERNAMEIts name in repliesirc.<domain>
TOMYUM_BANCHO__TCP__PORTS__0 …TCP bancho's ports13380–13384
TOMYUM_BANCHO__TCP__PROXYPROTOCOLConnections start with a PROXY protocol header (a relay such as frp)false

Files ​

All relative to the container's /app, so on the server-data volume by default.

NameWhat it doesDefault
TOMYUM_REPLAYS__PATHStable replaysdata/replays
TOMYUM_SCREENSHOTS__PATHUploaded screenshotsdata/screenshots
TOMYUM_BEATMAPS__PATHCustom beatmap setsdata/beatmaps
TOMYUM_PACKS__PATHBuilt beatmap pack zipsdata/packs
TOMYUM_PACKS__MAXBYTESThe largest a pack zip may be4294967296 (4 GiB)
TOMYUM_ASSETS__CACHEPATHMedal icons and other cached assetsdata/assets
TOMYUM_PERFORMANCE__OSUCACHEDIRECTORYDownloaded .osu filesdata/osu-cache
TOMYUM_GEOIP__PATHDB-IP's country database (for players Cloudflare can't place)data/geoip
TOMYUM_GEOIP__DOWNLOADDownload and refresh it monthlytrue
TOMYUM_PREVIEWS__FFMPEGThe ffmpeg that cuts custom sets' audio previewsffmpeg

Beatmap sources ​

NameWhat it doesDefault
TOMYUM_OSU__REQUESTSPERMINUTEThe whole server's osu! API budget50
TOMYUM_MIRROR__ENABLEDAsk a beatmap mirror before osu!'s APItrue
TOMYUM_MIRROR__URLThat mirror (osu!'s v2 answers, catboy.best's API)https://catboy.best/
TOMYUM_MIRROR__REQUESTSPERMINUTERequests a minute to it120
TOMYUM_MIRROR__USERAGENTHow the server introduces itselfnames your website
TOMYUM_DIRECT__MIRRORBASEURLosu!direct's mirror (mino-compatible search API)https://osu.direct
TOMYUM_DIRECT__SEARCHPATHIts search path/api/search
TOMYUM_DIRECT__SETPATHIts set lookup path/api/s/{0}
TOMYUM_DIRECT__DOWNLOADPATHIts .osz download path/api/d/{0}
TOMYUM_DIRECT__THUMBNAILBASEURLWhere b. sends osu!'s thumbnailshttps://b.ppy.sh

pp ​

The Performance settings route modes to pp backends. See pp reworks.

NameWhat it doesDefault
TOMYUM_PERFORMANCE__DEFAULTBackend for modes no route matchesofficial
TOMYUM_PERFORMANCE__ROUTES__<n>__MODES__<m>Modes a route matches (vanilla, relax, autopilot, all, a short name or a number)none
TOMYUM_PERFORMANCE__ROUTES__<n>__BACKENDThe backend for that route
TOMYUM_PERFORMANCE__BACKENDS__<name>__TYPEinprocess-lazer or httpinprocess-lazer
TOMYUM_PERFORMANCE__BACKENDS__<name>__URLAn http backend's address
TOMYUM_PERFORMANCE__BACKENDS__<name>__TIMEOUTMSIts timeout3000
TOMYUM_PERFORMANCE__BACKENDS__<name>__FALLBACKBackend to use when it fails (else 0 pp)none

Plugins ​

NameWhat it doesDefault
TOMYUM_PLUGINS__DIRECTORYWhere plugins load fromplugins
TOMYUM_PLUGINS__ALLOWLOOSESOURCECompile loose .cs pluginstrue
TOMYUM_PLUGINS__TRUSTED__<n>Plugin ids with raw database accessnone
TOMYUM_PLUGINS__<id>__<setting> 🔒 when it's a tokenA plugin's own settings

Anti-cheat ​

NameWhat it doesDefault
TOMYUM_ANTICHEAT__DEVMODESkip anti-cheat checks (development only)false
TOMYUM_ANTICHEAT__OLDCLIENTS__SECRET 🔒The secret patched old builds' proofs are made from; empty turns the check offempty
TOMYUM_ANTICHEAT__OLDCLIENTS__REQUIRERefuse old builds that fail the check (otherwise only logged)false

osu-web.env (the website) ​

deploy/production/osu-web.env.example, copied to osu-web.env. These are osu-web's own settings plus the fork's.

Basics ​

NameWhat it doesExample value
APP_ENV, APP_DEBUG, APP_LOG_LEVEL, LOG_CHANNELProduction mode, logging to stderrproduction, false, warning, stderr
DB_DATABASEThe website's databaseosu
CACHE_DRIVER, SESSION_DRIVER, BROADCAST_DRIVER, QUEUE_DRIVERAll on Redisredis
TRUSTED_PROXIESTrust Caddy and the tunnel's forwarded headers (not *, which is ignored)PRIVATE_SUBNETS
BANCHO_BOT_USER_IDBanchoBot's user id3
TOMYUM_MANAGES_RANKINGTomYum manages rankingtrue
TOMYUM_RANKING_INACTIVE_DAYSThe rankings' inactivity rule, the same number as TomYum's TOMYUM_RANKING__INACTIVEDAYS0
CLIENT_CHECK_VERSIONCheck lazer builds (players use the stock client)false
REGISTRATION_MODE_WEBAllow sign-ups on the website (in-game sign-up always works)true
USER_BYPASS_VERIFICATIONSkip emailed login codes; keep true without a mail servertrue
TOMYUM_SERVER_NAMEThe website's name for your server

Mail ​

Without these, mail is only written to the log.

NameWhat it doesExample
MAIL_DRIVERsmtp
MAIL_HOST, MAIL_PORT, MAIL_ENCRYPTIONYour SMTP serversmtp.example.com, 587, tls
MAIL_USERNAMEThe SMTP login[email protected]
MAIL_PASSWORD 🔒Its password or token
MAIL_ADDRESS, MAIL_SENDERThe From address and name[email protected]

Tickets ​

See tickets.

NameWhat it doesDefault
TICKETS_IMAP_HOSTTurns on reading the support mailbox over IMAPempty
TICKETS_IMAP_PORT, TICKETS_IMAP_FOLDER993, INBOX
TICKETS_IMAP_USERNAME, TICKETS_IMAP_PASSWORD 🔒The mailbox loginthe SMTP login
TICKETS_MAIL_DOMAINThe ticket addresses' domainthe site's, without osu.
TICKETS_ENABLEDfalse stops fetching

Beatmap ranking ​

NameWhat it doesDefault
BEATMAPSET_REQUIRED_HYPEHype before BNs can nominate1
BEATMAPSET_REQUIRED_NOMINATIONSNominations to qualify2
BEATMAPSET_MINIMUM_DAYS_FOR_RANKDays in qualified before ranking1
BEATMAPSET_RANK_PER_DAY, BEATMAPSET_RANK_PER_RUNHow many sets rank a day and per run (0: no limit)0, 0

Account connections ​

The website's Connections page (account settings), for linking an osu! account or Discord.

NameWhat it does
OSU_LINK_CLIENT_ID, OSU_LINK_CLIENT_SECRET 🔒osu! OAuth app for linking an osu! account
DISCORD_OAUTH_CLIENT_ID, DISCORD_OAUTH_CLIENT_SECRET 🔒Discord application for linking Discord

Set by docker-compose.yml ​

Values in osu-web.env don't override these: APP_URL, APP_KEY, SESSION_DOMAIN, DB_HOST, DB_USERNAME, DB_PASSWORD, REDIS_HOST, NOTIFICATION_REDIS_HOST, ES_HOST, ES_SOLO_SCORES_HOST, BEATMAPS_DIFFICULTY_CACHE_SERVER_URL, SHARED_INTEROP_SECRET, TOMYUM_ADMIN_URL, OSU_API_KEY, USER_ACHIEVEMENT_ICON_PREFIX, USER_BADGE_IMAGE_PREFIX, UPDATE_STREAMS, IS_DEVELOPMENT_DEPLOY. Change them in .env (where they come from it) or in a docker-compose.override.yml.

gateway.env ​

For TomYum.Gateway on its own machine.

Not in use yet ​

config/tomyum.yaml.example also has a storage section (R2, S3, OVH, Azure, local). Object storage isn't implemented yet, and TomYum doesn't read those settings: files go to the server-data volume.

TomYum is MIT licensed. Not affiliated with ppy Pty Ltd; osu! is a trademark of ppy Pty Ltd.