Skip to content

feat(hub): add DISABLE_SSH option to skip SSH fallback - #2469

Merged
henrygd merged 9 commits into
henrygd:mainfrom
svenvg93:feat/hub-skip-ssh-when-agent-disabled
Oct 1, 2026
Merged

henrygd merged 9 commits into
henrygd:mainfrom
svenvg93:feat/hub-skip-ssh-when-agent-disabled

Conversation

@svenvg93

@svenvg93 svenvg93 commented Sep 28, 2026 •

Copy link
Copy Markdown
Collaborator

📃 Description

Adds a hub-level DISABLE_SSH option. When it's set, the hub no longer falls back to SSH when an agent's WebSocket connection drops. It waits for the agent to reconnect instead, so powered-off machines aren't dialed over and over.

Closes #2096

📖 Documentation

Docs PR for the hub DISABLE_SSH variable to follow.

🪵 Changelog

➕ Added

  • Hub env var DISABLE_SSH / BESZEL_HUB_DISABLE_SSH.

✏️ Changed

  • The hub skips the SSH fallback for all systems when DISABLE_SSH=true is set on the hub.
  • With SSH disabled on the hub, the systems table shows the status dot instead of the connection type icon.

@svenvg93
svenvg93 requested a review from henrygd as a code owner September 28, 2026 18:51

@henrygd henrygd left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, I understand how adding a DISABLE_SSH option for the hub could be useful.

I don't understand syncing the DISABLE_SSH state from the agent to the hub. The hub only dials out for SSH connections if the agent is not connected. So DISABLE_SSH would have had to have been synced previously.

But what if someone changes their mind and wants to run over SSH because WS has problems or whatever? That info can't be synced back because the agent is unconnected, and SSH is now broken because the hub previously saved that setting and can't get the updated config from an unconnected agent, so the user is stuck with WS being the only option. Am I misunderstanding this?

@svenvg93

Copy link
Copy Markdown
Collaborator Author

Thanks, I understand how adding a DISABLE_SSH option for the hub could be useful.

I don't understand syncing the DISABLE_SSH state from the agent to the hub. The hub only dials out for SSH connections if the agent is not connected. So DISABLE_SSH would have had to have been synced previously.

But what if someone changes their mind and wants to run over SSH because WS has problems or whatever? That info can't be synced back because the agent is unconnected, and SSH is now broken because the hub previously saved that setting and can't get the updated config from an unconnected agent, so the user is stuck with WS being the only option. Am I misunderstanding this?

You're right, thanks. I'll drop the agent → hub sync and the ssh_disabled column and keep only the hub-level DISABLE_SSH, which is enough for #2096 (WS-only setups where the hub shouldn't keep dialing SSH to offline machines). If per-system control is needed later, it should be a hub-side setting rather than something the agent reports.

@svenvg93 svenvg93 changed the title feat(hub): skip SSH when DISABLE_SSH is set on the agent or hub feat(hub): add DISABLE_SSH option to skip SSH fallback Sep 29, 2026

@henrygd henrygd left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! I pushed one small commit on top before merging:

  • Removed the UI change. The connection icon is still accurate when every agent is on WebSocket, and I'd rather not add a public config field just to hide it. I think it's good to have the icon anyway because it confirms to the user that WS is in use.
  • Moved the DISABLE_SSH check into getSSHTransport(). Both SSH paths go through it, so one check replaces the two at the call sites and covers any future SSH caller.

@henrygd
henrygd merged commit 8a173e2 into henrygd:main Oct 1, 2026
@henrygd

henrygd commented Oct 1, 2026

Copy link
Copy Markdown
Owner

I'll go ahead and make the docs change, so no need to do that 👍

@svenvg93
svenvg93 deleted the feat/hub-skip-ssh-when-agent-disabled branch October 1, 2026 15:22
@svenvg93

svenvg93 commented Oct 1, 2026

Copy link
Copy Markdown
Collaborator Author

Thanks!

@luckman212

Copy link
Copy Markdown

Really happy to see this! Just for clarification, is the proper ENV var for the hub BESZEL_HUB_DISABLE_SSH ? It seems it will accept both, but I'd like to be explicit.

