Software
Getting Started
Configuration

Configuration

CLI Reference

pieeg-server [OPTIONS] [COMMAND]

Commands

CommandDescription
doctorDiagnose hardware, software, and configuration
record FILERecord EEG to CSV (standalone, no server)
monitorLive terminal display (standalone, no server)

Server Options

FlagDefaultDescription
--device DEVICEpieeg16pieeg8, pieeg16, or ironbci8
--host HOST0.0.0.0Bind address
--port PORT1616WebSocket port
--dashboard-port PORT1617Dashboard HTTP port
--no-dashboardDisable web dashboard
--authEnable 6-digit access code
--gpio-chip PATH/dev/gpiochip4GPIO chip device
--profile NAMEautoRaspberry Pi hardware profile: auto, pi4, pi5

Hardware Profiles

Different Raspberry Pi models expose SPI/GPIO slightly differently. The --profile flag selects platform-specific tunables (SPI clock, whether the script manages the chip-select GPIO line directly).

ProfileSPI clockNotes
pi44 MHzPi 2 / 3 / 4 / 400 — script toggles GPIO19 around chip-2 transactions
pi52 MHzPi 5 — kernel SPI driver owns the CE line, GPIO19 is left to the driver in 8-channel mode
auto (default)Read /proc/device-tree/model (then compatible); fall back to pi4 on any unknown / non-Pi system so existing setups behave exactly as before

In 16-channel mode the second ADS1299's CS is wired to GPIO19 on the shield, so the chip-select pin is always managed regardless of profile.

BLE Options (IronBCI)

FlagDefaultDescription
--ble-name NAMEEAREEGBLE advertised device name
--ble-address ADDRBLE MAC address — skip scan, connect directly

BLE options only apply when --device ironbci8 is selected. Install the ironbci extra for Bluetooth support: pip install pieeg-server[ironbci].

Filter Options

FlagDefaultDescription
--filterEnable 1–40 Hz bandpass filter
--lowcut HZ1.0Filter low cutoff
--highcut HZ40.0Filter high cutoff

Recording Options

FlagDefaultDescription
--record FILERecord to CSV while streaming
--record-duration SECStop recording after N seconds

Integration Options

FlagDefaultDescription
--monitorShow terminal monitor alongside server
--mockSynthetic EEG (no hardware needed)
--no-webhooksDisable webhooks
--oscEnable VRChat OSC bridge
--osc-host HOST127.0.0.1VRChat receiver
--osc-port PORT9000VRChat OSC port
--osc-mode MODEbothchatbox, parameters, or both
--osc-interval SEC0.25OSC update rate
--lslEnable Lab Streaming Layer outlet
--lsl-name NAMEPiEEGLSL stream name
-v, --verboseDebug logging

Systemd Service

The install script creates a systemd service that auto-starts on boot:

sudo systemctl status pieeg-server
sudo systemctl restart pieeg-server
journalctl -u pieeg-server -f

The systemd service runs with whatever flags were set during installation. Edit /etc/systemd/system/pieeg-server.service to change runtime options.

Environment

PiEEG Server has minimal dependencies:

PackageVersionPurpose
websockets≥12.0WebSocket streaming
scipy≥1.10Butterworth filter
rich≥13.0Terminal UI / monitor
bleak≥0.21Bluetooth LE (IronBCI only, optional)

Dashboard Environment Variables

These are build-time variables for the Vite dashboard (set them when building or deploying the dashboard separately, e.g. on Vercel).

VariableDefaultDescription
VITE_SERVER_URL(unset)When set, the Session Lobby pre-fills this URL instead of auto-detecting from localhost. Also marks the session as demo mode (DEMO badge, auth bypassed). For Vercel: set to https://pieeg-server--mock.fly.dev.
⚠️

VITE_SERVER_URL only affects the initial value shown in the lobby. The user can always edit the URL before clicking Connect — there is no hidden override.