Urgent.News

What's breaking now, across thousands of outlets.

Tech

One Go Agent on Linux and OpenWrt: Fleetd Deployment Choices

Installing an agent on a cloud server and on a home router initially looks like the same job: copy an executable, write a configuration file and start it. Long-term operation raises different questions. Who starts it after a reboot? What if the network is not ready? Where are the logs? Will device identity and command records survive a restart? Fleetd manages Linux servers alongside OpenWrt and…

Installing an agent on a cloud server and a home router may appear to be the same task at first glance. However, when it comes to long-term operation, there are several factors to consider. For instance, who should start the agent after a reboot? How will the agent handle a situation where the network is not yet ready? Where should the logs be stored?

Will the device identity and command records be preserved in case of a restart? Fleetd takes care of Linux servers as well as OpenWrt and iStoreOS routers. In this article, we will focus on making the agent a persistent and troubleshootable system service. The implementation being discussed is v0.3.0 of Fleetd. This version supports amd64 and arm64 architectures, with both systemd and OpenWrt's procd as installers. This does not mean that every Linux-based device is supported.

One key aspect of Fleetd is that it is built using a single codebase with architecture-specific binaries. This means that both Linux-based servers and routers can use the same agent, which is created for Linux and produces executables for both 64-bit amd64 and arm64 architectures. It is important to note that an amd64 executable cannot run on arm64, and vice versa.

The installer will only support certain architectures, such as x86_64, amd64, amd64, and arm64. OpenWrt supports additional devices, including MIPS and 32-bit ARM, but these are not covered by this installation path.

The main benefit of using a single executable is that it reduces the runtime preparation required for the agent to run. The agent is built with CGO\_ENABLED=0, which reduces its dependence on the target system's dynamically linked C environment. This means that the agent does not require a Go compiler, Node.js, or Python runtime to start running on the target machine.

However, it is important to note that the agent still needs a network connection, a working HTTPS certificate trust environment, writable configuration storage, and the required kernel facilities.

During installation, the installer follows a specific sequence of steps. First, it requires root access and identifies the CPU architecture. Next, it detects whether the system is running systemd or an OpenWrt procd environment. After that, it downloads the appropriate agent from the Fleetd server and checks its version to ensure that the executable can start.

The installer then creates or preserves the configuration file, installs the binary, and registers and starts the service. Finally, it prints the device fingerprint for verification and approval in the dashboard.

It is worth noting that downloading only proves that a file has arrived, and running the version command checks only that the executable can start. Neither of these steps can guarantee that long-lived connections, collection, permissions, boot startup, or firmware-upgrade recovery work correctly. The installer prefers to use curl but will fall back to wget if necessary. On a minimal system, it is important to check that the installed tool supports the required HTTPS requests.

Once the agent is installed, the existing service manager (systemd on Linux servers and OpenWrt procd) takes care of the process lifecycle. The agent is typically installed in /usr/local/bin/fleetd-agent on Linux servers and /usr/bin/fleetd-agent on OpenWrt. The configuration file is located in /etc/fleetd/agent.yaml on both operating systems. The systemd unit file on Linux servers and the init file on OpenWrt define the agent's startup settings, including the service's restart behavior and startup order.

By using a single executable and having the service manager handle process lifecycle, Fleetd simplifies the deployment and maintenance of the agent on both Linux servers and OpenWrt routers. This approach helps ensure that the agent can run persistently and be easily troubleshooted in case of issues.

Written by urgent.news from Dev.to's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.

Read the original at dev.to →

More in Tech

A Late Interviewer: The 30-Minute Rule and What to Say

A late interviewer is one of the few interview problems a better answer cannot fix. The delay is not yours to fix, but the next 30 minutes are yours to manage.

  • Manage the next 30 minutes effectively when interview delayed.
  • Maintain calm, professional tone during communication.
  • Document interview process for on-site, phone, and video interviews.

Introducing Fleetd: Open-Source Management for Linux Servers and Routers

Managing a few servers and routers seems straightforward. Connect over SSH to check their state, read logs when a service fails, and run a few commands to update software.

  • Fleetd is open-source management tool for Linux servers and routers
  • Provides unified interface for monitoring, status inspection, and remote commands
  • Available under MIT license with English and Chinese documentation

Bluetooth Mesh Provisioning Succeeded—Why Won’t the Light Respond?

A device appears in the scan results. You click Add, the log reports successful provisioning, and the gateway gains a new entry. Everything looks finished. Then you send an On command.

  • Device appears in scan results but fails to respond to On command
  • Provisioning process includes key management, model binding, and publish/subscribe
  • Identity confirmation and correct security procedures are essential for device control

Your Code Can Be Perfect. Your Product Can Still Fail.

I've watched good engineers lose their jobs. Not all because of AI. Some because of budget cuts, restructuring, products that never found a market, or companies changing direction overnight.

  • Flawless code alone doesn't ensure product success
  • Modern tools streamline coding but don't solve core issues

My Agents Ran in Parallel. I Didn't

A review queue for people who run many AI agents, and the rule that keeps it safe: the model proposes, code can veto. By Arnold Wang, Chief Software Architect at Ingeniux Corporation.

  • Ten coding-agent sessions were waiting for instructions at 10:18 on November 2
  • Reporter used a single queue to view all eleven sessions simultaneously
  • 73% of minutes between 8 am and 6 pm had at least one unanswered agent

More from Saturday 7 November →