Skip to content

v2 Configurations ​

This page lists all configuration options available in the v2 services' config/*.json configuration files and their descriptions. For the v1 (.env) options, see Configurations.

Warning

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

Documentation Contributor Tip

This page is auto-generated, and any changes will be overwritten. If you want to modify the translation, please edit data/v2-configuration/en.js. The field definitions (paths, types, defaults) live in the sibling data/v2-configuration/definitions/ directory — do not maintain them on this page. Click the "Edit this page on GitHub" link at the bottom left to jump directly to the editing page of the translation file.

general.json — general configuration

ConfigurationDescriptionTypeDefault
UseLegacyDatabaseWhether to use the v1 MySQL (legacy) database. When set to false, the PostgreSQL database from PostgresqlConnectionString is used.booleantrue
MySqlHostMySQL Server Addressstring127.0.0.1
MySqlPortMySQL Server Portstring3306
MySqlDatabaseMySQL Database Namestringosu_api
MySqlUsernameMySQL Usernamestringosu_api
MySqlPasswordMySQL Passwordstringpassword
PostgresqlConnectionStringPostgreSQL connection string (used when UseLegacyDatabase is false). Format: Host=...;Port=...;Username=...;Password=...;Database=...stringHost=localhost;Port=5432;Username=g0v0;Password=password;Database=g0v0
RedisHostRedis Connection URLstringlocalhost:6379
JwtSecretKeyJWT Signing Keystringyour_jwt_secret_here
JwtAlgorithmJWT AlgorithmstringHS256
JwtAudienceJWT Audiencestring5
JwtIssuerJWT Issuerstringnull
OsuClientIdOAuth Client IDinteger5
OsuClientSecretOAuth Client SecretstringFGc9GAtyHzeQDshWP5Ah7dega8hJACAJpQtw6OXk
OsuWebClientIdWeb OAuth Client IDinteger6
OsuWebClientSecretWeb OAuth Client Secretstringyour_osu_web_client_secret_here
FetcherClientIdFetcher Client IDinteger0
FetcherClientSecretFetcher Client Secretstring""
FetcherBeatmapRawCacheExpireHoursBeatmap Cache Expiration (Hours)integer24
ServerUrlServer URLstringhttp://localhost:8000

game.json — gameplay feature flags

ConfigurationDescriptionTypeDefault
EnableRelaxEnable RX mod statisticsbooleanfalse
EnableAutopilotEnable AP mod statisticsbooleanfalse
EnableAllBeatmapLeaderboardEnable leaderboards for all beatmapsbooleanfalse

realtime.json — real-time game server configuration

ConfigurationDescriptionTypeDefault
SaveReplaysWhether to save replaysbooleantrue
ReplayUploaderConcurrencyReplay uploader concurrencyinteger4
MaxStartedScoresMaximum concurrent started scores per sessioninteger2
HostPlaylistLimitMaximum playlist items a host can addinteger50
GuestPlaylistLimitMaximum playlist items a guest can addinteger3
MultiplayerDisconnectGracePeriodHow long a disconnected player is kept in a multiplayer room (hh:mm:ss).string00:00:30
TournamentRoomRetentionPeriodHow long a tournament room is kept after it ends (hh:mm:ss)string00:30:00
Sentry.DsnSentry DSN; empty disables Sentry error monitoringstring""
Sentry.EnvironmentSentry environment tag (e.g. "production")string""
Sentry.TracesSampleRateSentry trace sample rate, 0–1float0.1
Sentry.SendDefaultPiiWhether to send default personal identifiable information (PII) to Sentrybooleanfalse

chat.json — chat configuration (optional)

Optional file: when it is not provided, chat configuration will fall back to the osu-web defaults.

ConfigurationDescriptionTypeDefault
ChannelLimitMaximum channels a client can join.integer10000
MessageLengthLimitMaximum length of a single message.integer450
AnnounceMessageLengthLimitMaximum length of an announcement message.integer1024
PublicBacklogLimitHoursHow long public channel message history is kept (hours).integer24
ActivityTimeoutSecondsChannel activity timeout (seconds); channels idle past this are closed.integer60
RecentMessageLimitRecent messages attached to a channel when joining.integer50
PublicMessageLimitPublic messages allowed per rate window.integer1
PublicMessageWindowSecondsPublic rate window (seconds).integer1
PrivateMessageLimitPrivate messages allowed per rate window.integer1
PrivateMessageWindowSecondsPrivate rate window (seconds).integer1

storage.json — storage configuration

Stores static assets such as replays and avatars.

ConfigurationDescriptionTypeDefault
TypeStorage Service Type: local, r2, s3enum(Local, S3, R2)Local
Local storage
local_storage_pathLocal storage directory pathstring./storage
Amazon S3
s3_access_key_idAWS access key IDstring""
s3_secret_access_keyAWS secret access keystring""
s3_bucket_nameS3 bucket namestring""
s3_region_nameS3 region, e.g. us-east-1stringus-east-1
s3_public_url_baseS3 public URL base (optional), used to build directly accessible asset URLsstring""
Cloudflare R2
r2_account_idCloudflare account IDstring""
r2_access_key_idR2 access key IDstring""
r2_secret_access_keyR2 secret access keystring""
r2_bucket_nameR2 bucket namestring""
r2_public_url_baseR2 public URL base (optional), used to build directly accessible asset URLsstring""

Released under the MIT License