pokemon-showdown/server
2023-11-10 09:43:24 -06:00
..
artemis Migrate to esbuild for compilation (#9203) 2022-12-22 15:19:29 -06:00
chat-commands Core: Reorder blockpms checks to waste less space 2023-11-09 15:12:54 -06:00
chat-plugins Friends: Add 'add friend' button to the main page 2023-11-10 09:43:24 -06:00
modlog Add permablacklist to /pl 2023-10-09 10:06:14 -05:00
private-messages Remove duplicated spawn code 2023-11-04 23:24:53 -05:00
static Server: Specify port when redirecting localhost to psim.us 2023-01-05 19:18:21 -06:00
tournaments Fix checks 2023-09-28 10:38:50 -05:00
chat-formatter.ts Chat: Don't hyperlink parts of words with common TLDs (#8891) 2022-09-14 08:58:34 -07:00
chat-jsx.tsx Usersearch: Convert to TSX (#8641) 2022-02-15 17:19:17 -08:00
chat.ts Prevent chat processes from nesting 2023-11-04 16:37:49 -05:00
config-loader.ts Migrate to esbuild for compilation (#9203) 2022-12-22 15:19:29 -06:00
friends.ts Prevent friends processes from nesting 2023-11-04 16:32:26 -05:00
global-types.ts Teams: Don't render teams in two tabs 2023-09-24 11:33:41 -05:00
global-variables.d.ts Update Dex API (#8181) 2021-04-08 03:00:37 -07:00
index.ts Update Node version check 2023-04-13 19:10:19 +09:00
ip-tools.ts Handle Typescript 4.5.2 2021-11-18 19:11:21 -06:00
ladders-challenges.ts Revert Multi Battle changes 2021-10-24 17:13:10 -04:00
ladders-local.ts Fix local ladders inputing bad entries on load (#9568) 2023-05-27 15:10:34 -07:00
ladders-remote.ts Ladder: Stop clearing User#mmrCache when rating updates time out 2021-09-14 19:31:52 -05:00
ladders.ts Team-validator: Log userids in debug info 2023-10-03 11:27:39 -05:00
loginserver.ts Handle new TypeScript version (#8449) 2021-08-30 20:11:44 -07:00
monitor.ts Support marksharing ranges (#8498) 2021-10-24 12:44:46 -07:00
punishments.ts Punishments: Don't report the first row of the sharedips file as a malformed line 2023-09-17 21:00:05 -05:00
README.md Fix typo 2022-12-23 20:28:37 -06:00
room-battle.ts Bo3: Fix Team Preview check when format has other custom rules 2023-10-12 22:34:41 -05:00
room-game.ts Implement Bo3 (#9793) 2023-09-22 20:53:23 -05:00
room-minor-activity.ts Minor activities: Don't shift queue twice upon end 2021-05-16 18:11:01 -05:00
roomlogs.ts Fix private logs not getting sent when connecting to GameRoom (#9269) 2022-12-31 19:49:23 -06:00
rooms.ts Support defining default best-of formats server-side (#9866) 2023-11-01 23:24:23 -05:00
sockets.ts Sim: Remove dependency on server/sockets 2023-02-26 11:07:52 -06:00
team-validator-async.ts Team-validator: Log userids in debug info 2023-10-03 11:27:39 -05:00
user-groups.ts Add offline messaging (#8440) 2023-11-04 14:45:18 -05:00
users.ts Room permissions: Allow control over broadcasting 2023-06-05 16:41:34 -07:00
verifier.ts Handle new TypeScript version (#8449) 2021-08-30 20:11:44 -07:00

Pokémon Showdown Server

This repository contains the files needed to set up your own Pokémon Showdown server. Note that to set up a server, you'll also need a server computer.

You can use your own computer as a server, but for other people to connect to your computer, you'll need to expose a port (default is 8000 but you can choose a different one) to connect to, which sometimes requires [port forwarding][5]. Note that some internet providers don't let you host a server at all, in which case you'll have to rent a VPS to use as a server.

Installing

./pokemon-showdown

(Requires Node.js v14+)

If your distro package manager has an old Node.js version, the simplest way to upgrade is n usually no root necessary:

npm install --global n
n latest

Detailed installation instructions

Pokémon Showdown requires you to have Node.js installed, v14.x or later.

Next, obtain a copy of Pokémon Showdown. If you're reading this outside of GitHub, you've probably already done this. If you're reading this in GitHub, there's a "Clone or download" button near the top right (it's green). I recommend the "Open in Desktop" method - you need to install GitHub Desktop which is more work than "Download ZIP", but it makes it much easier to update in the long run (it lets you use the /updateserver command).

Pokémon Showdown is installed and run using a command line. In Mac OS X, open Terminal (it's in Utilities). In Windows, open Command Prompt (type cmd into the Start menu and it should be the first result). Type this into the command line:

cd LOCATION

Replace LOCATION with the location Pokémon Showdown is in (ending up with, for instance, cd "~/Downloads/Pokemon-Showdown" or cd "C:\Users\Bob\Downloads\Pokemon-Showdown\").

This will set your command line's location to Pokémon Showdown's folder. You'll have to do this each time you open a command line to run commands for Pokémon Showdown.

Copy config/config-example.js into config/config.js, and edit as you please.

If you're on Windows, you may need to link Git's UNIX commands to your PATH in order to build Pokémon Showdown. Git provides directions to do so here.

Congratulations, you're done setting up Pokémon Showdown.

Now, to start Pokémon Showdown, run the command:

node pokemon-showdown

(If you're not on Windows, we recommend doing ./pokemon-showdown instead.)

You can also specify a port:

node pokemon-showdown 8000

Visit your server at http://SERVER:8000

Replace SERVER with your server domain or IP. Replace 8000 with your port if it's not 8000 (the default port).

Yes, you can test even if you are behind a NAT without port forwarding: http://localhost:8000 will connect to your local machine. Some browser setups might prevent this sort of connection, however (NoScript, for instance). If you can't get connecting locally to work in Firefox, try Chrome.

You will be redirected to http://SERVER.psim.us. The reason your server is visited through psim.us is to make it more difficult for servers to see a user's password in any form, by handling logins globally. You can embed this in an iframe in your website if the URL is a big deal with you.

If you truly want to host the client yourself, there is a repository for the Pokémon Showdown Client. It's not recommended for beginners, though.

Setting up an Administrator account

Once your server is up, you probably want to make yourself an Administrator (&) on it.

config/usergroups.csv

To become an Administrator, create a file named config/usergroups.csv containing

USER,&

Replace USER with the username that you would like to become an Administrator. Do not put a space between the comma and the ampersand.

This username must be registered. If you do not have a registered account, you can create one using the Register button in the settings menu (it looks like a gear) in the upper-right of Pokémon Showdown.

Once you're an administrator, you can promote/demote others easily with the /globaladmin, /globalmod, /globaldriver, etc commands.