|
| 1 | +# MeshCentral Add-on for Home Assistant |
| 2 | + |
| 3 | +[](https://github.com/andlo/ha-meshcentral-addon/releases) |
| 4 | +[](LICENSE) |
| 5 | + |
| 6 | +Run [MeshCentral](https://meshcentral.com) as a Home Assistant add-on — the free, open-source remote device management platform. Monitor and control all your Windows, Linux and macOS computers directly from Home Assistant. |
| 7 | + |
| 8 | +## What is MeshCentral? |
| 9 | + |
| 10 | +MeshCentral lets you remotely monitor, manage and control computers — think of it as your own private TeamViewer or AnyDesk, completely self-hosted, no subscriptions, no cloud dependency. |
| 11 | + |
| 12 | +When combined with the [MeshCentral HA integration](https://github.com/andlo/ha-meshcentral), your PCs become first-class citizens in your smart home: |
| 13 | + |
| 14 | +- See online/offline status in real-time |
| 15 | +- Wake, reboot, sleep, hibernate or shut down devices from HA |
| 16 | +- Automate based on PC state (turn on desk lamp when PC comes online, cut power when it shuts down) |
| 17 | +- Monitor Windows Defender, firewall and antivirus status |
| 18 | +- Hardware sensors: CPU, GPU, RAM, disk |
| 19 | + |
| 20 | +## Installation |
| 21 | + |
| 22 | +### Step 1 — Add this repository to HA |
| 23 | + |
| 24 | +1. Go to **Settings → Add-ons → Add-on Store** |
| 25 | +2. Click ⋮ → **Repositories** |
| 26 | +3. Add: `https://github.com/andlo/ha-meshcentral-addon` |
| 27 | +4. Find and install **MeshCentral** |
| 28 | + |
| 29 | +### Step 2 — First-time setup |
| 30 | + |
| 31 | +Before starting the add-on for the first time, you need to allow account creation: |
| 32 | + |
| 33 | +1. Go to the add-on **Configuration** tab |
| 34 | +2. Note the `data_path` (default: `/data/meshcentral-data`) |
| 35 | +3. Start the add-on |
| 36 | +4. Open the MeshCentral web interface (see **Network** below) |
| 37 | +5. Create your admin account |
| 38 | +6. **Important:** After creating your account, stop the add-on and edit `/data/meshcentral-data/config.json` — set `"newAccounts": false` to prevent others from registering |
| 39 | + |
| 40 | +### Step 3 — Install the HA integration |
| 41 | + |
| 42 | +Install the [MeshCentral integration](https://github.com/andlo/ha-meshcentral) via HACS to connect HA entities to your MeshCentral server. |
| 43 | + |
| 44 | +Use these settings in the integration: |
| 45 | +- **Host:** `homeassistant.local` (or your HA IP) |
| 46 | +- **Port:** `4430` |
| 47 | +- **Use SSL:** off (the add-on uses tlsOffload — HA handles TLS) |
| 48 | +- **Verify SSL:** off |
| 49 | + |
| 50 | +### Step 4 — Install agents on your computers |
| 51 | + |
| 52 | +Download and install the MeshCentral agent on each computer you want to manage: |
| 53 | + |
| 54 | +1. Log in to MeshCentral web interface |
| 55 | +2. Go to **My Devices → Add Device** |
| 56 | +3. Download and run the installer on each PC |
| 57 | + |
| 58 | +## Network |
| 59 | + |
| 60 | +### Local network only (simplest) |
| 61 | + |
| 62 | +The add-on is accessible on your local network at: |
| 63 | +`http://homeassistant.local:4430` |
| 64 | + |
| 65 | +Agents on the same network will connect automatically. |
| 66 | + |
| 67 | +### External access via Nabu Casa (recommended) |
| 68 | + |
| 69 | +If you have [Nabu Casa](https://www.nabucasa.com/) (Home Assistant Cloud): |
| 70 | + |
| 71 | +1. Enable **Remote Access** in Nabu Casa |
| 72 | +2. Your MeshCentral will be accessible at your Nabu Casa URL |
| 73 | +3. Agents outside your home network can connect via the Nabu Casa URL |
| 74 | + |
| 75 | +### External access via Cloudflare Tunnel (free, no port-forwarding) |
| 76 | + |
| 77 | +1. Set up a [Cloudflare Tunnel](https://developers.cloudflare.com/cloudflare-one/connections/connect-networks/) pointing to `http://homeassistant.local:4430` |
| 78 | +2. In MeshCentral's config.json, set your tunnel URL as the `hostname` |
| 79 | +3. Agents anywhere in the world can now connect |
| 80 | + |
| 81 | +### Port forwarding (traditional) |
| 82 | + |
| 83 | +Forward port `4430` on your router to your HA host IP. |
| 84 | + |
| 85 | +## Configuration |
| 86 | + |
| 87 | +| Option | Default | Description | |
| 88 | +|--------|---------|-------------| |
| 89 | +| `data_path` | `/data/meshcentral-data` | Where MeshCentral stores its data | |
| 90 | +| `hostname` | *(auto)* | Public hostname for agent connections — set this to your external URL (Cloudflare, Nabu Casa etc.) | |
| 91 | +| `allow_device_sharing` | `false` | Allow device sharing with other users | |
| 92 | + |
| 93 | +## Ports |
| 94 | + |
| 95 | +| Port | Description | |
| 96 | +|------|-------------| |
| 97 | +| `4430/tcp` | MeshCentral web interface | |
| 98 | + |
| 99 | +## Updating MeshCentral |
| 100 | + |
| 101 | +The add-on bundles a specific version of MeshCentral. When a new version of the add-on is released, update it via the HA add-on store. Your data and agent connections are preserved across updates. |
| 102 | + |
| 103 | +## Backup |
| 104 | + |
| 105 | +MeshCentral data is stored in `/data/meshcentral-data` which is included in HA's standard backup. All device connections, users, and settings are backed up automatically. |
| 106 | + |
| 107 | +## Troubleshooting |
| 108 | + |
| 109 | +**Agents can't connect from outside my network:** |
| 110 | +Set the `hostname` option to your external URL (Cloudflare tunnel, DuckDNS, Nabu Casa URL). |
| 111 | + |
| 112 | +**Can't create account:** |
| 113 | +Temporarily set `"newAccounts": true` in `/data/meshcentral-data/config.json` and restart the add-on. Remember to set it back to `false` after. |
| 114 | + |
| 115 | +**MeshCentral integration shows "invalid_auth":** |
| 116 | +If your account has 2FA enabled, create a Login Token in MeshCentral → My Account → Login Tokens and use those credentials in the HA integration. |
| 117 | + |
| 118 | +## Related |
| 119 | + |
| 120 | +- [MeshCentral HA Integration](https://github.com/andlo/ha-meshcentral) — HACS integration for HA entities |
| 121 | +- [MeshCentral](https://meshcentral.com) — Official MeshCentral website |
| 122 | +- [MeshCentral GitHub](https://github.com/Ylianst/MeshCentral) — MeshCentral source code |
| 123 | + |
| 124 | +## License |
| 125 | + |
| 126 | +MIT |
0 commit comments