A Yu-Gi-Oh! game server built with TypeScript
Host duels for EDOPro, Koishi, and YGO Mobile โ all from one server.
Evolution Server runs two independent game engines side by side, so you can support both ecosystems from a single server โ or pick just one.
| Engine | Clients | Protocol | Port |
|---|---|---|---|
| ๐ฅ๏ธ EDOPro | EDOPro desktop client | EDOPro protocol | 7911 |
| ๐ฑ YGOPro | Koishi, YGO Mobile, YGOPro | YGOPro-compatible (srvpro2) | 7711 |
- ๐ฐ Room creation through the EDOPro lobby or YGOPro-compatible clients
- ๐ Cross-client duels between different platforms (experimental)
- ๐ Automatic reconnection after disconnection or crash
- ๐ Match data collection for rankings and analytics
- ๐งช Isolated duel cores โ each match runs in its own process
The fastest way to get running. Three commands and you're dueling:
git clone https://github.com/diangogav/EDOpro-server-ts
cd EDOpro-server-ts
docker compose -f docker-compose.prod.yaml up -dThat's it! ๐ Both engines start automatically with PostgreSQL and Valkey included.
๐ก Connect with EDOPro on port
7911or with Koishi/YGO Mobile on port7711.
For when you want full control, or Docker isn't an option.
On Ubuntu/Debian, the provided script installs everything you need:
sudo bash install_dependencies.sh# 1๏ธโฃ Clone the project
git clone https://github.com/diangogav/EDOpro-server-ts
cd EDOpro-server-ts
# 2๏ธโฃ Clone card scripts, databases, and banlists
bash clone_repositories.sh
# 3๏ธโฃ Organize everything into resources/
bash setup_resources.sh
# 4๏ธโฃ Build the C++ duel core (used by the EDOPro engine)
bash build_core_integrator.sh
# 5๏ธโฃ Install Node.js dependencies
npm install
# 6๏ธโฃ Configure environment
cp .env.example .envNow choose which engine(s) you want to run ๐
Players connect using the EDOPro desktop client.
What you need:
- โ The CoreIntegrator binary (built in step 4)
- โ Card databases and scripts from ProjectIgnis
- โ Banlists from ProjectIgnis and/or Evolution
Minimum .env configuration:
HOST_PORT=7911
HTTP_PORT=7922
WEBSOCKET_PORT=4000Resource structure used:
๐ resources/edopro/
โโโ ๐ scripts/ # ProjectIgnis/CardScripts
โโโ ๐๏ธ databases/ # ProjectIgnis/BabelCDB
โโโ ๐ banlists-ignis/ # ProjectIgnis/LFLists
โโโ ๐ banlists-evolution/ # Evolution community banlists
npm run dev๐ฏ Connect with EDOPro to
your-server-ip:7911
The YGOPro engine uses srvpro2-compatible protocol. Players connect using Koishi, YGO Mobile, or any YGOPro-compatible client.
What you need:
- โ Card scripts and databases from ygopro-scripts
- โ Ban lists and alternative format resources
- โ
The
YGOPRO_FOLDERSenvironment variable pointing to your resource directories - โ
(Optional) The
YGOPRO_EXTRA_FOLDERSenvironment variable for pre-release and art card resource folders (cdbs + scripts)
Minimum .env configuration:
YGOPRO_PORT=7711
HTTP_PORT=7922
WEBSOCKET_PORT=4000
YGOPRO_FOLDERS=./resources/ygopro/baseResource structure used:
๐ resources/ygopro/
โโโ ๐ base/ # Core scripts + lflist + cards.cdb (loaded by all modes)
โโโ ๐ ocg/ # OCG-specific banlist
โโโ ๐ alternatives/ # Format variants (Edison, GOAT, HAT, etc.)
โโโ ๐ prereleases-cdb/ # Pre-release card databases + scripts (extra folder)
โโโ ๐จ cards-art/ # Custom card art databases (extra folder)
Standard card pool (YGOPRO_FOLDERS) is loaded for all rooms. Extra folders (YGOPRO_EXTRA_FOLDERS) โ which can contain cdbs, scripts, and other card assets โ are only available in rooms that use PRE or ART formats. Standard rooms cannot use those cards.
To enable all formats and pre-releases, set:
YGOPRO_FOLDERS=./resources/ygopro/base,./resources/ygopro/ocg,./resources/ygopro/alternatives
YGOPRO_EXTRA_FOLDERS=./resources/ygopro/prereleases-cdb,./resources/ygopro/cards-artnpm run dev๐ฏ Connect with Koishi or YGO Mobile to
your-server-ip:7711
Just set both ports in your .env:
HOST_PORT=7911
YGOPRO_PORT=7711
HTTP_PORT=7922
WEBSOCKET_PORT=4000
YGOPRO_FOLDERS=./resources/ygopro/base,./resources/ygopro/ocg,./resources/ygopro/alternatives
YGOPRO_EXTRA_FOLDERS=./resources/ygopro/prereleases-cdb,./resources/ygopro/cards-artnpm run devBoth engines run in the same process, sharing the HTTP API and WebSocket server. ๐ช
The YGOPro engine maintains two separate card pools in memory:
| Pool | Loaded from | Available to |
|---|---|---|
| Standard | YGOPRO_FOLDERS |
All rooms |
| Extended | YGOPRO_FOLDERS + YGOPRO_EXTRA_FOLDERS |
PRE/ART rooms only |
When a player creates a room with a format like PRE, TCGPRE, OCGPRE, TCGART, or OCGART, the server uses the extended card pool for both deck validation and the duel engine. Standard rooms (M, TCG, OT, GOAT, etc.) use only the standard pool โ any card not in that pool is rejected as unknown.
Both pools are loaded at startup and refreshed every 10 minutes if the underlying .cdb files change.
| Variable | Description | Default |
|---|---|---|
HOST_PORT |
EDOPro server port | 7911 |
YGOPRO_PORT |
YGOPro server port | 7711 |
HTTP_PORT |
HTTP API port | 7922 |
WEBSOCKET_PORT |
WebSocket port | 4000 |
YGOPRO_FOLDERS |
Comma-separated resource directories (standard card pool) | (empty) |
YGOPRO_EXTRA_FOLDERS |
Comma-separated extra resource directories (cdbs + scripts for pre-releases, art cards) โ only loaded for PRE/ART room formats | (empty) |
RANK_ENABLED |
Enable ranking system (requires PostgreSQL) | false |
POSTGRES_HOST |
PostgreSQL host | localhost |
POSTGRES_PORT |
PostgreSQL port | 5432 |
POSTGRES_DB |
PostgreSQL database name | evolution |
POSTGRES_USER |
PostgreSQL username | evolution |
POSTGRES_PASSWORD |
PostgreSQL password | (required if ranking enabled) |
USE_REDIS |
Enable Redis/Valkey for session management | false |
REDIS_URI |
Redis/Valkey connection URI | (required if redis enabled) |
src/
โโโ ๐ฅ๏ธ edopro/ # EDOPro engine (EDOPro protocol)
โโโ ๐ฑ ygopro/ # YGOPro engine (srvpro2-compatible)
โโโ ๐ค shared/ # Shared domain logic (rooms, decks, cards, clients)
โโโ ๐ socket-server/ # TCP socket servers for both engines
โโโ ๐ http-server/ # REST API
โโโ ๐ก web-socket-server/ # WebSocket server for real-time updates
Both engines share the same room management, player handling, and match lifecycle โ but use different protocols, card databases, and deck validation rules.
- Multirole by @Dyxel โ the reference for the EDOPro engine
- srvpro2 โ the reference for the YGOPro engine
- The Project Ignis, MyCard, and Evolution communities
Made with โค๏ธ by the Evolution community