Skip to content

Commit 50f9772

Browse files
docs: standardize embedded Linux install guides
Rewrite the Raspberry Pi guide around the single install-script path and drop the broken Docker/Snap blocks (wrong env var names) and the outdated headless setup that relied on the pre-Bookworm wpa_supplicant.conf method. Standardize the verification step to an "Accept the device" section with the same wording across Buildroot, Yocto, and Raspberry Pi. Buildroot: create (not edit) the /etc/default/shellhub-agent env file to match the external tree README, drop the QEMU section, and link the repo. Yocto: fix the supported release (scarthgap is not in LAYERSERIES_COMPAT) to styhead/whinlatter/wrynose, and link the layer repo. Overview: frame the two paths (build into firmware vs install on a running OS) and add Raspberry Pi to the section.
1 parent 315b87e commit 50f9772

4 files changed

Lines changed: 30 additions & 110 deletions

File tree

ui/apps/docs/src/pages/embedded-linux/buildroot.mdx

Lines changed: 7 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -37,15 +37,17 @@ Select **ShellHub** under **External options** in the menuconfig interface.
3737

3838
### 3. Configure the agent
3939

40-
The external tree provides a root filesystem overlay for the agent's environment variables. Edit `../shellhub/rootfs_overlay/etc/default/shellhub-agent`:
40+
The external tree ships a root filesystem overlay for the agent's environment file. Create `rootfs_overlay/etc/default/shellhub-agent` in the external tree:
4141

4242
```bash
43+
$ cat > ../shellhub/rootfs_overlay/etc/default/shellhub-agent <<-EOF
4344
SERVER_ADDRESS="https://cloud.shellhub.io"
4445
TENANT_ID="<your-tenant-id-here>"
4546
PRIVATE_KEY="/etc/shellhub-agent.key"
47+
EOF
4648
```
4749

48-
The agent reads these variables at boot:
50+
The init script and systemd unit source this file and pass the variables to the agent at boot:
4951

5052
| Variable | Required | Description |
5153
|----------|:--------:|-------------|
@@ -61,29 +63,13 @@ $ make BR2_EXTERNAL=../shellhub rootfs-ext2
6163

6264
The resulting image includes the ShellHub agent, which starts automatically on boot.
6365

64-
## Testing with QEMU
66+
## Accept the device
6567

66-
Test your image locally before flashing by booting it with QEMU:
67-
68-
```bash
69-
$ qemu-system-x86_64 \
70-
-kernel output/images/bzImage \
71-
-drive file=output/images/rootfs.ext2,format=raw \
72-
-append "root=/dev/sda console=ttyS0" \
73-
-m 512M \
74-
-nographic \
75-
-netdev user,id=n0,hostfwd=tcp::2222-:22 \
76-
-device virtio-net-pci,netdev=n0
77-
```
78-
79-
The agent connects to the configured ShellHub server on startup, and the device appears in the dashboard.
80-
81-
## Verifying
82-
83-
After booting the image, the device appears in the ShellHub dashboard with **Pending** status. Click **Accept** to approve it.
68+
After booting the image, the device appears as **Pending** on the Devices page in the dashboard. Accept it to start connecting.
8469

8570
## Next steps
8671

