Skip to content

Last Generated: 2026-01-29 12:29:48 UTC at commit eb7dd2b74e8e77d0ed8c91a880dc17a3008e9079

Configurations

This page lists all available configuration options in the .env file and their descriptions.

Warning

In a production environment, be sure to change the default keys and passwords!

Database Settings

Variable NameDescriptionTypeDefault Value
MYSQL_HOSTMySQL Server Addressstringlocalhost
MYSQL_PORTMySQL Server Portinteger3306
MYSQL_DATABASEMySQL Database Namestringosu_api
MYSQL_USERMySQL Usernamestringosu_api
MYSQL_PASSWORDMySQL Passwordstringpassword
MYSQL_ROOT_PASSWORDMySQL Root Passwordstringpassword
REDIS_URLRedis Connection URLstringredis://127.0.0.1:6379

JWT Settings

Variable NameDescriptionTypeDefault Value
JWT_SECRET_KEYJWT Signing Keystringyour_jwt_secret_here
JWT_ALGORITHMJWT AlgorithmstringHS256
ACCESS_TOKEN_EXPIRE_MINUTESAccess Token Expiration Time (Min)integer1440
REFRESH_TOKEN_EXPIRE_MINUTESRefresh Token Expiration Time (Min)integer21600
JWT_AUDIENCEJWT Audiencestring5
JWT_ISSUERJWT Issuerstring / nullnull

OAuth Settings

Variable NameDescriptionTypeDefault Value
OSU_CLIENT_IDOAuth Client IDinteger5
OSU_CLIENT_SECRETOAuth Client SecretstringFGc9GAtyHzeQDshWP5Ah7dega8hJACAJpQtw6OXk
OSU_WEB_CLIENT_IDWeb OAuth Client IDinteger6
OSU_WEB_CLIENT_SECRETWeb OAuth Client Secretstringyour_osu_web_client_secret_here

Server Settings

Variable NameDescriptionTypeDefault Value
HOSTServer Listening Addressstring0.0.0.0
PORTServer Listening Portinteger8000
DEBUGWhether to enable Debug Modebooleanfalse
CORS_URLSAdditional CORS allowed domain list (JSON format)array[string (url)][]
SERVER_URLServer URLstring (url)http://localhost:8000/
FRONTEND_URLFrontend URL, will redirect to this URL when accessing URL opened from game. Empty means no redirect.string (url) / nullnull
ENABLE_RATE_LIMITWhether to enable Rate Limitingbooleantrue

Fetcher Settings

Fetcher is used to fetch data from osu! official API, using osu! official API OAuth 2.0 authentication.

Variable NameDescriptionTypeDefault Value
FETCHER_CLIENT_IDFetcher Client IDstring""
FETCHER_CLIENT_SECRETFetcher Client Secretstring""

Log Settings

Variable NameDescriptionTypeDefault Value
LOG_LEVELLog LevelstringINFO

Verification Service Settings

Variable NameDescriptionTypeDefault Value
ENABLE_TOTP_VERIFICATIONWhether to enable TOTP Two-Factor Authenticationbooleantrue
TOTP_ISSUERIssuer Name in TOTP Authenticatorstring / nullnull
TOTP_SERVICE_NAMEService Name displayed in TOTP Authenticatorstringg0v0! Lazer Server
TOTP_USE_USERNAME_IN_LABELUse username instead of email in TOTP labelbooleantrue
ENABLE_TURNSTILE_VERIFICATIONWhether to enable Cloudflare Turnstile Verification (Non-osu clients only)booleanfalse
TURNSTILE_SECRET_KEYCloudflare Turnstile Secret Keystring""
TURNSTILE_DEV_MODETurnstile Dev Mode (Skip verification, for local dev)booleanfalse
ENABLE_EMAIL_VERIFICATIONWhether to enable Email Verificationbooleanfalse
ENABLE_SESSION_VERIFICATIONWhether to enable Session Verification Middlewarebooleantrue
ENABLE_MULTI_DEVICE_LOGINWhether to allow multi-device login simultaneouslybooleantrue
MAX_TOKENS_PER_CLIENTMax tokens per client per userinteger10
DEVICE_TRUST_DURATION_DAYSDevice Trust Duration Daysinteger30
EMAIL_PROVIDEREmail Provider: smtp (SMTP) or mailersend (MailerSend)enum(smtp, mailersend)smtp
SMTP_SERVERSMTP Server Addressstringlocalhost
SMTP_PORTSMTP Server Portinteger587
SMTP_USERNAMESMTP Usernamestring""
SMTP_PASSWORDSMTP Passwordstring""
FROM_EMAILSender Emailstringnoreply@example.com
FROM_NAMESender Namestringosu! server
MAILERSEND_API_KEYMailerSend API Keystring""
MAILERSEND_FROM_EMAILMailerSend Sender Email (Need verification in MailerSend)string""

