Skip to main content
DEJA

DEJA Server

The DEJA Server is the bridge between your browser and your DCC-EX EX-CommandStation hardware. It runs in the background on the computer connected to your EX-CommandStation via USB, translating commands from the Throttle app 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 EX-CommandStation over USB. The server handles everything in between so you can focus on running your railroad.

The server manages:

  • Firebase sync — cloud-based layout data (throttles, turnouts, effects, signals)
  • Serial communication — USB connection to your DCC-EX EX-CommandStation at 115200 baud
  • MQTT messaging — built-in broker + client (on by default) for wireless IoT devices (deja-esp32-wifi, deja-mqtt Pico W) — no separate broker install needed
  • WiThrottle protocol — built-in TCP server (on by default) so ProtoThrottle, Engine Driver, and other JMRI-compatible throttles can drive your layout directly, with mDNS discovery and exclusive loco locking
  • Sound playback — sound library files played through the server's speakers
  • WebSocket IO transport — on-demand connection for WiFi-connected IO devices (ESP32, Pico W); no browser app uses it directly

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 Monitoring Watch your layout from anywhere via DEJA Cloud
Troubleshooting Common issues and how to fix them

Quick Install

macOS / Linux / Raspberry Pi:

curl -fsSL https://install.dejadcc.com | bash

The installer downloads and sets up the server. Then run deja login to link your account and deja start to launch it. A Raspberry Pi needs a 64-bit OS (Pi 4 or Pi 5).

Windows (PowerShell — Windows 10 1809+ or Windows 11, x64 or ARM64):

irm https://install.dejadcc.com/install.ps1 | iex

The Windows installer also installs Node.js LTS via winget if needed, then runs deja login and deja start -b for you.

See Installation for the full details.

Managing with the deja CLI

Command What it does
deja status Check if the server is running and its serial connection
deja logs View recent server logs
deja logs -f Follow server logs in real time
deja logs -n N Show the last N lines
deja start Start the server (-b for the background)
deja stop Stop the server
deja restart Restart the server
deja resume Wake a background server from standby
deja login Connect the server to your DEJA account and layout
deja config Configure WebSocket, WiThrottle, MQTT, and cloud sync interactively
deja config get|set Read or change one setting from a script (deja config set log.level verbose)
deja update Download and install the latest version
deja help List every command

See the CLI Reference for the complete command list with flags and examples.