@henrygd

henrygd commented Oct 1, 2026

Copy link
Copy Markdown
Owner

@luckman212 Yes, BESZEL_HUB_DISABLE_SSH=true will work.

yair12 pushed a commit to yair12/beszel-containerd-k8s that referenced this pull request Oct 3, 2026
ivanch added a commit to ivanch/haven that referenced this pull request Oct 4, 2026
This PR contains the following updates:

| Package | Update | Change |
|---|---|---|
| [henrygd/beszel-agent](https://github.com/henrygd/beszel) | minor | `0.20.0` → `0.21.0` |

---

### Release Notes

<details>
<summary>henrygd/beszel (henrygd/beszel-agent)</summary>

### [`v0.21.0`](https://github.com/henrygd/beszel/releases/tag/v0.21.0)

[Compare Source](henrygd/beszel@v0.20.0...v0.21.0)

#### What's Changed

- Add pending package updates list to the system page ([#&#8203;2357](henrygd/beszel#2357), [#&#8203;2427](henrygd/beszel#2427))
- Add Wi-Fi signal strength monitoring ([#&#8203;2367](henrygd/beszel#2367))
- Add TLS certificate expiry check to HTTPS network monitors ([#&#8203;2401](henrygd/beszel#2401))
- Add systemd service logs to service details ([#&#8203;2440](henrygd/beszel#2440))
- Add option to set the DNS server queried by DNS monitors ([#&#8203;2389](henrygd/beszel#2389))
- Add network monitor comparison across systems and within the same system ([#&#8203;2442](henrygd/beszel#2442), [#&#8203;2477](henrygd/beszel#2477))
- Add `SYNC_SYSTEM_NAMES` environment variable to sync system names with hostnames ([#&#8203;1917](henrygd/beszel#1917))
- Add `DISABLE_SSH` option to the hub to skip SSH fallback ([#&#8203;2469](henrygd/beszel#2469))
- Add environment variable to disable container image update checks ([#&#8203;2371](henrygd/beszel#2371))
- Add MB/s and GB/s unit selection to bandwidth alerts
- Add log timestamp toggle ([#&#8203;2471](henrygd/beszel#2471))
- Add view settings to the network monitors table ([#&#8203;2396](henrygd/beszel#2396))
- Add Twemoji Country Flags font so flags always render ([#&#8203;2363](henrygd/beszel#2363))
- Change active alerts grid to a banner and sheet ([#&#8203;2445](henrygd/beszel#2445))
- Change network packet loss to a red line ([#&#8203;2377](henrygd/beszel#2377))
- Improve Intel GPU monitoring by parsing `intel_gpu_top` JSON output ([#&#8203;2387](henrygd/beszel#2387))
- Improve LXC guest CPU usage reporting using cgroup accounting ([#&#8203;2341](henrygd/beszel#2341))
- Improve WebSocket and SSH fallback handling ([#&#8203;2441](henrygd/beszel#2441))
- Fix LVM volumes not mapping to disk I/O by resolving device symlinks ([#&#8203;2486](henrygd/beszel#2486))
- Fix ZFS pool I/O stats to include snapshot reads ([#&#8203;2474](henrygd/beszel#2474))
- Fix inaccurate disk I/O on the first sample of an interval ([#&#8203;2420](henrygd/beszel#2420))
- Fix Windows volume names being altered when matching I/O devices ([#&#8203;2419](henrygd/beszel#2419))
- Fix 32-bit wrap of disk I/O time counters ([#&#8203;2407](henrygd/beszel#2407))
- Fix partial NVMe SMART data handling ([#&#8203;2340](henrygd/beszel#2340))
- Fix NVMe power-cycle SMART fields overflowing ([#&#8203;2484](henrygd/beszel#2484))
- Fix `nvethernet` network counters ([#&#8203;2090](henrygd/beszel#2090))
- Fix agent not reconnecting after an async WebSocket handshake failure ([#&#8203;2329](henrygd/beszel#2329), [#&#8203;2326](henrygd/beszel#2326))
- Fix WebSocket reconnect loops on slow agent collections ([#&#8203;2294](henrygd/beszel#2294))
- Fix `SKIP_GPU` not excluding GPU hwmon temperatures and fans ([#&#8203;2313](henrygd/beszel#2313))
- Fix Docker image update check across all image repository digests ([#&#8203;2393](henrygd/beszel#2393))
- Fix status alerts being lost during pending recovery ([#&#8203;2375](henrygd/beszel#2375))
- Fix hub requiring system access for alert subscriptions and delivery ([#&#8203;2455](henrygd/beszel#2455))
- Fix hub not honoring SSH request cancellation ([#&#8203;2450](henrygd/beszel#2450))
- Fix hub not restarting `beszel-hub.service` after update ([#&#8203;2410](henrygd/beszel#2410))
- Fix IP targets being accepted for DNS monitors ([#&#8203;2483](henrygd/beszel#2483))
- Fix short monitor IDs failing schema validation ([#&#8203;2454](henrygd/beszel#2454))
- Fix network monitor charts to show gaps for failed probes and disconnects ([#&#8203;2428](henrygd/beszel#2428))
- Fix duplicate y-axis labels on network monitor response charts ([#&#8203;2426](henrygd/beszel#2426))
- Fix translations not refreshing on locale change ([#&#8203;2405](henrygd/beszel#2405))
- Fix scrollbar layout shifts ([#&#8203;2406](henrygd/beszel#2406))
- Fix hub returning 200 for unknown frontend routes ([#&#8203;2414](henrygd/beszel#2414))
- Fix proxy caching of systemd details ([#&#8203;2456](henrygd/beszel#2456))
- Fix agent not exiting with code 0 when run without a key on Windows ([#&#8203;2376](henrygd/beszel#2376), [#&#8203;2247](henrygd/beszel#2247))
- Fix OpenWrt user account handling in the install script ([#&#8203;2370](henrygd/beszel#2370))
- Update Go dependencies

#### New Contributors

- [@&#8203;adrienboulle](https://github.com/adrienboulle) made their first contribution in [#&#8203;2397](henrygd/beszel#2397)
- [@&#8203;Mario-Mohar](https://github.com/Mario-Mohar) made their first contribution in [#&#8203;2410](henrygd/beszel#2410)
- [@&#8203;LudwigJMarx](https://github.com/LudwigJMarx) made their first contribution in [#&#8203;2407](henrygd/beszel#2407)
- [@&#8203;anandghegde](https://github.com/anandghegde) made their first contribution in [#&#8203;2357](henrygd/beszel#2357)
- [@&#8203;Yi-111-a](https://github.com/Yi-111-a) made their first contribution in [#&#8203;2419](henrygd/beszel#2419)
- [@&#8203;lukyjay](https://github.com/lukyjay) made their first contribution in [#&#8203;2387](henrygd/beszel#2387)
- [@&#8203;user01010111](https://github.com/user01010111) made their first contribution in [#&#8203;2461](henrygd/beszel#2461)
- [@&#8203;Juankers](https://github.com/Juankers) made their first contribution in [#&#8203;2470](henrygd/beszel#2470)
- [@&#8203;Bartuzen](https://github.com/Bartuzen) made their first contribution in [#&#8203;2484](henrygd/beszel#2484)
- [@&#8203;jeroendewilde](https://github.com/jeroendewilde) made their first contribution in [#&#8203;2471](henrygd/beszel#2471)

**Full Changelog**: <henrygd/beszel@v0.20.0...v0.21.0>

</details>

---

### Configuration

📅 **Schedule**: (UTC)

- Branch creation
  - At any time (no schedule defined)
- Automerge
  - At any time (no schedule defined)

🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update again.

---

 - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box

---

This PR has been generated by [Mend Renovate CLI](https://github.com/renovatebot/renovate).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0NC4xMTUuMTIiLCJ1cGRhdGVkSW5WZXIiOiI0NC4xMTUuMTIiLCJ0YXJnZXRCcmFuY2giOiJtYWluIiwibGFiZWxzIjpbXX0=-->

---------

Co-authored-by: Renovate Bot <bot@renovateapp.com>
Reviewed-on: https://git.ivanch.me/ivanch/haven/pulls/21
ivanch added a commit to ivanch/haven that referenced this pull request Oct 4, 2026
This PR contains the following updates:

| Package | Update | Change |
|---|---|---|
| [ghcr.io/henrygd/beszel/beszel](https://github.com/henrygd/beszel) | minor | `0.20.0` → `0.21.0` |

---

### Release Notes

<details>
<summary>henrygd/beszel (ghcr.io/henrygd/beszel/beszel)</summary>

### [`v0.21.0`](https://github.com/henrygd/beszel/releases/tag/v0.21.0)

[Compare Source](henrygd/beszel@v0.20.0...v0.21.0)

#### What's Changed

- Add pending package updates list to the system page ([#&#8203;2357](henrygd/beszel#2357), [#&#8203;2427](henrygd/beszel#2427))
- Add Wi-Fi signal strength monitoring ([#&#8203;2367](henrygd/beszel#2367))
- Add TLS certificate expiry check to HTTPS network monitors ([#&#8203;2401](henrygd/beszel#2401))
- Add systemd service logs to service details ([#&#8203;2440](henrygd/beszel#2440))
- Add option to set the DNS server queried by DNS monitors ([#&#8203;2389](henrygd/beszel#2389))
- Add network monitor comparison across systems and within the same system ([#&#8203;2442](henrygd/beszel#2442), [#&#8203;2477](henrygd/beszel#2477))
- Add `SYNC_SYSTEM_NAMES` environment variable to sync system names with hostnames ([#&#8203;1917](henrygd/beszel#1917))
- Add `DISABLE_SSH` option to the hub to skip SSH fallback ([#&#8203;2469](henrygd/beszel#2469))
- Add environment variable to disable container image update checks ([#&#8203;2371](henrygd/beszel#2371))
- Add MB/s and GB/s unit selection to bandwidth alerts
- Add log timestamp toggle ([#&#8203;2471](henrygd/beszel#2471))
- Add view settings to the network monitors table ([#&#8203;2396](henrygd/beszel#2396))
- Add Twemoji Country Flags font so flags always render ([#&#8203;2363](henrygd/beszel#2363))
- Change active alerts grid to a banner and sheet ([#&#8203;2445](henrygd/beszel#2445))
- Change network packet loss to a red line ([#&#8203;2377](henrygd/beszel#2377))
- Improve Intel GPU monitoring by parsing `intel_gpu_top` JSON output ([#&#8203;2387](henrygd/beszel#2387))
- Improve LXC guest CPU usage reporting using cgroup accounting ([#&#8203;2341](henrygd/beszel#2341))
- Improve WebSocket and SSH fallback handling ([#&#8203;2441](henrygd/beszel#2441))
- Fix LVM volumes not mapping to disk I/O by resolving device symlinks ([#&#8203;2486](henrygd/beszel#2486))
- Fix ZFS pool I/O stats to include snapshot reads ([#&#8203;2474](henrygd/beszel#2474))
- Fix inaccurate disk I/O on the first sample of an interval ([#&#8203;2420](henrygd/beszel#2420))
- Fix Windows volume names being altered when matching I/O devices ([#&#8203;2419](henrygd/beszel#2419))
- Fix 32-bit wrap of disk I/O time counters ([#&#8203;2407](henrygd/beszel#2407))
- Fix partial NVMe SMART data handling ([#&#8203;2340](henrygd/beszel#2340))
- Fix NVMe power-cycle SMART fields overflowing ([#&#8203;2484](henrygd/beszel#2484))
- Fix `nvethernet` network counters ([#&#8203;2090](henrygd/beszel#2090))
- Fix agent not reconnecting after an async WebSocket handshake failure ([#&#8203;2329](henrygd/beszel#2329), [#&#8203;2326](henrygd/beszel#2326))
- Fix WebSocket reconnect loops on slow agent collections ([#&#8203;2294](henrygd/beszel#2294))
- Fix `SKIP_GPU` not excluding GPU hwmon temperatures and fans ([#&#8203;2313](henrygd/beszel#2313))
- Fix Docker image update check across all image repository digests ([#&#8203;2393](henrygd/beszel#2393))
- Fix status alerts being lost during pending recovery ([#&#8203;2375](henrygd/beszel#2375))
- Fix hub requiring system access for alert subscriptions and delivery ([#&#8203;2455](henrygd/beszel#2455))
- Fix hub not honoring SSH request cancellation ([#&#8203;2450](henrygd/beszel#2450))
- Fix hub not restarting `beszel-hub.service` after update ([#&#8203;2410](henrygd/beszel#2410))
- Fix IP targets being accepted for DNS monitors ([#&#8203;2483](henrygd/beszel#2483))
- Fix short monitor IDs failing schema validation ([#&#8203;2454](henrygd/beszel#2454))
- Fix network monitor charts to show gaps for failed probes and disconnects ([#&#8203;2428](henrygd/beszel#2428))
- Fix duplicate y-axis labels on network monitor response charts ([#&#8203;2426](henrygd/beszel#2426))
- Fix translations not refreshing on locale change ([#&#8203;2405](henrygd/beszel#2405))
- Fix scrollbar layout shifts ([#&#8203;2406](henrygd/beszel#2406))
- Fix hub returning 200 for unknown frontend routes ([#&#8203;2414](henrygd/beszel#2414))
- Fix proxy caching of systemd details ([#&#8203;2456](henrygd/beszel#2456))
- Fix agent not exiting with code 0 when run without a key on Windows ([#&#8203;2376](henrygd/beszel#2376), [#&#8203;2247](henrygd/beszel#2247))
- Fix OpenWrt user account handling in the install script ([#&#8203;2370](henrygd/beszel#2370))
- Update Go dependencies

#### New Contributors

- [@&#8203;adrienboulle](https://github.com/adrienboulle) made their first contribution in [#&#8203;2397](henrygd/beszel#2397)
- [@&#8203;Mario-Mohar](https://github.com/Mario-Mohar) made their first contribution in [#&#8203;2410](henrygd/beszel#2410)
- [@&#8203;LudwigJMarx](https://github.com/LudwigJMarx) made their first contribution in [#&#8203;2407](henrygd/beszel#2407)
- [@&#8203;anandghegde](https://github.com/anandghegde) made their first contribution in [#&#8203;2357](henrygd/beszel#2357)
- [@&#8203;Yi-111-a](https://github.com/Yi-111-a) made their first contribution in [#&#8203;2419](henrygd/beszel#2419)
- [@&#8203;lukyjay](https://github.com/lukyjay) made their first contribution in [#&#8203;2387](henrygd/beszel#2387)
- [@&#8203;user01010111](https://github.com/user01010111) made their first contribution in [#&#8203;2461](henrygd/beszel#2461)
- [@&#8203;Juankers](https://github.com/Juankers) made their first contribution in [#&#8203;2470](henrygd/beszel#2470)
- [@&#8203;Bartuzen](https://github.com/Bartuzen) made their first contribution in [#&#8203;2484](henrygd/beszel#2484)
- [@&#8203;jeroendewilde](https://github.com/jeroendewilde) made their first contribution in [#&#8203;2471](henrygd/beszel#2471)

**Full Changelog**: <henrygd/beszel@v0.20.0...v0.21.0>

</details>

---

### Configuration

📅 **Schedule**: (UTC)

- Branch creation
  - At any time (no schedule defined)
- Automerge
  - At any time (no schedule defined)

🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update again.

---

 - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box

---

This PR has been generated by [Mend Renovate CLI](https://github.com/renovatebot/renovate).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0NC4xMTUuMTIiLCJ1cGRhdGVkSW5WZXIiOiI0NC4xMTUuMTIiLCJ0YXJnZXRCcmFuY2giOiJtYWluIiwibGFiZWxzIjpbXX0=-->

---------

Co-authored-by: Renovate Bot <bot@renovateapp.com>
Reviewed-on: https://git.ivanch.me/ivanch/haven/pulls/20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature]: A way to tell Beszel "if the host is down it's fine" / Ignore "host down"

3 participants