Download and install JMRI®
JMRI Setup and Installation
JMRI environments...
Supported Hardware
Devices, command stations, networks, and protocols:
Release Notes
Source Code

JMRI Help:

Contents Index
Glossary FAQ

Donate to

Installing JMRI on Raspberry Pi OS

These instructions describe the installation of Java 11 and JMRI 5+ on a Raspberry Pi computer running Raspberry Pi OS. The install process uses the general Linux instructions at Linux Install. Raspberry Pi specific activities are on this page.

The orignal version of this page is at JMRI on Raspbian. Be aware that much of the information on the old page is obsolete.

The Raspberry Pi is becoming increasingly popular as a small and cheap computer. Raspberry Pi OS is based on Debian and is recognized as being a very user friendly distribution.

Pre-Built Image Available

Installation Steps

Follow the steps at Linux Install to install Java and JMRI on a Raspberry Pi running either Raspberry Pi OS or Raspbian.

Note: The information for installing Raspberry Pi OS on a Raspberry Pi computer is available at Raspberry Pi Documentation.

Post Install Activities

Raspberry Pi Configuration

If the Raspberry Pi will not have a display, keyboard and mouse, it can use a virtual VNC (Virtual Network Computing) interface. The RealVNC server is included in Raspberry Pi OS.

This is enabled by selecting Preferences ⇒ Raspberry Pi Configuration from the Raspberry start menu. In the Interface tab select VNC . For remote terminal access using ssh also enable SSH .


To automatically start the GUI version of PanelPro or DecoderPro during startup, add a symbolic link to the desktop icon.

cd ~/.config mkdir autostart (might not exist) cd autostart ln -s ~/Desktop/PanelPro.desktop PanelPro.desktop


The Linux install of JMRI includes a JmriFaceless application. This is a minimal JMRI application with no GUI windows. Since there are no JMRI windows, everything must be configured using DecoderPro or PanelPro.

Faceless setup using PanelPro

  1. Create a Faceless profile using Edit ⇒ Preferences ⇒ Config Profiles from the main PanelPro menu. Save and restart with new profile.
  2. Configure the Connection and Start Up preferences. A common start up action is Start WiThrottle Server. Save and quit PanelPro.
  3. Copy to .
  4. Check The autoStart key must be true: <entry key="autoStart">true</entry>
  5. Three alternatives for starting JmriFaceless:
    • Connect using ssh and enter ~/JMRI/JmriFaceless at the command line.
    • Start using a ssh remote command: ssh <user>@<ip address> /home/<user>/JMRI/JmriFaceless &
    • Add a line to the /etc/rc.local file before the exit 0 line: sudo -u <user> /home/<user>/JMRI/JmriFaceless &. The rc.local script runs as root so the sudo command is used to start JmriFaceless as the user.


Normally, the Raspberry Pi is shut down using the desktop start menu, either with a monitor, mouse and keyboard or via VNC. It can also be shut down by logging in with ssh and doing a terminal command, sudo shutdown -h now, or doing a ssh remote command.

In JMRI, a Logix/LogixNG can be used to invoke the Jython script.

LogixNG has a Shutdown action. This example uses a sensor that can be set from a browser connected to the JMRI Web Server.

LogixNG: Shutdown ConditionalNG: Shutdown ! A If Then Else. Execute on change ? If Sensor Shutdown is Active ! Then Shutdown JMRI/computer: Shut down the computer ! Else

If you just want to shutdown JMRI, without shutting down the Pi, there are several alternatives:

  1. Use a physical keyboard and screen or VNC to click the JMRI "Quit" button in the usual way.
  2. Since JMRI 5.5.2 Use the "kill <pid>" command with the proper process ID number. You can also use "kill -HUP <pid>" to cause JMRI to quit and restart.
  3. Configure an input sensor to trigger running the "jython/" script. You can also use the "jython/" script to cause JMRI to quit and restart.