Monitoring Settings

Configure application monitoring options, such as Sentry and New Relic.

Place newrelic.ini config file in the project root to automatically enable New Relic monitoring. If config file does not exist or newrelic package is not installed, New Relic initialization will be skipped.

Variable NameDescriptionTypeDefault Value
SENTRY_DSNSentry DSN, empty to disable Sentrystring (url) / nullnull
NEW_RELIC_ENVIRONMENTNew Relic Environment ID, set to "production" or "development"string / nullnull

GeoIP Settings

Variable NameDescriptionTypeDefault Value
MAXMIND_LICENSE_KEYMaxMind License Key (For downloading offline IP DB)string""
GEOIP_DEST_DIRGeoIP Database Storage Directorystring./geoip
GEOIP_UPDATE_DAYGeoIP Weekly Update Day (0=Mon, 6=Sun)integer1
GEOIP_UPDATE_HOURGeoIP Weekly Update Hour (0-23)integer2

Game Settings

Variable NameDescriptionTypeDefault Value
ENABLE_RX (ENABLE_RX, ENABLE_OSU_RX)Enable RX mod statisticsbooleanfalse
ENABLE_AP (ENABLE_AP, ENABLE_OSU_AP)Enable AP mod statisticsbooleanfalse
ENABLE_SUPPORTER_FOR_ALL_USERSEnable supporter status for all new usersbooleanfalse
ENABLE_ALL_BEATMAP_LEADERBOARDEnable leaderboards for all beatmapsbooleanfalse
ENABLE_ALL_BEATMAP_PPAllow any beatmap to gain PPbooleanfalse
SEASONAL_BACKGROUNDSSeasonal Background URL Listarray[string][]
BEATMAP_TAG_TOP_COUNTMinimum votes required for tags to be shown in result listinteger2
OLD_SCORE_PROCESSING_MODEOld Score Processing Mode
strict: delete all related scores, pp, stats, replays
normal: delete pp and leaderboard scores
enum(strict, normal)normal
SCORING_MODEScoring Mode: standardised or classicenum(standardised, classic)standardised

Performance Calculation Settings

Configure performance calculator and its parameters.

osu-performance-server (Default)

bash
CALCULATOR="performance_server"
CALCULATOR_CONFIG='{
    "server_url": "http://localhost:5225"
}'

rosu-pp-py

bash
CALCULATOR="rosu"
CALCULATOR_CONFIG='{}'
Variable NameDescriptionTypeDefault Value
CALCULATORPerformance Calculatorenum(rosu, performance_server)performance_server
CALCULATOR_CONFIGPerformance Calculator Config (JSON format), see above for detailsobject[string, any]{"server_url": "http://localhost:5225"}
FALLBACK_NO_CALCULATOR_PPUse simplified pp calculation as fallback when calculator doesn't support a modebooleanfalse

Cache Settings

Beatmap Cache

Variable NameDescriptionTypeDefault Value
ENABLE_BEATMAP_PRELOADEnable Beatmap Cache Preloadbooleantrue
BEATMAP_CACHE_EXPIRE_HOURSBeatmap Cache Expiration (Hours)integer24
BEATMAPSET_CACHE_EXPIRE_SECONDSBeatmapset Cache Expiration (Seconds)integer3600

Leaderboard Cache

Variable NameDescriptionTypeDefault Value
ENABLE_RANKING_CACHEEnable Leaderboard Cachebooleantrue
RANKING_CACHE_EXPIRE_MINUTESLeaderboard Cache Expiration (Minutes)integer10
RANKING_CACHE_REFRESH_INTERVAL_MINUTESLeaderboard Cache Refresh Interval (Minutes)integer10
RANKING_CACHE_MAX_PAGESMax Cached Pagesinteger20
RANKING_CACHE_TOP_COUNTRIESCache Top N Country Leaderboardsinteger20

User Cache

Variable NameDescriptionTypeDefault Value
ENABLE_USER_CACHE_PRELOADEnable User Cache Preloadbooleantrue
USER_CACHE_EXPIRE_SECONDSUser Cache Expiration (Seconds)integer300
USER_SCORES_CACHE_EXPIRE_SECONDSUser Scores Cache Expiration (Seconds)integer60
USER_BEATMAPSETS_CACHE_EXPIRE_SECONDSUser Beatmapsets Cache Expiration (Seconds)integer600
USER_CACHE_MAX_PRELOAD_USERSMax Preloaded Usersinteger200

