Configuration File
Pokemon Showdown usesconfig/config.js for server configuration. This file must be created from the example template:
The configuration file supports hot-reloading by default. Changes will be automatically detected and applied without restarting the server.
Network Settings
Server Port
The port your server listens on for connections:config/config.js
8000
Bind Address
The network interface address to bind to:config/config.js
0.0.0.0 (all interfaces)
SSL/HTTPS Configuration
Enable secure WebSocket connections (WSS) for HTTPS access:config/config.js
null (disabled)
The client requires port 443 for SSL. If you use a different port, you’ll need to forward it to 443 using iptables or similar tools.
Let’s Encrypt Example
Here’s an example deploy script for Let’s Encrypt certificates:WebSocket Compression
Enable message compression for WebSocket connections:config/config.js
null (disabled)
Proxy Configuration
Trust X-Forwarded-For headers from specific proxy IPs:config/config.js
false (don’t trust any proxies)
Each string should be either an IP address or a subnet in CIDR notation. Leave as
false unless you’re running behind a reverse proxy.Performance Settings
Subprocess Configuration
Configure child processes for various server tasks:config/config.js
Simulator workers: Only increase for servers with hundreds of concurrent battles. For most servers, leave at 1.
config/config.js
Lazy Sockets
Disable automatic network initialization:config/config.js
false
Use this if you want to manually connect the server to the network or run it offline.
Chat and Moderation
Modchat Settings
Set minimum rank requirements for participation:config/config.js
false (anyone) or a group symbol ('+', '%', '@', '#', '~') or 'autoconfirmed'
These settings can be used as a whitelist - set to
'+' and voice every user you want whitelisted.Join/Leave Messages
Control join and leave message display:config/config.js
Battle Reporting
Show battle start messages in the lobby:config/config.js
Disable
reportbattlejoins on large tournament servers to reduce chat spam.Link Restrictions
Restrict link posting to autoconfirmed users:config/config.js
false
Set to true to combat spam and malicious links.
Name Filter
Remove Unicode characters used for impersonation:config/config.js
false (filter enabled)
Punishment Settings
Punishment Monitor
Notify staff when users accumulate room punishments:config/config.js
3 punishments
Set to 0 to disable the monitor.
Auto-Lock
Automatically lock users with multiple room bans:config/config.js
false
Requires
monitorminpunishments to be greater than 0. Auto-locks users with 3+ active room bans.Throttles and Checks
Disable rate limiting and IP checking (for development):config/config.js
Logging
Chat Logging
Log all chat room messages:config/config.js
Chat Log Reader
Choose the search method for chat logs:config/config.js
'fs' (Node.js filesystem) or 'ripgrep' (faster, requires ripgrep installed)
Game Settings
Pokemon of the Day
Set a Pokemon to always appear in slot #2 of Random Battle teams:config/config.js
'' (disabled)
Forced Timer
Force the battle timer on for all battles:config/config.js
Draw Requests
Allow players to offer and accept draws:config/config.js
Force Registration
Require registration for ladder battles above a certain ELO:config/config.js
Tournament Settings
config/config.js
Security Settings
Crash Guard
Write errors to log instead of crashing:config/config.js
true
While enabled by default for convenience, it’s generally better to let Node.js crash and restart the server properly.
Crash Guard Email
Send email alerts for crashes (requires nodemailer):config/config.js
null (disabled)
Install nodemailer to use this feature:
Auto Lockdown
Automatically shut down after lockdown battles finish:config/config.js
Console Access
IP addresses allowed to use the developer console:config/config.js
['127.0.0.1'] (localhost only)
Backdoor Access
Allow Pokemon Showdown system operators to provide tech support:config/config.js
true
This gives Showdown system operators (like Zarel) console admin access for technical support. Disable if you don’t trust them with admin access.
Development Mode
Allow login without authentication (development only):config/config.js
Login Server
Configure authentication with the main Pokemon Showdown login server:config/config.js
Routes
Configure Pokemon Showdown hosting domains:config/config.js
Advanced Options
Config Watch
Automatically reload config file on changes:config/config.js
Hotpatch Restrictions
Disable/hotpatch all command:
config/config.js
Battle Search
Configure battle search functionality:config/config.js
REPL Sockets
Enable/configure REPL (Read-Eval-Print Loop) sockets:config/config.js
Inactive User Threshold
How long before inactive users are pruned:config/config.js
Appeal URL
URL for users to appeal disciplinary actions:config/config.js
Startup Hook
Function to call when server is ready:config/config.js
Next Steps
Administration
Set up user management and moderation
Security
Secure your production server
