Skip to content
Open
Show file tree
Hide file tree
Changes from 22 commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
ccb861a
create cross compile makefile
not-first Jan 6, 2026
97c37fc
create basic spk structure
not-first Jan 7, 2026
b09f6aa
fix incorrect regex validation format
not-first Jan 7, 2026
e78d64d
update description
not-first Jan 7, 2026
9bff3db
Merge branch 'SynoCommunity:master' into beszel-agent
not-first Jan 7, 2026
a026b52
add support for extra filesystems
not-first Jan 7, 2026
7c64901
allow upgrades and create uifile to handle config value changing and …
not-first Jan 7, 2026
666bcd3
improve text field width and add empty text for example content
not-first Jan 7, 2026
8331851
utilise temp upgrade folder instead of upgrade uifile
not-first Jan 7, 2026
cddd72a
update to 0.18.0 and enable basic SMART monitoring
not-first Jan 12, 2026
c16ad09
integrate proper SMART device file storage
not-first Jan 12, 2026
599c264
update to 0.18.1
not-first Jan 12, 2026
23ff3be
update digests
not-first Jan 12, 2026
3f5fd49
update initial version to 1.18.3
not-first Feb 2, 2026
412ce47
remove uneeded hub patch
not-first Feb 2, 2026
13fef49
remove windows only conditionals
not-first Feb 2, 2026
ecb6502
revert patch change
not-first Feb 2, 2026
8d19810
Merge branch 'SynoCommunity:master' into beszel-agent
not-first Feb 2, 2026
8b29315
update descriptions to mention SMART monitoring docs
not-first Feb 2, 2026
4e5a382
remove debug log level export
not-first Feb 27, 2026
f4efa99
declare unsupported ARCHS
not-first Feb 27, 2026
2cc771e
Merge branch 'SynoCommunity:master' into beszel-agent
not-first Feb 28, 2026
d811dfe
add newline to end of uifile, remove reduntant upgrade functions
not-first Feb 28, 2026
29a6827
add SKIP_SYSTEMD env var
not-first Mar 2, 2026
073cf21
R\revert "add SKIP_SYSTEMD env var"
not-first Mar 3, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 28 additions & 0 deletions cross/beszel-agent/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
PKG_NAME = beszel-agent
REAL_PKG_NAME = beszel
PKG_VERS = 0.18.3
PKG_EXT = tar.gz
PKG_DIST_NAME = v$(PKG_VERS).$(PKG_EXT)
PKG_DIST_SITE = https://github.com/henrygd/beszel/archive/refs/tags
PKG_DIST_FILE = $(REAL_PKG_NAME)-$(PKG_VERS).$(PKG_EXT)

PKG_DIR = $(PKG_NAME)/$(REAL_PKG_NAME)-$(PKG_VERS)
EXTRACT_PATH = $(WORK_DIR)/$(PKG_NAME)

BUILD_DEPENDS = native/go

HOMEPAGE = https://beszel.dev/
COMMENT = Simple, lightweight server monitoring agent.
LICENSE = MIT

UNSUPPORTED_ARCHS = $(PPC_ARCHS)

COMPILE_MAKE_OPTIONS = OS=$(GOOS) ARCH=$(GO_ARCH) build-agent
INSTALL_TARGET = install_beszel

include ../../mk/spksrc.cross-go.mk

.PHONY: install_beszel
install_beszel:
@install -d -m 755 $(STAGING_INSTALL_PREFIX)/bin
@install -m 755 $(WORK_DIR)/$(PKG_DIR)/build/beszel-agent $(STAGING_INSTALL_PREFIX)/bin/
1 change: 1 addition & 0 deletions cross/beszel-agent/PLIST
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
bin:bin/beszel-agent
3 changes: 3 additions & 0 deletions cross/beszel-agent/digests
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
beszel-0.18.3.tar.gz SHA1 78548d3555a4ff79b642509fde9fc3cc9eb280cf
beszel-0.18.3.tar.gz SHA256 a16680096326ae5e510d694fbc5b324a4144df898ecf9a5a5ee229f3291a1357
beszel-0.18.3.tar.gz MD5 091f34021bc6def3480cb0530757f078
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
--- Makefile.orig
+++ Makefile
@@ -54,7 +54,7 @@

# Update build-agent to include conditional .NET build
build-agent: tidy build-dotnet-conditional fetch-smartctl-conditional
- GOOS=$(OS) GOARCH=$(ARCH) go build -o ./build/beszel-agent_$(OS)_$(ARCH)$(EXE_EXT) -ldflags "-w -s" ./internal/cmd/agent
+ GOOS=$(OS) GOARCH=$(ARCH) go build -buildvcs=false -o ./build/beszel-agent -ldflags "-w -s" ./internal/cmd/agent

24 changes: 24 additions & 0 deletions spk/beszel-agent/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
SPK_NAME = beszel-agent
SPK_VERS = 0.18.3
SPK_REV = 1
SPK_ICON = src/beszel.png

DEPENDS = cross/beszel-agent

MAINTAINER = not-first
DESCRIPTION = Lightweight server monitoring with historical data, docker stats, and alerts. This package provides only the agent, and requires Beszel Hub to be running elsewhere. See Beszel documentation for information on setting up SMART monitoring.

DISPLAY_NAME = Beszel Agent
CHANGELOG = "Initial package release for Beszel 0.18.3"