Asset Proxy Settings

Variable NameDescriptionTypeDefault Value
ENABLE_ASSET_PROXYEnable Asset Proxybooleanfalse
CUSTOM_ASSET_DOMAINCustom Asset Domainstringg0v0.top
ASSET_PROXY_PREFIXCustom prefix for assets.ppy.shstringassets-ppy
AVATAR_PROXY_PREFIXCustom prefix for a.ppy.shstringa-ppy
BEATMAP_PROXY_PREFIXCustom prefix for b.ppy.shstringb-ppy

Beatmap Sync Settings

Variable NameDescriptionTypeDefault Value
ENABLE_AUTO_BEATMAP_SYNCEnable Auto Beatmap Syncbooleanfalse
BEATMAP_SYNC_INTERVAL_MINUTESAuto Beatmap Sync Interval (Minutes)integer60

Anti-Cheat Settings

Variable NameDescriptionTypeDefault Value
SUSPICIOUS_SCORE_CHECKEnable Suspicious Score Check (pp>3000)booleantrue
BANNED_NAMEBanned Username Listarray[string]["mrekk", "vaxei", "btmc", "cookiezi", "peppy", "saragi", "chocomint"]
ALLOW_DELETE_SCORESAllow users to delete their own scoresbooleanfalse
CHECK_RULESET_VERSIONCheck Custom Ruleset Versionbooleantrue
CHECK_CLIENT_VERSIONCheck Client Versionbooleantrue
CLIENT_VERSION_URLSClient Version List URLs. See https://github.com/GooGuTeam/g0v0-client-versions to add your ownarray[string]["https://raw.githubusercontent.com/GooGuTeam/g0v0-client-versions/main/version_list.json"]

Storage Service Settings

Used for storing replay files, avatars, etc.

Local storage saves files in the server's local file system, suitable for development and small-scale deployment.

bash
STORAGE_SERVICE="local"
STORAGE_SETTINGS='{"local_storage_path": "./storage"}'
bash
STORAGE_SERVICE="r2"
STORAGE_SETTINGS='{
  "r2_account_id": "your_cloudflare_account_id",
  "r2_access_key_id": "your_r2_access_key_id",
  "r2_secret_access_key": "your_r2_secret_access_key",
  "r2_bucket_name": "your_bucket_name",
  "r2_public_url_base": "https://your-custom-domain.com"
}'

AWS S3 Storage

bash
STORAGE_SERVICE="s3"
STORAGE_SETTINGS='{
  "s3_access_key_id": "your_aws_access_key_id",
  "s3_secret_access_key": "your_aws_secret_access_key",
  "s3_bucket_name": "your_s3_bucket_name",
  "s3_region_name": "us-east-1",
  "s3_public_url_base": "https://your-custom-domain.com"
}'
Variable NameDescriptionTypeDefault Value
STORAGE_SERVICEStorage Service Type: local, r2, s3enum(local, r2, s3)local
STORAGE_SETTINGSStorage Service Configuration (JSON)LocalStorageSettings / CloudflareR2Settings / AWSS3StorageSettings{"local_storage_path":"./storage"}

Spectator Server Settings

Variable NameDescriptionTypeDefault Value
SAVE_REPLAYSWhether to save replays, set to 1 to enableboolean0
REDIS_HOSTRedis Server Addressstringlocalhost
SHARED_INTEROP_DOMAINAPI Server (this service) Addressstring (url)http://localhost:8000
SERVER_PORTSpectator Server Portinteger8006
SP_SENTRY_DSNSpectator Server Sentry DSNstringnull
MATCHMAKING_ROOM_ROUNDSMatchmaking Room Roundsinteger5
MATCHMAKING_ALLOW_SKIPWhether to allow users to skip matchmaking phasebooleanfalse
MATCHMAKING_LOBBY_UPDATE_RATEMatchmaking Lobby Update Rate (Seconds)integer5
MATCHMAKING_QUEUE_UPDATE_RATEMatchmaking Queue Update Rate (Seconds)integer1
MATCHMAKING_QUEUE_BAN_DURATIONBan duration for players rejecting invitations in matchmaking (Seconds)integer60
MATCHMAKING_POOL_SIZENumber of beatmaps in each matchmaking roominteger50

Released under the MIT License