Server Guide
Your bridge to the track
The DEJA Server is a small program that runs on the computer connected to your EX-CommandStation. It takes the commands you send from the Throttle, Cloud, and Monitor apps and passes them to your DCC-EX hardware over USB. You set it up once, and it runs quietly in the background while you focus on running trains.
Video walkthrough coming soon
Make sure you've completed the Getting Started guide — your server should be running and your EX-CommandStation connected.
Make sure your DCC-EX EX-CommandStation is connected via USB to the computer running the server.
Meet the deja Server CLI
The DEJA Server comes with a simple command-line tool called deja. Think of it like a remote control for your server — you type a short command, and the server does the rest.
You don't need to be a computer expert to use it. There are only a handful of commands, and they all do exactly what their names say: deja start, deja stop, deja status. That's the kind of thing we're talking about — nothing complicated.
To use these commands, open a terminal on the computer connected to your EX-CommandStation. On a Mac, search for "Terminal" in Spotlight. On a Raspberry Pi or Linux, it's usually in your applications menu. Type the command, press Enter, and you're done.
Starting the Server
When you type deja start, the server launches and you'll see a live console scrolling with status updates as it connects to your EX-CommandStation, DEJA Cloud, and any other services.

This is the default mode — the server runs right in your terminal so you can see exactly what's happening. Press Ctrl+C when you want to stop it.
Want the server to run in the background so you can close the terminal? Add the -b flag: deja start -b
View Your Logs
Want to see what the server is doing? Check the logs:
This shows recent activity — connections, commands sent to the track, and any errors. If you want to watch the logs in real time (handy for debugging), add the -f flag:
Press Ctrl+C to stop watching. The server keeps running in the background — you're just closing the log viewer.
Stop, Start & Restart
You've got three commands for controlling the server. They do exactly what they say:
⏹
deja stop
Shut down the server
▶️
deja start
Start it back up
🔄
deja restart
Stop + start in one step
Remember: deja start runs in the foreground by default (you'll see the live console). Add -b to run in the background.
Already inside the console? You don't need to open a new terminal — type /stop or just press s to stop, /restart or r to restart. See Inside the Server Console below for the full list.
Need to change a port, turn WiThrottle or MQTT on or off, or set your tunnel token? Run deja config — an interactive walkthrough of every server setting. Press Enter to keep a value, type to change it, and the CLI offers to restart the server for you.
Keep It Updated
When a new version is available, updating is one command:
This downloads the latest version and restarts the server automatically. All your settings — layout ID, serial port, configuration — are preserved. Nothing to reconfigure.
Manage IO Devices
Registered an Arduino, ESP32, or Pico W in the Cloud app? Two commands manage them from the terminal:
Lists every IO device registered to your layout, with its type and connection details — handy for confirming a device is registered before you go flash it.
Launches an interactive wizard that pushes your Cloud device configuration to a connected board and flashes its firmware. Works with Arduino, ESP32 (USB or WiFi), and Pico W devices.
For the full device setup and pin-mapping workflow, see the IO Guidedocs.
Monitor from Anywhere
Want to check on your railroad when you're not on your home network? The tunnel command creates a secure connection so you can access your server remotely:
This gives you a public URL that connects back to your server. Open it on any device, anywhere — your phone at work, a laptop at a friend's house, wherever.
Remote monitoring requires an Engineer or Conductor plan (from $1.99/mo, with a 30-day free trial). The connection is encrypted and only accessible with your DEJA account credentials.
For the full setup details, see the Remote Monitoringdocs guide.
Inside the Server Console
When the server is running in the foreground, you're inside an interactive console. You can type commands right at the prompt — no need to stop and restart. Here's what's available.
Slash Commands
Type a / followed by a command name. You can also press Tab to autocomplete, or type /help to see the full list.
Server
/startStart the server (if not already running)/stopStop the server and exit/restart/rRestart the server/quit/q, /exitExit the console (server keeps running)Navigation
/menu/mOpen the interactive menu/settingsOpen the settings panel — also where remote access tunnel is toggled/dcc-ref/dcc, /refShow the DCC-EX command quick reference/logs/lReturn to the log viewDevices
/devices/d, /ioShow device panel and manage connections/connect/cConnect a device by name/disconnect/dcDisconnect a device by name/deploy/dep, /flashLaunch the firmware deploy wizardTools
/help/h, /?Show all available commands/filter/fCycle log filter (all → error → warn)/export/eExport logs to a fileHotkeys
When the command input is empty, single-key shortcuts work too — no / or Enter needed. Every slash command above also has a plain-text form (typing stop works the same as /stop).
Stop server and exit
Restart the server
Open the menu
Toggle help panel
Export logs
Cycle log filter
Clear input, or open menu
Autocomplete slash command
Exit the console
You can also type * <command> to send a raw DCC-EX command straight to the track — see DCC Commands below.
The Menu
Type /menu (or just press Esc) to open a visual menu. Use the arrow keys to navigate and Enter to select. It's another way to access everything above without remembering command names.
DCC Commands
You can also type raw DCC-EX commands directly at the prompt — they're sent straight to your EX-CommandStation. For example, type <1> to turn track power on. See the CLI Referencedocs for more details.
Reading the Console Output
Each line in the console follows the same format. Here's what each part means:
For a complete guide to every message — startup sequence, DCC commands, shutdown, and common errors — see the Console Output referencedocs.
CLI Quick Reference
The deja CLI is your control panel. Here's every command at a glance:
deja start
Start the server
deja start -b
Start in background
deja stop
Stop the server
deja restart
Restart the server
deja status
Check server status
deja logs
View recent logs
deja logs -f
Follow logs live
deja update
Update to latest version
deja login
Link account and layout
deja devices
List registered IO devices
deja deploy
Flash firmware to a device
deja tunnel start
Start remote access
deja tunnel stop
Stop remote access
deja tunnel status
Check tunnel status
deja --version
Show installed version
For the full CLI reference with all options and flags, see the CLI Referencedocs.
Troubleshooting
▶Server not connecting to EX-CommandStation
1. Make sure the USB cable is plugged in to both the EX-CommandStation and your computer.
2. Run deja status to see if the server detects a serial port.
3. Try deja restart — the server re-scans for devices on startup.
▶Permission denied on serial port
On Linux and Raspberry Pi, your user needs permission to access serial devices. Run this once:
Then log out and back in (or reboot) for the change to take effect.
▶Server won't start
1. Check that Node.js 20+ is installed: node --version
2. Check the logs for error details: deja logs
3. Try reinstalling: curl -fsSL https://install.dejajs.com | bash
Still stuck? Check the Troubleshootingdocs or reach out on Discord.
What's Next?
Your server is up and running — here's where to go from here.