HOMEPAGE = https://beszel.dev/
LICENSE = MIT

STARTABLE = yes
SERVICE_SETUP = src/service-setup.sh
SERVICE_PORT = 45876
NO_SERVICE_SHORTCUT = y

WIZARDS_DIR = src/wizard/

include ../../mk/spksrc.spk.mk
Binary file added spk/beszel-agent/src/beszel.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
75 changes: 75 additions & 0 deletions spk/beszel-agent/src/service-setup.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
export PATH="/usr/local/bin:$PATH"

KEY_FILE="${SYNOPKG_PKGVAR}/key.pub"
EXTRA_FS_FILE="${SYNOPKG_PKGVAR}/extra_fs.conf"
SMART_DEVICES_FILE="${SYNOPKG_PKGVAR}/smart_devices.conf"

# Read the public key from the saved file
if [ -f "${KEY_FILE}" ]; then
BESZEL_PUBLIC_KEY=$(cat "${KEY_FILE}")
export KEY="${BESZEL_PUBLIC_KEY}"
fi

# Read the extra filesystems from the saved file
if [ -f "${EXTRA_FS_FILE}" ]; then
EXTRA_FS=$(cat "${EXTRA_FS_FILE}")
export EXTRA_FILESYSTEMS="${EXTRA_FS}"
fi

# Read the SMART devices from the saved file
if [ -f "${SMART_DEVICES_FILE}" ]; then
SMART_DEVS=$(cat "${SMART_DEVICES_FILE}")
export SMART_DEVICES="${SMART_DEVS}"
fi

BESZEL_AGENT="${SYNOPKG_PKGDEST}/bin/beszel-agent"
SERVICE_COMMAND="${BESZEL_AGENT}"

SVC_BACKGROUND=y
SVC_WRITE_PID=y

service_postinst ()
{
# Save the public key only if provided
if [ -n "${wizard_pub_key}" ]; then
echo "${wizard_pub_key}" > "${KEY_FILE}"
fi

# Save the extra filesystems only if provided
if [ -n "${wizard_extra_fs}" ]; then
echo "${wizard_extra_fs}" > "${EXTRA_FS_FILE}"
fi

# Save the SMART devices only if provided
if [ -n "${wizard_smart_devices}" ]; then
echo "${wizard_smart_devices}" > "${SMART_DEVICES_FILE}"
fi
}

service_preupgrade ()
{
# Backup configuration files before upgrade
if [ -f "${KEY_FILE}" ]; then
cp "${KEY_FILE}" "${SYNOPKG_TEMP_UPGRADE_FOLDER}/"
fi
if [ -f "${EXTRA_FS_FILE}" ]; then
cp "${EXTRA_FS_FILE}" "${SYNOPKG_TEMP_UPGRADE_FOLDER}/"
fi
if [ -f "${SMART_DEVICES_FILE}" ]; then
cp "${SMART_DEVICES_FILE}" "${SYNOPKG_TEMP_UPGRADE_FOLDER}/"
fi
}

service_postupgrade ()
{
# Restore configuration files after upgrade
if [ -f "${SYNOPKG_TEMP_UPGRADE_FOLDER}/key.pub" ]; then
cp "${SYNOPKG_TEMP_UPGRADE_FOLDER}/key.pub" "${KEY_FILE}"
fi
if [ -f "${SYNOPKG_TEMP_UPGRADE_FOLDER}/extra_fs.conf" ]; then
cp "${SYNOPKG_TEMP_UPGRADE_FOLDER}/extra_fs.conf" "${EXTRA_FS_FILE}"
fi
if [ -f "${SYNOPKG_TEMP_UPGRADE_FOLDER}/smart_devices.conf" ]; then
cp "${SYNOPKG_TEMP_UPGRADE_FOLDER}/smart_devices.conf" "${SMART_DEVICES_FILE}"
fi
}
56 changes: 56 additions & 0 deletions spk/beszel-agent/src/wizard/install_uifile
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
[
{
"step_title": "Beszel Agent Configuration",
"items": [
{
"type": "textfield",
"desc": "Provide the SSH public key of the Beszel Hub you want to add this system to.",
"subitems": [
{
"key": "wizard_pub_key",
"desc": "Public Key",
"defaultValue": "",
"emptyText": "ssh-ed25519 ....",
"width": "400",
"validator": {
"allowBlank": false,
"regex": {
"expr": "/^(ssh-(rsa|ed25519)|ecdsa-sha2-nistp(256|384|521)) [A-Za-z0-9+/]+={0,3}( .+)?$/",
"errorText": "Please enter a valid SSH public key."
}
}
}
]
},
{
"type": "textfield",
"desc": "Enter additional filesystems to monitor.",
"subitems": [
{
"key": "wizard_extra_fs",
"desc": "Extra Filesystems",
"emptyText": "/volume1,/volumeUSB1/usbshare",
"width": "400",
"defaultValue": ""
}
]
},
{
"type": "textfield",
"desc": "Configure SMART monitoring devices. List devices with :sat suffix for proper detection. Refer to Beszel documentation for details.",
"subitems": [
{
"key": "wizard_smart_devices",
"desc": "SMART Devices",
"emptyText": "/dev/sda:sat,/dev/sdb:sat",
"width": "400",
"defaultValue": ""
}
]
},
{
"desc": "The Beszel agent listens on port 45876 by default. Make sure this port is accessible from your Beszel Hub."
}
]
}
]