The Node Agent build system uses PyInstaller to bundleDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/ManiFed/TTN/llms.txt
Use this file to discover all available pages before exploring further.
src/main_service.py and all dependencies into a single self-contained executable, then wraps it in a platform-native installer that registers the agent as a system service, writes the initial config.yaml from a template, and configures the OS to prevent sleep during overnight operation. Donors receive one file to download and one prompt to answer — their activation code — and the telescope is online.
Prerequisites
| Requirement | Platform | Notes |
|---|---|---|
| Python 3.10+ | All | Must be on PATH |
| PyInstaller | All | pip install pyinstaller |
| NSIS 3.x | Windows only | makensis must be on PATH |
| NSSM | Windows only | Placed at build/windows/nssm/nssm.exe — bundled into the installer |
| Xcode CLI tools | macOS only | Required by pkgbuild/productbuild |
| Nothing extra | Linux | AppImage optional via appimagetool |
hnsky.org into build/binaries/ before running PyInstaller, so end users do not need to install ASTAP separately. The G18 star catalogue (~6 GB) is not bundled — the Node Agent downloads it on first run via the dashboard setup wizard.
Building
| Platform | Output |
|---|---|
| Windows | dist/TelescopeNetNode-Setup.exe |
| macOS | dist/TelescopeNetNode-X.Y.Z-macOS.pkg |
| Linux | dist/BoundlessSkiesNode-linux-x86_64 |
Windows Installer (NSIS + NSSM)
The Windows installer is built frombuild/windows/install.nsi using NSIS. It produces dist/TelescopeNetNode-Setup.exe — a standard Windows installer that donors run with a double-click.
What the installer does:
Prompt for activation code
A custom NSIS page asks for the donor’s Node Activation Code (
BS-YYYY-XXXXXXXX). The code is validated for the correct BS- prefix, then written into config.yaml at the cloud.activation_code field. Donors get their code from telescopenet.org/account.Install files
The main executable is installed to
%PROGRAMFILES64%\TelescopeNet\NodeAgent\. Data files (config, logs, FITS exports, AAVSO submissions) are placed in %APPDATA%\TelescopeNet\NodeAgent\.Disable AC idle sleep
The installer calls:This prevents Windows from sleeping while the telescope is plugged in — critical for all-night operation. Uninstalling the agent restores the default timeouts (30 min standby, 60 min hibernate).
Register as a Windows service via NSSM
NSSM (the Non-Sucking Service Manager) registers
TelescopeNetNode as a Windows service set to SERVICE_AUTO_START. Log rotation is configured to cap each log file at 5 MB. The service is started immediately after installation.macOS Package (.pkg)
The macOS build produces a signed.pkg installer via pkgbuild and productbuild (Xcode CLI tools).
Installation layout:
| Path | Contents |
|---|---|
/Applications/TelescopeNetNode/ | Main executable |
/Library/LaunchDaemons/org.telescopenet.nodeagent.plist | launchd service definition |
/Library/Application Support/TelescopeNet/NodeAgent/ | Config, logs, data |
- Installs the launchd plist to
/Library/LaunchDaemons/— the agent starts automatically at boot and restarts if it crashes - Calls
pmset -c sleep 0to disable AC idle sleep, preventing the Mac from sleeping while plugged in - Data directory:
/Library/Application Support/TelescopeNet/NodeAgent/
Linux (systemd)
Linux installation is handled bybuild/linux/install.sh. The recommended path is a one-line installer:
Create service user
Creates a
telescopenet system user with no login shell, used to run the agent with minimal privileges.Install binary and config
Installs the Node Agent binary and writes
config.yaml from the template with the activation code substituted.Install and enable systemd unit
Installs the
telescopenet-node.service unit file and enables it so the agent starts at boot:Sleep Prevention
Preventing the host machine from sleeping is critical for overnight telescope operation. Each platform uses OS-native mechanisms both at install time and at runtime:| Platform | Install-time | Runtime |
|---|---|---|
| Windows | powercfg /change standby-timeout-ac 0 | SetThreadExecutionState (ES_CONTINUOUS | ES_SYSTEM_REQUIRED) |
| macOS | pmset -c sleep 0 | caffeinate -i -w <PID> |
| Linux | Mask sleep.target etc. | systemd-inhibit --what=sleep |
src/sleep_prevention.py) is a separate layer from the installer-level power settings. Both must be active for a robust setup — the installer sets the OS policy, and the runtime inhibitor ensures the agent itself holds a sleep lock for the duration of the night.
Build System Files
| File | Purpose |
|---|---|
build/build.py | Cross-platform build orchestration script (run this) |
build/node_agent.spec | PyInstaller spec — controls what is bundled into the executable |
build/config.template.yaml | Config template written by installers; the cloud.activation_code field is populated from the installer prompt |
build/windows/install.nsi | NSIS installer script for Windows |
build/macos/build_dmg.sh | macOS .pkg build script |
build/linux/install.sh | systemd install script for Linux |
build/binaries/ | ASTAP binary download cache (auto-populated by build.py) |