Version: v2.0.10
ModBridge is a modern, robust Modbus TCP proxy manager with an elegant web interface. It multiplexes and manages Modbus connections and provides detailed monitoring, logging, and security in a compact, easy-to-deploy package.
All detailed information about configuration (Web UI & headless) and usage can be found in the GitHub Wiki.
- โ๏ธ Configuration (WebUI & Headless)
- ๐ง Features & API
- ๐ฉบ Troubleshooting
A proxy is not a cable. ModBridge sits between your client (Home Assistant, SCADA, your own script) and the Modbus device and solves the problems that arise there:
Always active, no configuration needed:
- Transaction matching โ towards the device, ModBridge assigns its own transaction IDs and discards responses that do not belong to the current request. Without this, a late response becomes the answer to the next request, and from then on every query fails.
- Time budget per request โ when it expires, the client gets a clean Modbus exception instead of a late response nobody is waiting for anymore.
Configurable per proxy, off by default:
| Option | Purpose |
|---|---|
max_target_conns |
Devices that serve only one Modbus session (SolarEdge/SunSpec and many inverters) |
min_request_gap_ms |
Devices that discard requests sent without a pause. Note: this cost applies per request |
request_timeout_ms |
Hard upper bound including retries |
cache_enabled + poll_interval_ms |
Keep registers warm in the background so the client never waits for a sluggish device |
In the web interface:
- Device profiles โ about 60 entries in seven categories (inverters, heat pumps, ventilation, meters, storage, wallboxes, general). They fill the form with values that fit the device class and change nothing else.
- Measure the device โ probes gap, connections, and response time on the real device and suggests values instead of guessing. Read access only, 90 seconds at most, and nothing is applied until you click. For the duration, the proxy disconnects connected clients and accepts no new ones; they reconnect on their own afterwards.
Details in the Wiki: Configuration and Troubleshooting.
A sluggish device makes every client wait. The cache keeps exactly the registers that are actually queried warm, and the background poller refreshes them on its own schedule โ the client gets its answer immediately, and the device is asked less often.
Both are off by default, because the trade-off should be a deliberate choice: a cached value is not the live value. Writes never go through the cache and invalidate the affected entries.
Instead of estimating values, ModBridge measures them on the device in front of you: the gap between requests is shortened step by step until the device starts discarding requests, and the last clean step gets a safety margin.
The install script handles everything: binary download, systemd service with autostart, and setup as a system-wide CLI command (modbridge).
curl -sSL https://raw.githubusercontent.com/Xerolux/modbridge/main/scripts/modbridge.sh | sudo bash -s install# 1. Download the script
curl -sSL -o modbridge.sh https://raw.githubusercontent.com/Xerolux/modbridge/main/scripts/modbridge.sh
chmod +x modbridge.sh
# 2. Install (interactive, with menus)
sudo bash modbridge.sh install
# 3. Afterwards 'modbridge' is available system-wide
sudo modbridge status| Step | Description |
|---|---|
| Detect architecture | amd64, arm64, or arm detected automatically |
| Choose variant | Full (with WebUI) or Headless (without WebUI) |
| Choose version | Latest release from GitHub, or pick an older one |
| Download binary | Matching binary to /opt/modbridge/modbridge |
| Install script | Script copied to /usr/local/bin/modbridge |
| systemd service | Service created with autostart and started |
After installation, ModBridge starts automatically on every system boot. All configured proxies are started automatically as well.
modbridge # Interactive TUI menu (whiptail)
modbridge install [--auto] # Install (or reinstall)
modbridge update [--auto] # Update
modbridge start # Start the service
modbridge stop # Stop the service
modbridge restart # Restart the service
modbridge status # Show status
modbridge logs [-f] # Logs (live with -f)
modbridge health # Health check
modbridge config # Edit config (nano/vi)
modbridge backup # Back up config + DB
modbridge version # Show version
modbridge uninstall # Remove completely| Option | Description |
|---|---|
--auto |
Automatic mode: latest version, WebUI, no dialogs |
--headless |
Automatic mode, headless variant |
--force |
Force installation (overwrites existing one) |
NO_UPDATE=1 |
Skip the script self-update |
The script automatically checks for a newer version on every invocation. If one is available, it downloads the new version and restarts itself. No manual intervention required.
# Checks for script updates automatically, then installs
sudo modbridge install
# Skip the update check
NO_UPDATE=1 sudo modbridge installModBridge protects your data during updates and reinstalls:
| Action | Config (config.json) |
Database (modbridge.db) |
Proxies |
|---|---|---|---|
modbridge update |
Preserved + backup | Preserved | Preserved, service is restarted |
modbridge install (already installed) |
Preserved โ offers an update | Preserved | Preserved |
modbridge install --force |
Preserved + backup | Preserved | Preserved, reinstall |
modbridge uninstall |
Deleted (backup optional) | Deleted (backup optional) | Deleted |
Update process in detail:
- Service is stopped
- Config is automatically backed up to
/opt/modbridge/backups/ - Old binary is kept as
modbridge.backup.TIMESTAMP - New binary is downloaded
- Service is restarted
- If startup fails โ automatic rollback to the previous binary
Reinstall (e.g. after switching variants Full โ Headless):
sudo modbridge install --force
# Config and DB are preserved, only the binary is replaced# Create a backup
sudo modbridge backup
# โ /opt/modbridge/backups/config-20260401_120000.json
# โ /opt/modbridge/backups/db-20260401_120000.db
# Edit the config
sudo modbridge config
# Restart the service after config changes
sudo modbridge restart| Architecture | System |
|---|---|
amd64 |
Intel/AMD 64-bit (standard servers, PCs) |
arm64 |
ARM 64-bit (Raspberry Pi 4/5, ARM servers) |
arm |
ARM 32-bit (Raspberry Pi Zero/1/2/3, 32-bit OS) |
Alternative installation via Docker Compose:
version: '3.8'
services:
modbridge:
image: ghcr.io/xerolux/modbridge:latest
container_name: modbridge
restart: unless-stopped
ports:
- "8080:8080"
- "5020-5030:5020-5030" # Port range for proxies
volumes:
- ./config.json:/app/config.json
- ./data:/app/datadocker-compose up -dAfter installation (Full variant), the web UI is available at:
http://<SERVER-IP>:8080
The admin password is generated automatically on first start and printed to the logs:
modbridge logs | grep -i passwordMore views โ devices, logs, dark theme, and mobile format โ in the Wiki.
Want to get your hands dirty or compile the project from source?
See the Wiki for make commands, frontend builds, and more.
Local build:
make build
./modbridgeContributions are welcome! Please read CONTRIBUTING.md for details.
MIT License โ see LICENSE for details.
- Xerolux - GitHub
Version: 2.0.10 | Status: Beta | Last updated: August 2026



