This is an old revision of the document!
Table of Contents
Installing MIX on a Raspberry Pi
Complete Raspberry Pi Base Setup first.
These instructions install MIX in:
/home/mix/mixruntime
MIX requires Java 25 or newer.
The validated Raspberry Pi installation used:
/opt/java/zulu25.34.17-ca-fx-jdk25.0.3-linux_aarch64
The normal MIX web port is 7226 unless mix.port in mix.properties has been changed.
The normal MIX addresses are:
http://<Pi-address>:7226/index.html http://<Pi-address>:7226/setup.html
The first opens the deployed application. The second opens the MIX setup page.
1. Copy the MIX runtime to the Raspberry Pi
On the Windows computer, open PowerShell and change to the MIX installation directory for the software release being deployed.
For example:
Set-Location "C:\ET\<release>\MIX"
Create the MIX runtime directory on the Raspberry Pi:
ssh mix@<Pi-address> "mkdir -p /home/mix/mixruntime"
Copy the contents of the MIX runtime directory:
scp -r .\* mix@<Pi-address>:/home/mix/mixruntime/
After the copy completes, connect to the Pi:
ssh mix@<Pi-address>
Verify the runtime files:
ls -la /home/mix/mixruntime ls -la /home/mix/mixruntime/scripts
The MIX runtime should contain files and directories including:
mix.jar mix.properties htmlroot/ lib/ log4j/ logs/ scripts/ security/
The Linux startup script is:
/home/mix/mixruntime/scripts/MIX.sh
Make the Linux scripts executable:
chmod +x /home/mix/mixruntime/scripts/MIX.sh chmod +x /home/mix/mixruntime/scripts/stopmix.sh chmod +x /home/mix/mixruntime/scripts/restartmix.sh
If the copied MIX installation contains an ErgoIOTLicense_*.lic file from another computer, remove or move that file before starting MIX.
Each Raspberry Pi must use the license generated for that Pi.
2. Verify Java 25
Verify the Java installation:
/opt/java/zulu25.34.17-ca-fx-jdk25.0.3-linux_aarch64/bin/java -version
The validated installation reports:
openjdk version "25.0.3"
MIX can use this Java installation directly without changing the Raspberry Pi's system-wide Java default.
3. Start MIX manually
Change to the MIX runtime directory:
cd /home/mix/mixruntime
Start MIX with Java 25:
MIX_JAVA_HOME=/opt/java/zulu25.34.17-ca-fx-jdk25.0.3-linux_aarch64 \ ./scripts/MIX.sh
Startup output should identify the MIX installation, Java executable, and configured port.
For example:
MIX_INSTALL_DIR: /home/mix/mixruntime MIX_WORK_DIR: /home/mix/mixruntime MIX properties: /home/mix/mixruntime/mix.properties Java executable: /opt/java/zulu25.34.17-ca-fx-jdk25.0.3-linux_aarch64/bin/java Native libraries: /home/mix/mixruntime/lib Debug port: 18050
MIX should also report:
mix.port:7226
and its MIX build number.
If a Raspberry Pi license has not yet been installed, MIX will display the system's pre-license key.
For example:
Initializing MIX runtime with prelicense key: <pre-license-key>
Keep this key for the license request.
4. Install the Raspberry Pi license
Each Raspberry Pi requires an ErgoTech runtime license associated with that system.
The pre-license key can be obtained from the MIX startup output or from the MIX setup page:
http://<Pi-address>:7226/setup.html
On the setup page, select Get Pre-License Key.
Send the displayed pre-license key to ErgoTech.
Copy the license provided for the Raspberry Pi into:
/home/mix/mixruntime
The filename may include the pre-license key, for example:
ErgoIOTLicense_<pre-license-key>.lic
Start MIX again:
cd /home/mix/mixruntime MIX_JAVA_HOME=/opt/java/zulu25.34.17-ca-fx-jdk25.0.3-linux_aarch64 ./scripts/MIX.sh
Verify that startup contains:
Valid IOT System Runtime License detected.
Opening Get Pre-License Key also provides a way to update the Raspberry Pi's date and time.
The setup page also contains Network Configuration for systems which use MIX to manage Raspberry Pi network settings.
5. Verify the MIX web server
While MIX is running, verify that port 7226 is listening:
sudo ss -ltnp | grep 7226
A normal result contains:
LISTEN ... *:7226 ... java
From a browser on another computer, open:
http://<Pi-address>:7226/setup.html
Verify that the MIX setup page loads.
After an MIStudio application has been deployed, the application can be opened at:
http://<Pi-address>:7226/index.html
6. Deploy an MIStudio project to the Raspberry Pi
In MIStudio, select the project's MIX Target.
Configure the target with the Raspberry Pi address.
For example:
Host Name: <Pi-address> Mix Login Name: ergouser Port: 7226 Target Name: MIX
Enter the configured MIX password.
Save the MIStudio project.
Select Deploy.
During deployment, MIX should:
- authenticate the MIStudio deployment request,
- stop the currently loaded application logic,
- replace the deployed application files,
- load the new application files and
VIBLogic.jar, - reload the application,
- continue running without requiring the MIX process to be stopped manually.
After deployment, open:
http://<Pi-address>:7226/index.html
Verify that the deployed application loads.
The MIX console should show the deployment being received and the application logic being reloaded.
For production systems, change the default ergouser password.
The MIX user administration page is:
http://<Pi-address>:7226/servlet/UserManager
7. Stop the manual MIX process
Before configuring the automatic service, stop the manually started MIX process.
If MIX is still running in the foreground, press:
Ctrl+C
Verify that no MIX HeadlessController process remains:
pgrep -af 'com.ergotech.mix.server.HeadlessController'
No output should be returned.
8. Run MIX automatically as a Linux service
Create the log directory if it does not already exist:
mkdir -p /home/mix/mixruntime/logs
Create the systemd service:
sudo nano /etc/systemd/system/mix.service
Paste:
[Unit] Description=MIX Service After=network-online.target Wants=network-online.target [Service] User=mix WorkingDirectory=/home/mix/mixruntime Environment="MIX_JAVA_HOME=/opt/java/zulu25.34.17-ca-fx-jdk25.0.3-linux_aarch64" ExecStart=/bin/sh /home/mix/mixruntime/scripts/MIX.sh Restart=always RestartSec=60 StandardOutput=append:/home/mix/mixruntime/logs/runmix-console.log StandardError=append:/home/mix/mixruntime/logs/runmix-console.log [Install] WantedBy=multi-user.target
Save with Ctrl+O, Enter, Ctrl+X.
Reload systemd and enable MIX:
sudo systemctl daemon-reload sudo systemctl enable mix sudo systemctl start mix
Verify the service:
systemctl status mix --no-pager
Look for:
Active: active (running)
Verify the MIX Java process:
pgrep -af 'com.ergotech.mix.server.HeadlessController'
The process should use the Java 25 installation under:
/opt/java/zulu25.34.17-ca-fx-jdk25.0.3-linux_aarch64
Verify port 7226:
sudo ss -ltnp | grep 7226
9. Verify MIX console logging
MIX console output is written to:
/home/mix/mixruntime/logs/runmix-console.log
Verify:
tail -n 40 /home/mix/mixruntime/logs/runmix-console.log
The log should contain Java and MIX startup messages.
Check the MIX build and license:
grep -E "Running MIX Build|Valid IOT System Runtime License detected|Initializing MIX runtime" \ /home/mix/mixruntime/logs/runmix-console.log | tail -n 10
A successful startup should contain lines similar to:
Running MIX Build <build-number> Initializing MIX runtime with prelicense key: <pre-license-key> Valid IOT System Runtime License detected.
When systemd creates runmix-console.log, the file may be owned by:
root root
Verify if needed:
ls -l /home/mix/mixruntime/logs/runmix-console.log
10. Limit the MIX console log
Create:
sudo nano /etc/logrotate.d/runmix-console
Paste:
/home/mix/mixruntime/logs/runmix-console.log {
su root root
size 5M
rotate 5
compress
delaycompress
missingok
notifempty
copytruncate
}
Save with Ctrl+O, Enter, Ctrl+X.
Check the configuration:
sudo logrotate -d /etc/logrotate.d/runmix-console
A normal result mentions:
/home/mix/mixruntime/logs/runmix-console.log5242880 bytes5 rotations
If the current log is smaller than 5 MB, logrotate will report that it does not need rotating.
To test the rule, force one rotation:
sudo logrotate -vf /etc/logrotate.d/runmix-console
Verify the files:
ls -lh /home/mix/mixruntime/logs/runmix-console.log*
The previous contents should be copied to:
runmix-console.log.1
The active runmix-console.log should be truncated.
Verify that MIX is still running:
systemctl status mix --no-pager pgrep -af 'com.ergotech.mix.server.HeadlessController'
Generate a new request:
curl -s -o /dev/null http://127.0.0.1:7226/setup.html sleep 2
Verify that the active log receives new output:
ls -lh /home/mix/mixruntime/logs/runmix-console.log* tail -n 10 /home/mix/mixruntime/logs/runmix-console.log
A successful test should show:
Default Servlet : GET Request: /setup.html
MIX.log is controlled separately by the MIX Log4j configuration.
11. Reboot and verify MIX
Reboot:
sudo reboot
After the Raspberry Pi comes back online, reconnect:
ssh mix@<Pi-address>
Verify that MIX started automatically:
systemctl status mix --no-pager
Verify the MIX Java process:
pgrep -af 'com.ergotech.mix.server.HeadlessController'
Verify port 7226:
sudo ss -ltnp | grep 7226
Verify the MIX build and license from the new boot:
grep -E "Running MIX Build|Valid IOT System Runtime License detected|Initializing MIX runtime" \ /home/mix/mixruntime/logs/runmix-console.log | tail -n 10
Verify general system status:
df -h / ls -lh /var/log/syslog* ls -lh /var/log/daemon.log* cat /var/log/ergotech-boot-maintenance.log
Finally, open:
http://<Pi-address>:7226/index.html
Verify:
- MIX is
active (running)after reboot. - MIX is running with Java 25.
- Port 7226 is listening.
- The Raspberry Pi runtime license is accepted.
runmix-console.logcontains startup messages from the current boot.- The deployed MIStudio application loads in the browser.
- The SD card has sufficient free space.
- Linux system logs remain bounded.
- The boot-maintenance log shows a successful run after reboot.
At this point MIX is installed, licensed, running automatically, accepting MIStudio deployments, serving the deployed application, and rotating its console log correctly.
If this SD card will become a master image, verify the complete system once more before imaging it.
