Skip to content

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!

Documentation Contributor Tip

This file is auto-generated, and any changes will be overwritten. If you want to modify the translation, please edit data/configuration/en.js. Click the "Edit this page on GitHub" link at the bottom left to jump directly to the editing page of that file.

Last generated on 2026-02-20T09:09:06Z (commit: 0295b5858374cc9d93e6a2647e40cff01a686e2b).

Database Settings

ConfigurationDescriptionTypeDefault
MYSQL_HOST MySQL Server Addressstringlocalhost
MYSQL_PORT MySQL Server Portinteger3306
MYSQL_DATABASE MySQL Database Namestringosu_api
MYSQL_USER MySQL Usernamestringosu_api
MYSQL_PASSWORD MySQL Passwordstringpassword
MYSQL_ROOT_PASSWORD MySQL Root Passwordstringpassword
REDIS_URL Redis Connection URLstringredis://127.0.0.1:6379

JWT Settings

ConfigurationDescriptionTypeDefault
JWT_SECRET_KEY JWT Signing Keystringyour_jwt_secret_here
JWT_ALGORITHM JWT AlgorithmstringHS256
ACCESS_TOKEN_EXPIRE_MINUTES Access Token Expiration Time (Min)integer1440
REFRESH_TOKEN_EXPIRE_MINUTES Refresh Token Expiration Time (Min)integer21600
JWT_AUDIENCE JWT Audiencestring5
JWT_ISSUER JWT Issuerstringnull

OAuth Settings

ConfigurationDescriptionTypeDefault
OSU_CLIENT_ID OAuth Client IDinteger5
OSU_CLIENT_SECRET OAuth Client SecretstringFGc9GAtyHzeQDshWP5Ah7dega8hJACAJpQtw6OXk
OSU_WEB_CLIENT_ID Web OAuth Client IDinteger6
OSU_WEB_CLIENT_SECRET Web OAuth Client Secretstringyour_osu_web_client_secret_here

Server Settings

ConfigurationDescriptionTypeDefault
HOST Server Listening Addressstring0.0.0.0
PORT Server Listening Portinteger8000
DEBUG Whether to enable Debug Modebooleanfalse
CORS_URLS Additional CORS allowed domain list (JSON format)array<string>[]
SERVER_URL Server URLstringhttp://localhost:8000/
FRONTEND_URL Frontend URL, will redirect to this URL when accessing URL opened from game. Empty means no redirect.stringnull
ENABLE_RATE_LIMIT Whether to enable Rate Limitingbooleantrue

Fetcher Settings

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

ConfigurationDescriptionTypeDefault
FETCHER_CLIENT_ID Fetcher Client IDstring""
FETCHER_CLIENT_SECRET Fetcher Client Secretstring""

Log Settings

ConfigurationDescriptionTypeDefault
LOG_LEVEL Log LevelstringINFO

Verification Service Settings

ConfigurationDescriptionTypeDefault
ENABLE_TOTP_VERIFICATION Whether to enable TOTP Two-Factor Authenticationbooleantrue
TOTP_ISSUER Issuer Name in TOTP Authenticatorstringnull
TOTP_SERVICE_NAME Service Name displayed in TOTP Authenticatorstringg0v0! Lazer Server
TOTP_USE_USERNAME_IN_LABEL Use username instead of email in TOTP labelbooleantrue
ENABLE_TURNSTILE_VERIFICATION Whether to enable Cloudflare Turnstile Verification (Non-osu clients only)booleanfalse
TURNSTILE_SECRET_KEY Cloudflare Turnstile Secret Keystring""
TURNSTILE_DEV_MODE Turnstile Dev Mode (Skip verification, for local dev)booleanfalse
ENABLE_EMAIL_VERIFICATION Whether to enable Email Verificationbooleanfalse
ENABLE_SESSION_VERIFICATION Whether to enable Session Verification Middlewarebooleantrue
ENABLE_MULTI_DEVICE_LOGIN Whether to allow multi-device login simultaneouslybooleantrue
MAX_TOKENS_PER_CLIENT Max tokens per client per userinteger10
DEVICE_TRUST_DURATION_DAYS Device Trust Duration Daysinteger30

Email Service Settings

Configure the email provider and related parameters.

If EMAIL_PROVIDER starts with -, the server will try to load the email provider implementation from the plugin corresponding to the id after it. If EMAIL_PROVIDER does not contain ., it is considered a built-in email provider name. Currently, there is one built-in provider: smtp. Otherwise, the server will try to load the email provider implementation from the module path specified by EMAIL_PROVIDER.

smtp (Default)

bash
EMAIL_PROVIDER="smtp"
EMAIL_PROVIDER_CONFIG='{
    "smtp_server": "smtp.example.com",
    "smtp_port": 587,
    "smtp_username": "your_smtp_username",
    "smtp_password": "your_smtp_password",
}'
ConfigurationDescriptionTypeDefault
EMAIL_PROVIDER Email Providerstringsmtp
EMAIL_PROVIDER_CONFIG Email Provider Config (JSON)objectnull
FROM_EMAIL Sender Emailstringnoreply@example.com
FROM_NAME Sender Namestringosu! server

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.

ConfigurationDescriptionTypeDefault
SENTRY_DSN Sentry DSN, empty to disable Sentrystringnull
NEW_RELIC_ENVIRONMENT New Relic Environment ID, set to "production" or "development"stringnull

GeoIP Settings

ConfigurationDescriptionTypeDefault
MAXMIND_LICENSE_KEY MaxMind License Key (For downloading offline IP DB)string""
GEOIP_DEST_DIR GeoIP Database Storage Directorystring./geoip
GEOIP_UPDATE_DAY GeoIP Weekly Update Day (0=Mon, 6=Sun)integer1
GEOIP_UPDATE_HOUR GeoIP Weekly Update Hour (0-23)integer2

