DEJA Server
The DEJA Server is the bridge between your browser and your DCC-EX CommandStation hardware. It runs in the background on the computer connected to your CommandStation via USB, translating commands from the Throttle, Cloud, and Monitor apps into DCC-EX serial commands on the track.
How It Works
You control your trains from a web browser — your phone, a tablet, your laptop. Those commands travel through the cloud to the DEJA Server, which talks to your CommandStation over USB. The server handles everything in between so you can focus on running your railroad.
The server manages:
- WebSocket connections — real-time communication with your browser apps
- Firebase sync — cloud-based layout data (throttles, turnouts, effects, signals)
- Serial communication — USB connection to your DCC-EX CommandStation at 115200 baud
- MQTT messaging — optional communication with wireless IoT devices (
deja-esp32-wifi,deja-mqttPico W) - Sound playback — layout sound effects played through the server's speakers
Getting Started
The fastest way to get up and running is the Server Guide — a step-by-step walkthrough from installation to your first train.
If you're already set up and looking for reference material, use the pages in this section:
| Page | What it covers |
|---|---|
| Installation | Platform requirements, one-command install, what the installer does |
| CLI Reference | Every deja command with flags and examples |
| Configuration | Environment variables, config files, directory layout |
| Remote Access | Secure tunnel for monitoring from anywhere |
| Troubleshooting | Common issues and how to fix them |
Quick Install
macOS / Linux / Raspberry Pi:
curl -fsSL https://install.dejajs.com | bash
The installer downloads the server, detects your CommandStation's serial port, and starts the server automatically. See Installation for the full details.
Managing with the deja CLI
| Command | What it does |
|---|---|
deja status | Check if the server is running, your subscription, and serial connection |
deja logs | View recent server logs |
deja logs -f | Follow server logs in real time |
deja start | Start the server |
deja stop | Stop the server |
deja restart | Restart the server |
deja update | Download and install the latest version |
See the CLI Reference for the complete command list with flags and examples.