11# NPPS4 sample configuration file.
2+ # NPPS4 can be configured in 2 ways:
3+ # 1. By copying this file to `config.toml` and modifying it
4+ # 2. By specifying environment variable to desired value for each field.
5+ # Values in this config.sample.toml is what NPPS4 is configured by default.
26
37[main ]
48# This is main configuration.
711# Path is relative to the project root directory.
812# Note: When running behind container, don't change this. All paths that
913# specify "data/" is the directory where this config.sample.toml is placed.
14+ # Environment Variable: NPPS4_CONFIG_MAIN_DATADIR
1015data_directory = " data"
1116
1217# Secret key used for various things.
1318# If this secret key is compromised, please change it!
1419# Also you definitely must change this!
20+ # Environment Variable: NPPS4_CONFIG_MAIN_SECRETKEY
1521secret_key = " Hello World"
1622
1723# Server private key.
1824# You must have server private key setup alongside with your client
1925# patched to use the server public key.
26+ # Environment Variable: NPPS4_CONFIG_MAIN_PKEY
2027server_private_key = " default_server_key.pem"
2128
2229# Server private key password.
2330# If your server private key password is encrypted, specify it here.
2431# Alternatively, the environment variable "NPPS_KEY_PASSWORD" takes precedence
2532# over this value.
2633# IF your private key is not encrypted, specify empty string.
34+ # Environment Variable: NPPS4_CONFIG_MAIN_PKEYPASS (or) NPPS_KEY_PASSWORD
2735server_private_key_password = " "
2836
2937# Server-specific data.
3038# Server-specific data controls server-specific variable such as live-related drops.
3139# A sensible default based on version 59.4 is provided.
40+ # Environment Variable: NPPS4_CONFIG_MAIN_SERVERDATA
3241server_data = " npps4/server_data.json"
3342
3443# Session token expiration in seconds.
3544# If you don't want user token to expire, set this to 0.
3645# The default is 72 hours (3 days).
46+ # Environment Variable: NPPS4_CONFIG_MAIN_TOKENEXPIRY
3747session_expiry = 259200
3848
3949# For live replay, store the backup of live show notes data?
4050# If this is false, then players will lose their live show replays when the
4151# beatmap data is modified.
4252# If this is true, then player will still able to play their live show replays
4353# with the unmodified beatmap data but increase the database size.
54+ # Environment Variable: NPPS4_CONFIG_MAIN_SAVENOTESLIST
4455save_notes_list = false
4556
4657[database ]
@@ -58,8 +69,10 @@ save_notes_list = false
5869# * MySQL/MariaDB: mysql+asyncmy, mysql+aiomysql
5970# For additional database backend please consult SQLAlchemy dialects:
6071# https://docs.sqlalchemy.org/en/20/dialects/
61- # Note: Docker image of NPPS4 does NOT contain MySQL/MariaDB support. Consider
62- # using PostgreSQL instead.
72+ # Note: Docker image of NPPS4 only ships with these database dialect support:
73+ # * sqlite+aiosqlite
74+ # * postgresql+psycopg
75+ # Environment Variable: NPPS4_CONFIG_DATABASE_URL
6376url = " sqlite+aiosqlite:///data/main.sqlite3"
6477
6578[download ]
@@ -83,16 +96,19 @@ url = "sqlite+aiosqlite:///data/main.sqlite3"
8396# "custom" - Use custom Python script to provide downloader.
8497# Please see "external/custom_downloader.py" on how to implement
8598# your own download backend provider.
99+ # Environment Variable: NPPS4_CONFIG_DOWNLOAD_BACKEND
86100backend = " none"
87101
88102# Send patched server_info.json automatically?
89103# This requires honky-py (installed as part of NPPS4 requirements). There's no
90104# reason to turn this off unless your download API or archive already provides
91105# patched server_info.json.
106+ # Environment Variable: NPPS4_CONFIG_DOWNLOAD_FIXSERVERINFO
92107send_patched_server_info = true
93108
94109[download .none ]
95110# What's the latest client version?
111+ # Environment Variable: NPPS4_CONFIG_DOWNLOAD_NONE_VERSION
96112client_version = " 59.4"
97113
98114[download .n4dlapi ]
@@ -108,46 +124,55 @@ client_version = "59.4"
108124# information about the NPPS4 Download API server, then specify
109125# "http://example.com/n4dlapi"
110126# Note: Make sure it's allowed to access internet if NPPS4 is behind container.
127+ # Environment Variable: NPPS4_CONFIG_DOWNLOAD_N4DLAPI_SERVER
111128server = " https://localhost:8000"
112129
113130# What's the Shared Key used to communicate with the NPPS4 Download API
114131# server?
115132# If your NPPS4 Download API server is public, then specify empty string.
133+ # Environment Variable: NPPS4_CONFIG_DOWNLOAD_N4DLAPI_KEY
116134shared_key = " "
117135
118136[download .internal ]
119137# Where's the "archive-root" directory is stored?
120138# Path is relative to the project root directory.
121139# Note: When NPPS4 is run behind container, extra care must be taken such that
122140# the directory is accessible inside the container.
141+ # Environment Variable: NPPS4_CONFIG_DOWNLOAD_INTERNAL_ROOT
123142archive_root = " archive-root"
124143
125144[download .custom ]
126145# Specify custom download provider script.
127146# Path is relative to the project root directory.
147+ # Environment Variable: NPPS4_CONFIG_DOWNLOAD_CUSTOM_FILE
128148file = " external/custom_downloader.py"
129149
130150[game ]
131151# Game-specific configuration
132152
133153# Specify badwords checker script.
134154# Path is relative to the project root directory.
155+ # Environment Variable: NPPS4_CONFIG_GAME_BADWORDS
135156badwords = " external/badwords.py"
136157
137158# Specify login bonus reward generator script.
138159# Path is relative to the project root directory.
160+ # Environment Variable: NPPS4_CONFIG_GAME_LOGINBONUS
139161login_bonus = " external/login_bonus.py"
140162
141163# Specify beatmap provider script.
142164# Path is relative to the project root directory.
165+ # Environment Variable: NPPS4_CONFIG_GAME_BEATMAPS
143166beatmaps = " external/beatmap.py"
144167
145168# Specify Live Show! unit drop script.
146169# Path is relative to the project root directory.
170+ # Environment Variable: NPPS4_CONFIG_GAME_UNITDROP
147171live_unit_drop = " external/live_unit_drop.py"
148172
149173# Specify Live Show! Reward Box drop script.
150174# Path is relative to the project root directory.
175+ # Environment Variable: NPPS4_CONFIG_GAME_BOXDROP
151176live_box_drop = " external/live_box_drop.py"
152177
153178[iex ]
@@ -156,26 +181,33 @@ live_box_drop = "external/live_box_drop.py"
156181
157182# Enable account data export.
158183# Export UI can be accessed through /webview.php/helper/export
184+ # Environment Variable: NPPS4_CONFIG_IEX_EXPORT
159185enable_export = true
160186
161187# Enable account data import.
162188# Import UI can be accessed through /webview.php/helper/import
189+ # Environment Variable: NPPS4_CONFIG_IEX_IMPORT
163190enable_import = false
164191
165192# When importing account through import UI, bypass any signature check.
166193# Normally, only account exported with same "main.secret_key" can be imported
167194# back.
195+ # Environment Variable: NPPS4_CONFIG_IEX_BYPASS
168196bypass_signature = false
169197
170198[advanced ]
171199# This is advanced configuration.
172- # In most cases, you don't have to change anything.
200+ # In almost all cases, you don't have to change anything here .
173201
174202# Base XORPAD key.
203+ # Environment Variable: NPPS4_CONFIG_ADVANCED_BASEKEY
175204base_xorpad = " eit4Ahph4aiX4ohmephuobei6SooX9xo"
176205# The server application key.
206+ # Environment Variable: NPPS4_CONFIG_ADVANCED_APPKEY
177207application_key = " b6e6c940a93af2357ea3e0ace0b98afc"
178208# Consumer key.
209+ # Environment Variable: NPPS4_CONFIG_ADVANCED_CONSUMERKEY
179210consumer_key = " lovelive_test"
180211# Should be the X-Message-Code sent by client be verified?
212+ # Environment Variable: NPPS4_CONFIG_ADVANCED_XMC
181213verify_xmc = true
0 commit comments