Troubleshooting
If something isn't working right, start here. These are the most common issues and their fixes. For all of these, running deja logs is a great first step — it shows you exactly what the server is doing (or what went wrong).
Server Not Connecting to EX-CommandStation
Symptoms: deja status shows no serial port, or the Throttle app says "Disconnected."
- Check the USB cable — make sure it's plugged in at both ends. Try a different USB port on the computer.
- Run
deja status— look under Connections for a serial port like/dev/ttyUSB0or/dev/tty.usbmodem*. If none is listed, the server can't see the EX-CommandStation. - Restart the server —
deja restartwill re-scan for serial ports and try to connect again. - Try unplugging and replugging the USB cable, then restart the server.
Serial Port Permission Denied (Linux / Raspberry Pi)
Symptoms: The server starts but can't open the serial port. Logs show a "permission denied" error.
Run this command once to add your user to the dialout group:
sudo usermod -a -G dialout $USER
Then log out and log back in (or reboot). This only needs to be done once — after that, the server will always have access.
Server Won't Start
Symptoms: deja start shows an error or the server exits immediately.
- Check Node.js version: Run
node --version— you need v20 or later. If you need to upgrade, visit nodejs.org. - Check the logs: Run
deja logsto see what error the server reported. - Reinstall: Run the installer again — it downloads a fresh copy and reconfigures:
curl -fsSL https://install.dejadcc.com | bash
Firebase Connection Errors
Symptoms: Logs show Firebase or Firestore errors. Throttle can't see the server.
Your Firebase credentials may be missing or incorrect. They live in ~/.deja/.env (see Configuration).
- Run
deja logsand check for the specific Firebase error — it usually names the missing or invalid credential. - Re-run the installer to fetch a fresh, correctly configured
.env:curl -fsSL https://install.dejadcc.com | bash - If you've hand-edited
~/.deja/.env, double-check theVITE_FIREBASE_*values against a clean install, then restart:deja restart.
No Layout Configured
Symptoms: The server exits immediately on startup with a "No layout configured" message telling you to run deja login.
The server refuses to start without a layout, on purpose — attaching to the wrong layout is treated as a hazard, not a warning. Run:
deja login
This links the server to your account and layout and writes layoutId to ~/.deja/config.json. Alternatively, set LAYOUT_ID directly in ~/.deja/.env.
Port Already In Use
Symptoms: Logs show Port <number> is already in use — is another server instance running? for the WebSocket server ([WS]) or the WiThrottle server ([WITHROTTLE]).
- Check for a duplicate server instance: Run
deja status— if a server is already running, use that one instead of starting a second. - Stop the existing process:
deja stop, thendeja startagain. - If another application owns the WebSocket port, change it:
VITE_WS_PORT(default8082) in~/.deja/.env, or withdeja config, orsettingsin the console. Restart after changing. - If another WiThrottle server owns port
12090(JMRI with its WiThrottle server enabled, for example) — the port is fixed so throttle apps can always find it. Stop the other server, or turn DEJA's off withdeja config set withrottle.enabled false.
MQTT Broker Not Available
Symptoms: Logs show [MQTT] Broker not available. Will retry with exponential backoff.
The server normally runs its own broker, so this only appears when it is using an external broker — check the startup line [MQTT] Using external broker — … for the reason:
… is not this machine—MQTT_BROKER(ormqtt.brokerin~/.deja/config.json) points at another host. Make sure that broker is running, or set it back tomqtt://localhost(viadeja config) to use the built-in one. A warning naming this machine's current LAN IP is logged when the address looks like a stale local one.… port 1883 already in use— another broker (e.g. Mosquitto) owns the port but isn't accepting connections. Stop it, or fix it.… embedded broker disabled—MQTT_EMBEDDED=falseis set. Remove it to use the built-in broker.- Not using IO devices at all? Set
ENABLE_MQTT=falsein~/.deja/.env(or toggle it off withdeja config, orsettingsin the console).
The server keeps retrying with backoff rather than crashing.
Server Went Into Standby (Loop)
Symptoms: trains stopped and track power went off right after you were actively using the layout, with no 60-second warning. deja status only shows standby for a background server (deja start -b); in the deja start console, the status bar shows 💤 STANDBY (loop).
This is the loop breaker, not the idle timer. It fires immediately (no warning) when it sees:
- the same command repeat more than 30 times in 10 seconds, or
- more than 20 commands per second arriving sustained for 10 seconds.
The log line names the source and the command that tripped it, e.g. 💤 Standby (loop) — throttles:3:40:true ×31 in 10s. Trains stopped, track power OFF.
Common cause: a fast feedback loop between apps or browser tabs can trip it — e.g. the same throttle open in several tabs, each echoing the other's speed/function update back and forth. A slower back-and-forth may not trip it; thresholds are still being tuned from real-world testing.
Throttle doesn't show standby yet — if a throttle stops responding, check the server console or run deja status.
Fix:
- Close the extra tabs (or duplicate app instances) sending the command.
- Wake the server: type
resumeorcontinuein thedeja startconsole, or rundeja resumefor a background server (deja start -b). - Track power stays off after resume — turn it back on from a throttle when you're ready.
Still stuck? Book a session with Track & Trestle
If you've worked through the steps above and the server still won't behave, Track & Trestle offers paid one-on-one sessions — see Support, or open Get help in Throttle. The community Discord is a good place to compare notes with other DEJA users.
[CONFIG] error at startup
The server couldn't read ~/.deja/config.json (it's missing or corrupt) and exited. Run deja login to relink this machine to your layout, then deja start.
deja Command Not Found
If the terminal says deja: command not found after installation:
- Open a new terminal window — the installer added
dejato your PATH, but the current terminal may not have picked it up yet. - Or reload your shell config:
source ~/.zshrc # if using zsh source ~/.bashrc # if using bash - Or run it directly:
~/.deja/bin/deja status
Still Stuck?
If none of the above fixes your issue:
- Run
deja logs -n 100and look for error messages near the bottom. - Run
deja statusand note any warnings. - Check the DEJA community for help from other users.