Game Settings

ConfigurationDescriptionTypeDefault
ENABLE_RX

(ENABLE_OSU_RX)

Enable RX mod statisticsbooleanfalse
ENABLE_AP

(ENABLE_OSU_AP)

Enable AP mod statisticsbooleanfalse
ENABLE_SUPPORTER_FOR_ALL_USERS Enable supporter status for all new usersbooleanfalse
ENABLE_ALL_BEATMAP_LEADERBOARD Enable leaderboards for all beatmapsbooleanfalse
ENABLE_ALL_BEATMAP_PP Allow any beatmap to gain PPbooleanfalse
SEASONAL_BACKGROUNDS Seasonal Background URL Listarray<string>[]
BEATMAP_TAG_TOP_COUNT Minimum votes required for tags to be shown in result listinteger2
OLD_SCORE_PROCESSING_MODE Old Score Processing Mode strict: delete all related scores, pp, stats, replays normal: delete pp and leaderboard scoresenum(strict, normal)normal
SCORING_MODE Scoring Mode: standardised or classicenum(standardised, classic)standardised

Performance Calculation Settings

Configure performance calculator and its parameters.

If CALCULATOR starts with -, the server will try to load the calculator implementation from the plugin corresponding to the id after it. If CALCULATOR does not contain ., it is considered a built-in calculator name. Currently, there are two built-in calculators: performance_server and rosu. Otherwise, the server will try to load the calculator implementation from the module path specified by CALCULATOR.

osu-performance-server (Default)

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

rosu-pp-py

bash
CALCULATOR="rosu"
CALCULATOR_CONFIG='{}'
ConfigurationDescriptionTypeDefault
CALCULATOR Performance Calculatorstringperformance_server
CALCULATOR_CONFIG Performance Calculator Config (JSON format), see above for detailsobject<string, unknown>{ "server_url": "http://localhost:5225" }
FALLBACK_NO_CALCULATOR_PP Use simplified pp calculation as fallback when calculator doesn't support a modebooleanfalse

Cache Settings

ConfigurationDescriptionTypeDefault
ENABLE_BEATMAP_PRELOAD Enable Beatmap Cache Preloadbooleantrue
BEATMAP_CACHE_EXPIRE_HOURS Beatmap Cache Expiration (Hours)integer24
BEATMAPSET_CACHE_EXPIRE_SECONDS Beatmapset Cache Expiration (Seconds)integer3600
ENABLE_RANKING_CACHE Enable Leaderboard Cachebooleantrue
RANKING_CACHE_EXPIRE_MINUTES Leaderboard Cache Expiration (Minutes)integer10
RANKING_CACHE_REFRESH_INTERVAL_MINUTES Leaderboard Cache Refresh Interval (Minutes)integer10
RANKING_CACHE_MAX_PAGES Max Cached Pagesinteger20
RANKING_CACHE_TOP_COUNTRIES Cache Top N Country Leaderboardsinteger20
ENABLE_USER_CACHE_PRELOAD Enable User Cache Preloadbooleantrue
USER_CACHE_EXPIRE_SECONDS User Cache Expiration (Seconds)integer300
USER_SCORES_CACHE_EXPIRE_SECONDS User Scores Cache Expiration (Seconds)integer60
USER_BEATMAPSETS_CACHE_EXPIRE_SECONDS User Beatmapsets Cache Expiration (Seconds)integer600
USER_CACHE_MAX_PRELOAD_USERS Max Preloaded Usersinteger200

Asset Proxy Settings

ConfigurationDescriptionTypeDefault
ENABLE_ASSET_PROXY Enable Asset Proxybooleanfalse
CUSTOM_ASSET_DOMAIN Custom Asset Domainstringg0v0.top
ASSET_PROXY_PREFIX Custom prefix for assets.ppy.shstringassets-ppy
AVATAR_PROXY_PREFIX Custom prefix for a.ppy.shstringa-ppy
BEATMAP_PROXY_PREFIX Custom prefix for b.ppy.shstringb-ppy

Beatmap Sync Settings

ConfigurationDescriptionTypeDefault
ENABLE_AUTO_BEATMAP_SYNC Enable Auto Beatmap Syncbooleanfalse
BEATMAP_SYNC_INTERVAL_MINUTES Auto Beatmap Sync Interval (Minutes)integer60

Anti-Cheat Settings

ConfigurationDescriptionTypeDefault
BANNED_NAME Banned Username Listarray<string>[ "mrekk", "vaxei", "btmc", "cookiezi", "peppy", "saragi", "chocomint" ]
ALLOW_DELETE_SCORES Allow users to delete their own scoresbooleanfalse
CHECK_RULESET_VERSION Check Custom Ruleset Versionbooleantrue
CHECK_CLIENT_VERSION Check Client Versionbooleantrue
CLIENT_VERSION_URLS Client Version List URLs, see https://github.com/GooGuTeam/g0v0-client-versions to add your own clientarray<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"
}'
ConfigurationDescriptionTypeDefault
STORAGE_SERVICE Storage Service Type: local, r2, s3enum(local, r2, s3)local
STORAGE_SETTINGS Storage Service Configuration (JSON)LocalStorageSettings | CloudflareR2Settings | AWSS3StorageSettings{ "local_storage_path": "./storage" }

Plugin Settings

ConfigurationDescriptionTypeDefault
PLUGIN_DIRS Plugin Directory Listarray<string>[ "./plugins" ]
DISABLED_PLUGINS Disabled Plugin Listarray<string>[]

Released under the MIT License