△◯✕□ PS2 Servers DOCS
Downloads GitHub

PS2 Servers Core CLI Reference

PS2 Servers Core provides terminal-based server execution without a graphical display. Powered by the full Python engine, it supports automation, daemonization under systemd, container deployment, and extensive debugging telemetry.

Command Entry Point
Whether running from source with python ps2servers.py serve <mode> or invoking a packaged binary like PS2Servers.exe serve <mode>, the subcommands and flags are identical. The internal alias --serve is also supported for backward compatibility with existing scripts.

1. Listing Modes & Global Help

# List available server modes
python ps2servers.py --list

# Show help for a specific mode
python ps2servers.py serve udpfs --help
python ps2servers.py serve smbv1 --help
python ps2servers.py serve udpbd --help
python ps2servers.py serve http --help

2. serve udpfs Options

python ps2servers.py serve udpfs --root-dir /srv/ps2 [options]
Flag Default Description
--root-dir PATH (Required) Path to the root games directory (parent of DVD/ and CD/).
--bind IP 0.0.0.0 Binds Core's data socket to a specific PC LAN address (crucial for multi-adapter PCs).
--port PORT 62966 Discovery UDP port.
--data-port PORT 0 (dynamic) Explicit data port for firewalls.
--single-port false Route both discovery and data through port 62966.
--peer-timeout SECS 3600 Session inactivity timeout in seconds (accepts 60 to 86400).
--read-only false Disallow write operations.
--verbose false Enable high-verbosity packet telemetry and 45-second inactivity diagnostics.

3. serve smbv1 Options

python ps2servers.py serve smbv1 --share games=/srv/ps2 --port 1111 [options]
Flag Default Description
--share NAME=PATH games=... Define a share name mapped to a directory path. Can be repeated.
--port PORT 1111 TCP listening port.
--read-only false Disable writes (saves and VMCs).

4. serve udpbd Options

python ps2servers.py serve udpbd /srv/images/game.iso --read-only [options]
Flag Default Description
IMAGE_PATH (Positional) Path to one block-image file, not a DVD/ library folder; its contents must match the PS2 client expectations.
UDP port (fixed) 48573 Python UDPBD uses fixed UDP port 48573; --port is not supported here (Edge is separate).
--bind IP 0.0.0.0 Interface bind address.
--read-only false Prevent write modifications to the backing image.

Select exactly one positional IMAGE_PATH, --raw-device DEVICE, or --virtual-exfat FOLDER. Raw mode defaults to read-only. --exclusive unmounts/locks a raw target; --raw-write requires exclusive access and enables writes/VMC saves. Virtual exFAT is always read-only and requires no raw-device privileges. All modes use UDP 48573. Raw and virtual targets must be smaller than 2 TiB. See storage modes and limits.

UDPBD uses broadcast discovery and is not UDPFS. For client setup and mass0: / "cannot open folder" diagnostics, see the UDPBD guide.

5. Running Under systemd

Create a service unit file at /etc/systemd/system/ps2servers-udpfs.service:

[Unit]
Description=PS2 Servers UDPFS Service
After=network.target

[Service]
Type=simple
User=ps2games
ExecStart=/usr/bin/python3 /opt/ps2-servers/ps2servers.py serve udpfs --root-dir /srv/ps2games --read-only
Restart=on-failure
RestartSec=5s

[Install]
WantedBy=multi-user.target

Enable and start the service:

sudo systemctl daemon-reload
sudo systemctl enable --now ps2servers-udpfs
sudo journalctl -u ps2servers-udpfs -f