8772
- [Embedded Linux Overview](/embedded-linux/overview) — Why embed the agent and how it works
8873
- [Yocto Project](/embedded-linux/yocto) — Alternative build system integration
8974
- [Agent Overview](/agent/overview) — Agent configuration reference
75+
- [shellhub-io/buildroot](https://github.com/shellhub-io/buildroot) — External tree source and README

ui/apps/docs/src/pages/embedded-linux/overview.mdx

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,10 @@ description: Integrate the ShellHub agent into embedded Linux firmware with Buil
66

77
# Embedded Linux
88

9-
ShellHub provides first-class support for embedded Linux platforms. Instead of installing the agent after deployment, you embed it directly into your firmware image — the agent starts automatically on boot and connects to ShellHub without manual setup on each device.
9+
ShellHub runs on embedded Linux platforms. There are two ways to get the agent onto a device:
10+
11+
- **Build it into your firmware** with [Buildroot](/embedded-linux/buildroot) or [Yocto](/embedded-linux/yocto). The agent is part of the rootfs and connects on first boot, with no per-device install step. This page covers that approach.
12+
- **Install it on a device already running an embedded OS** — for example a [Raspberry Pi](/embedded-linux/raspberry-pi) running Raspberry Pi OS — with the agent install script.
1013

1114
## Why embed the agent?
1215

@@ -50,7 +53,8 @@ The exact variable names differ by build system. See the [Buildroot](/embedded-l
5053

5154
## Next steps
5255

53-
- [Buildroot](/embedded-linux/buildroot) — BR2_EXTERNAL setup and QEMU testing
56+
- [Buildroot](/embedded-linux/buildroot) — BR2_EXTERNAL setup and configuration
5457
- [Yocto Project](/embedded-linux/yocto) — meta-shellhub layer configuration
58+
- [Raspberry Pi](/embedded-linux/raspberry-pi) — Install on a running Raspberry Pi OS
5559
- [Agent Overview](/agent/overview) — How the agent works under the hood
5660
- [Agent Development](/developers/agent-development) — Build the agent from source for custom platforms

ui/apps/docs/src/pages/embedded-linux/raspberry-pi.mdx

Lines changed: 13 additions & 84 deletions
Original file line numberDiff line numberDiff line change
@@ -6,120 +6,49 @@ description: Install the ShellHub agent on Raspberry Pi running Raspberry Pi OS
66

77
# Raspberry Pi
88

9-
Install the ShellHub agent on a Raspberry Pi running Raspberry Pi OS (Debian-based). Once installed, you can SSH into your Pi from anywhere through ShellHub — no port forwarding, no dynamic DNS, no VPN.
9+
Install the ShellHub agent on a Raspberry Pi running Raspberry Pi OS (Debian-based). Once installed, you can SSH into your Pi from anywhere through ShellHub — no port forwarding, no dynamic DNS, no VPN, even behind NAT or CGNAT.
1010

1111
## Prerequisites
1212

1313
- Raspberry Pi (any model: Zero, 3, 4, 5) running Raspberry Pi OS (32-bit or 64-bit)
1414
- Internet connection on the Pi
1515
- A ShellHub account with a namespace
1616

17-
## Install with the install script
17+
## Install the agent
1818

19-
The fastest way. SSH into your Pi (or open a terminal) and run:
19+
SSH into your Pi (or open a terminal) and run:
2020

2121
```bash
2222
$ curl -sSf "https://cloud.shellhub.io/install.sh?tenant_id=YOUR_TENANT_ID" | sh
2323
```
2424

25-
Replace `YOUR_TENANT_ID` with your namespace's tenant ID (found in the namespace selector or Settings page). The script detects your Pi's architecture (armhf or arm64) and installs the appropriate agent binary.
25+
Replace `YOUR_TENANT_ID` with your namespace's tenant ID. You can also copy this command with the tenant ID already filled in from **Add Device** in the dashboard.
26+
27+
The script auto-detects your Pi's architecture (`armv7l`/`aarch64`) and the best install method available. On a stock Raspberry Pi OS it installs the agent as a systemd service (`shellhub-agent`) that starts on boot and restarts on failure; if Docker or Podman is already present, it uses that instead. You don't need to pick a method or write a `docker run` command by hand.
2628

2729
For self-hosted ShellHub, replace the URL with your server address:
2830

2931
```bash
3032
$ curl -sSf "https://your-server.example.com/install.sh?tenant_id=YOUR_TENANT_ID" | sh
3133
```
3234

33-
After installation, the agent starts automatically and the Pi appears as **Pending** in the ShellHub dashboard. Accept it to start connecting.
34-
35-
## Install with Docker
36-
37-
If your Pi has Docker installed:
38-
39-
```bash
40-
$ docker run -d \
41-
--name shellhub-agent \
42-
--restart always \
43-
--privileged \
44-
--net host \
45-
--pid host \
46-
-v /:/host \
47-
-v /dev:/dev \
48-
-v /var/run/docker.sock:/var/run/docker.sock \
49-
-v /etc/shellhub:/etc/shellhub \
50-
-e SERVER_ADDRESS=https://cloud.shellhub.io \
51-
-e TENANT_ID=<your-tenant-id> \
52-
shellhubio/agent
53-
```
54-
55-
Replace `<your-tenant-id>` with your namespace's tenant ID (found in the namespace selector or Settings page).
56-
57-
See the [Docker guide](/agent/docker) for more options.
58-
59-
## Install with Snap
35+
## Accept the device
6036

61-
On Ubuntu-based Raspberry Pi OS or Ubuntu Server for Pi:
62-
63-
```bash
64-
$ sudo snap install shellhub-agent
65-
$ sudo snap set shellhub-agent server-address=https://cloud.shellhub.io
66-
$ sudo snap set shellhub-agent tenant-id=<your-tenant-id>
67-
$ sudo snap start shellhub-agent
68-
```
69-
70-
See the [Snap guide](/agent/snap) for details.
37+
Once the agent is running, the Pi appears as **Pending** on the Devices page in the dashboard. Accept it to start connecting.
7138

7239
## Connecting to your Pi
7340

74-
Once the agent is running and the device is accepted:
75-
76-
**Web terminal** — Click the terminal icon next to your Pi on the Devices page.
77-
78-
**Native SSH** — Use the SSHID:
41+
Once the device is accepted, connect through the web terminal or any native SSH client using its SSHID:
7942

8043
```bash
8144
$ ssh pi@mynamespace.raspberrypi@cloud.shellhub.io
8245
```
8346

84-
Replace `pi` with your Pi's username, `mynamespace` with your namespace, and `raspberrypi` with the device hostname shown in the dashboard.
85-
86-
## Headless setup
87-
88-
For Pis deployed without a monitor or keyboard, install the agent as part of your provisioning process:
89-
90-
1. Flash Raspberry Pi OS to an SD card
91-
2. Enable SSH on first boot (create an empty `ssh` file in the boot partition)
92-
3. Configure Wi-Fi if needed (`wpa_supplicant.conf` in boot partition)
93-
4. Boot the Pi and SSH in over your local network
94-
5. Run the install script
95-
6. Accept the device in ShellHub
47+
Replace `pi` with your Pi's username, `mynamespace` with your namespace, and `raspberrypi` with the device hostname. See [Connecting via SSH](/guides/connecting) for the full details.
9648

9749
From this point on, you can reach the Pi through ShellHub regardless of network changes — even if it moves to a different Wi-Fi network, gets a new IP, or goes behind a NAT.
9850

99-
## Embedded use cases
100-
101-
If you're building a custom Linux image for Raspberry Pi with Buildroot or Yocto, you can embed the agent directly into the firmware. See [Embedded Linux](/embedded-linux/overview) for build system integrations.
102-
103-
## Troubleshooting
104-
105-
**Agent not starting** — Check the agent logs:
106-
107-
```bash
108-
$ journalctl -u shellhub-agent -f
109-
```
110-
111-
Or for Docker:
112-
113-
```bash
114-
$ docker logs shellhub-agent
115-
```
116-
117-
**Device shows as offline** — Make sure the Pi has internet access and can reach your ShellHub server on port 443. Test with:
118-
119-
```bash
120-
$ curl -I https://cloud.shellhub.io
121-
```
122-
123-
**Wrong architecture** — The install script auto-detects architecture. If it fails, check with `uname -m`. Raspberry Pi OS 32-bit reports `armv7l`, 64-bit reports `aarch64`.
51+
## Next steps
12452

125-
**Permission denied after connecting** — The default user on Raspberry Pi OS is `pi` (older images) or your custom username (newer images). Make sure you're using the correct username in the SSHID.
53+
- [Connecting via SSH](/guides/connecting) — Web terminal and native SSH clients
54+
- [Agent Overview](/agent/overview) — How the agent works and its configuration

ui/apps/docs/src/pages/embedded-linux/yocto.mdx

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ Add the ShellHub agent to your Yocto-based Linux image using the meta-shellhub l
1010

1111
## Prerequisites
1212

13-
- Yocto Project (scarthgap or another supported release — the meta-shellhub branches map to Yocto releases)
13+
- A Yocto Project release supported by the layer (currently `styhead`, `whinlatter`, or `wrynose` — see `LAYERSERIES_COMPAT` in the layer)
1414
- Internet access to fetch the agent source during build
1515

1616
## Setup
@@ -55,12 +55,13 @@ $ bitbake your-image
5555

5656
The agent is included in the image and starts automatically on boot.
5757

58-
## Verifying
58+
## Accept the device
5959

60-
After booting the image, the device appears in the ShellHub dashboard with **Pending** status. Click **Accept** to approve it.
60+
After booting the image, the device appears as **Pending** on the Devices page in the dashboard. Accept it to start connecting.
6161

6262
## Next steps
6363

6464
- [Embedded Linux Overview](/embedded-linux/overview) — Why embed the agent and how it works
6565
- [Buildroot](/embedded-linux/buildroot) — Alternative build system integration
6666
- [Agent Overview](/agent/overview) — Agent configuration reference
67+
- [shellhub-io/meta-shellhub](https://github.com/shellhub-io/meta-shellhub) — Yocto layer source

0 commit comments

Comments
 (0)