Skip to main content

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, 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 EX-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 EX-CommandStation at 115200 baud
  • MQTT messaging — optional communication with wireless IoT devices (deja-esp32-wifi, deja-mqtt Pico W)
  • 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

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:

PageWhat it covers
InstallationPlatform requirements, one-command install, what the installer does
CLI ReferenceEvery deja command with flags and examples
ConfigurationEnvironment variables, config files, directory layout
Remote MonitoringSecure tunnel for monitoring from anywhere
TroubleshootingCommon issues and how to fix them

Quick Install

macOS / Linux / Raspberry Pi:

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

The installer downloads and sets up the server. Then run deja login to link your account and deja start to launch it. See Installation for the full details.

Managing with the deja CLI

CommandWhat it does
deja statusCheck if the server is running, your subscription, and serial connection
deja logsView recent server logs
deja logs -fFollow server logs in real time
deja startStart the server
deja stopStop the server
deja restartRestart the server
deja loginConnect the server to your DEJA account and layout
deja configConfigure WebSocket, WiThrottle, MQTT, cloud sync, and the tunnel token interactively
deja updateDownload and install the latest version

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