Bruno "Fuddl" Kleinert
Email: <<fuddl AT debian DOT org>>
I use Debian stable and unstable on my desktop PCs, laptops, servers and Raspberries for home automation. I'm also using Debian to control my model railway, a hobby I revived in 2023.
Howto Model Railway with Debian
Layout Planning
Install XTrackCAD (as root):
apt install xtrkcad
Its user interface may look and feel slightly aged but the program does the job.
Run Trains Automatically and Manually
RailControl is the package that allows you define routes and feedbacks and it will control your locomotives, switches and signals. Have a look at the package description of railcontrol to check if your digital command station is supported! I use RailControl with a märklin CS3 Plus and can tell that works fine.
Debian 13 Trixie
Install RailControl (as root):
apt install railcontrol
Prepare a configuration file for RailControl in your home directory:
cp /usr/share/doc/railcontrol/railcontrol.conf.dist ~/railcontrol.conf
The default configuration file is good enough to go.
Start railcontrol from a shell (as root):
railcontrol --config=railcontrol.conf
IMPORTANT: Now, railcontrol listens on all network interfaces, i.e., anyone in the same network can fully control - and break! - your layout.
Open a web browser either on the same computer and navigate it to http://localhost:8083 or use another computer in the same network and navigate the browser to http://HOST:8083. HOST is either the IP address or a resolvable hostname of the computer that runs railcontrol.
If you intend to keep railcontrol permanently running, say, because you have a server at home, follow the instructions in /usr/share/doc/railcontrol/README.Debian.
Debian post trixie
Install RailControl (as root):
apt install railcontrol
Edit as root /etc/railcontrol.conf or leave it as is. Run railcontrol as soon as the computer boots in the background (as root):
systemctl enable --now railcontrol.service
IMPORTANT: Now, railcontrol listens on all network interfaces, i.e., anyone in the same network can fully control - and break! - your layout.
Open a web browser either on the same computer and navigate it to http://localhost:8083 or use another computer in the same network and navigate the browser to http://HOST:8083. HOST is either the IP address or a resolvable hostname of the computer that runs railcontrol.
Once, railcontrol is running, read the short but helpful upstream documentation.
Have fun!
Known to work really well
Just as a reference, that's the hardware I use to run fully automatically a IIm layout:
RailControl server: Standard PC running Debian 13 Trixie
- Digital Command Station: märklin CS3 Plus
- Locomotive decoders: märklin mfx, mXion DCC (I can't recommend the latter, they are rather buggy)
- Switch decoders: Massoth EVO-S, mXion EKW, mXion DWA 2.0
- Feedback connectors: märklin L88, märklin S88 AC and S88 DC
- Feedback sensors: various inexpensive reed switches from electronic online shops, LGB 17100 (You don't need the original ones)
