Middleware commands: everyday checks and maintenance
Commands for logs, service status, software updates, device configuration and recovery.
Choose the task
These commands apply to the modular Middleware-Installer/nxti.sh. Run them in Bash on the correct Ubuntu computer, under the intended installation account. First use type nxtwash to identify the shortcut; see the installation guide if it is missing or points elsewhere.
| Task | Command | Effect |
|---|---|---|
| Show help | nxtwash help |
Displays command help. |
| Follow middleware logs | nxtwash logs |
Reads the base service journal. |
| Follow instance 1 | nxtwash logs 1 |
Reads instance 1's journal. |
| Follow cash logs | nxtwash cash-logs |
Reads cash-middleware.service. |
| Show live dashboard | nxtwash status |
Installs/checks lm-sensors and jq, then displays system/service information. |
| View configuration | nxtwash get-configs |
Reads local middleware API configuration; output may contain secrets. |
| Change middleware release | nxtwash git mw VERSION |
Updates dependencies and restarts the base middleware service. |
| Update installer | nxtwash git installer [BRANCH] |
Discards tracked local installer edits, checks out the branch and pulls updates. |
| Install local kiosk software | nxtwash install-local-kiosk |
Installs/updates UIRM and offers browser and autostart changes. |
| Install certificates | nxtwash install-cert |
Creates/replaces certificates and nginx configuration; restarts nginx. |
| Distribute certificates | nxtwash distribute-cert |
Copies certificates and server key to selected middleware hosts; see limitations below. |
| Install cash support | nxtwash install-cash |
Installs cash middleware; can replace an existing installation. |
| Manage cash | nxtwash manage-cash |
Offers restart, configuration editing, logs or removal. |
| Add middleware instances | nxtwash install-multiple-middleware |
Creates services and nginx endpoints; also offers removal of existing extra instances. |
VERSION and BRANCH are placeholders for the release or branch selected by NXT Wash/IT. Square brackets mean an optional argument; do not type the brackets. Installation, update and restart commands belong in the planned maintenance work for the affected device.
Read logs
Follow one service at a time:
nxtwash logs
For additional middleware instance 1:
nxtwash logs 1
For the cash service:
nxtwash cash-logs
Ctrl+C stops following logs, not the service. For paged historical output, press q to leave the pager.
Both a start and end date are required for a date range. Replace these example dates with the incident period:
nxtwash logs 2026-10-08 2026-10-09
nxtwash logs 1 2026-10-08 2026-10-09
nxtwash cash-logs 2026-10-08 2026-10-09
Use date-only arguments with this wrapper. Its dispatcher does not preserve spaces in timestamp arguments. For an exact time window, use the service journal directly; the example uses the computer's local time:
journalctl -u NXTWashMiddleware.service --since "2026-10-09 08:00:00" --until "2026-10-09 09:00:00" --no-pager
Substitute NXTWashMiddleware@1.service or cash-middleware.service for those services. The middleware wrapper filters some protocol-detail lines from date-range output; direct journalctl retains them. If journal access is denied, have an authorized technician read it with the necessary privileges.
Check connected-client counts
The example Sent event to 0 clients, KeepAliveEvent() shows no clients connected to that middleware instance at those times. Compare the count with the devices/client sessions expected for that instance to identify missing or extra connections. See the log screenshot and interpretation.
Use an approved Chromium-based browser, including Chrome or Chromium, for NXT Wash. Firefox is not approved.
Check service state and release
These inspection commands do not install packages or restart services:
systemctl status NXTWashMiddleware.service --no-pager
systemctl status nginx.service --no-pager
git -C "$HOME/POS_SERVER/NXTWashMiddleware" describe --tags --always
On machines with the corresponding components:
systemctl status NXTWashMiddleware@1.service --no-pager
systemctl status cash-middleware.service --no-pager
systemctl status pm2-nxtwash.service --no-pager
An absent optional service is not itself proof of a failure. Match the check to the device's assigned role.
nxtwash status provides a refreshing dashboard for resource use, services, versions and configuration-file presence. It runs a package installation command first, so use the direct checks above if you only need inspection. The Jetson view can show a camera access key; redact captures before sharing. The dashboard's directory filter can omit the cash service from the dashboard, so check cash explicitly.
Update software
Record the current release and preserve protected configuration before a change. Use the NXT Wash-selected target version:
nxtwash git mw VERSION
The helper pulls the middleware repository, checks out the specified version, installs requirements, copies the service definition, reloads systemd and restarts NXTWashMiddleware.service. It does not update the separate nxt-1, nxt-2 instance directories or their services.
Afterward, check the reported release, service state and startup logs, then verify the application's connection and the lane functions affected by the change. Re-selecting an older version is not evidence that application data changes have been reversed.
To update the installer itself:
nxtwash git installer
The uploaded default branch is main. An optional branch argument selects another branch. This command runs git restore . first, discarding tracked local changes in the installer checkout. Preserve needed local edits before using it. Updating the installer changes future command behavior, so consult its help and release guidance again after updating.
Certificates
nxtwash install-cert asks for organization/site, permanent middleware IP, validity period and certificate credentials. It can scan a supplied subnet for middleware and lets the technician confirm or enter the address list. It configures 5443 → 5000, hosts the public CA on port 80 and restarts nginx. Replacing an existing CA can require updating tablet trust.
nxtwash distribute-cert transfers the server certificate, server private key and CA certificate through SSH/SCP to selected middleware computers, then restarts nginx on them. Confirm the target hosts and certificate names before distribution.
Certificate distribution limitation: distribution uses CERTNAME and CANAME variables created during certificate installation. A fresh command invocation does not establish those names in the installer defaults. Use the distribution offer within the certificate-install session, or have NXT Wash support resolve the existing-certificate workflow. Do not regenerate a working CA solely to get past this limitation. Verify destination nginx configuration and permissions as part of technician commissioning; the distribution helper does not rewrite the destination nginx configuration.
Tablet certificate instructions are in Galaxy Tab Active5 setup.
Cash middleware
nxtwash install-cash offers Fujitsu, ITL or Genmega. It sets up a Python environment and cash-middleware.service, appends cash enablement to the base middleware environment and prompts for hardware configuration. On an existing installation it can uninstall first, so preserve its configuration before replacement.
Open the management menu:
nxtwash manage-cash
| Menu choice | Result |
|---|---|
| 1 · Restart | Restarts the cash service. |
| 2 · Edit configuration | Lists serial devices, asks about hardware and writes /etc/default/cash-middleware. |
| 3 · Logs | Opens the cash-service log view. |
| 4 · Uninstall | Removes the cash installation after confirmation. |
Configuration editing does not automatically restart the service. After a planned edit, reopen the menu and select restart, then review cash logs and verify the device. This also matters during installation because the helper starts the service before prompting for its configuration. Coordinate any required base middleware restart after changing its environment with NXT Wash support.
Match serial-port and dispenser settings to the installed hardware. Keep dispenser keys and device credentials in protected configuration, not a support screenshot. Use cash diagnostics for hardware-specific context.
Multiple middleware instances
nxtwash install-multiple-middleware creates additional application directories, Python environments, systemd instances and nginx sites. Record which instance serves which lane before using instance commands.
| Component | Base middleware | Additional instance 1 |
|---|---|---|
| Application directory | ~/POS_SERVER/NXTWashMiddleware |
/home/nxtwash/POS_SERVER/nxt-1/NXTWashMiddleware |
| Service | NXTWashMiddleware.service |
NXTWashMiddleware@1.service |
| Application port | 5000 | 5001 |
| HTTPS port | 5443 | 5401 |
| Log shortcut | nxtwash logs |
nxtwash logs 1 |
The wrapper recognizes single-digit instance arguments. The helper uses port patterns 500N and 540N; this reference covers instances 1–9. Do not assume multi-digit numbering works consistently.
The helper copies the base .env into new instances. Verify each instance's intended identity and device configuration before putting it into use. It uses existing certificate files for nginx. It does not automatically map an instance to a physical lane.
If extra instances already exist, the helper offers to remove them or add more. The removal branch deletes their directories and shared instance service setup, changes nginx configuration, and restarts services. Use that choice only when intentionally removing those instances.
Targeted configuration and repairs
| Command | Use and actual scope |
|---|---|
nxtwash get-configs |
Selects the base middleware or an instance and reads controller, camera and gate configuration through local APIs. Treat the output as potentially sensitive. |
nxtwash set-configs |
Not implemented in this installer: it prints TODO. Use the supported configuration workflow with NXT Wash. |
nxtwash install-local-kiosk |
Installs/updates UIRM, optionally removes browsers and creates PM2 autostart. This supports the application on the replacement physical screen. |
nxtwash fix-browser-hc |
Deletes and recreates the PM2 browser-hc process from ~/uirm/browser-host-controller/index.js, then saves the process list. Use for that component's confirmed fault. |
nxtwash dc-direct-fix |
Adds a broadcast lookup route to the selected NetworkManager connection and brings that connection up again. It can interrupt connectivity; it is not the tunnel-controller VLAN configuration. |
nxtwash disable-wayland |
Replaces /etc/gdm3/custom.conf, selects Xorg and enables automatic login for nxtwash. Preserve needed custom desktop/login settings first. |
nxtwash hostname NEW_HOSTNAME |
Changes this computer's hostname immediately, with no additional application confirmation. Replace the placeholder with its assigned name. |
nxtwash add-tp-data |
Jetson camera-data helper: installs dependencies, obtains/collects camera credentials, writes a configuration capture and offers to overwrite the camera form-data file. Use on the intended Jetson account only. |
White Water's physical-screen setup remains HDMI video + USB touch + screen power. These repair commands are selected for a diagnosed component; they are not a sequence to run through for every screen or network problem.
Resume or remove an installation
nxtwash with no arguments runs the installation/resume sequence. nxtwash checkpoint rewrites the stored stage marker and immediately launches that sequence. Neither is a health check.
The checkpoint menu uses friendly step numbers that differ from the stage filenames. For example, menu 6 · Create Service stores completed stage 06 so the next stage is 07; menu 12 · Finalize stores 98. Selecting a stage causes later eligible stages to run too. The checkpoint file contains installation answers and can contain secrets.
In this installer, answering No to the running-service reinstall question prints a skip message but still returns to the step loop. Do not rely on that answer to exit the installer. Use Ctrl+C if you started installation unintentionally.
nxtwash uninstall removes software and configuration. The implementation stops/removes the base middleware service and nginx site and purges packages including Git, Python pip and nginx. Its application-directory removal uses a relative path, so working-directory context affects cleanup. It is not a reliable all-components reset for multiple instances, cash and UIRM. NXT Wash/IT should review the actual checkout before removal on an existing site.
Standalone device health report
The upload also contains nxt_healthcheck.sh, a separate Bash script. The modular dispatcher does not expose a nxtwash healthcheck command or install this helper as part of its listed stages.
If IT has placed the reviewed helper in the current directory, an inspection-only invocation is:
bash ./nxt_healthcheck.sh --device "Lane 1 middleware" --notes "Before maintenance" --no-sudo
It reads system resource use, failed services, gateway ping results, available-update information and other host details, then prints a report. --no-sudo skips privileged checks. Without that flag it may request sudo for firewall status and journal reading. The supplied helper does not install updates or restart services.
Its score describes host checks, not a completed POS transaction, payment or wash-send test. Review any log snippets before sharing the report.