Get the Edge Server

The Write API and the outlet and Controller reads run on the Growbud Edge Server. Install it on a computer on your site. It keeps working when the internet is down.

Calls to the Edge Server are free. API costs apply to Growbud Cloud only.

Install on Linux or macOS: version 5.3.10

BASH
curl -fsSL https://growbud.io/edge/install.sh | sudo bash

Run it on the Edge Server computer. Run it again to upgrade. For Windows, the files, the SHA-256 and the signature, go to Download Edge Server.

1. Check the computer

ItemNeed
CPU4 cores, x86-64 or ARM64
Memory for Docker16 GB (8 GB for a test)
Free disk100 GB SSD (20 GB for a test)
SoftwareDocker Engine 24+ with Compose v2, or Docker Desktop 4.30+
NetworkA fixed IP address on your LAN

2. Install

Run the command above. The installer:

  1. Downloads the latest release and checks its SHA-256 and signature.
  2. Installs it in /opt/growbud-edge.
  3. Starts the Edge Server and shows its address, for example https://192.168.1.27:8443.
  4. Shows the administrator email and password one time. Write them down.

3. Make an API token

On the Edge Server computer, make a token for the administrator. Add --scope control to let the token switch equipment:

cd /opt/growbud-edge
sudo docker compose exec outlets node /app/edge-outlets.mjs token create \
  --email <administrator email> --name "My integration" --scope control

The command shows the token one time only. See Authentication for read-only tokens, expiry and revoking.

4. Send your first call

Add your outlets and Controllers in the Growbud app first. Then:

export TOKEN=eyJ...
export EDGE=https://192.168.1.27:8443

# Your outlets
curl -sk -H "Authorization: Bearer $TOKEN" "$EDGE/sensing/v1/outlets"

# Switch an outlet on, and wait up to 30 s for it to confirm
curl -sk -X POST -H "Authorization: Bearer $TOKEN" -H 'Content-Type: application/json' \
  -d '{"on": true}' "$EDGE/control/v1/outlets/f50be8ffff9ddd81/switch?wait=30"

The Edge Server uses a self-signed certificate. curl -k accepts it.

Upgrade

Run the install command again on the Edge Server computer:

curl -fsSL https://growbud.io/edge/install.sh | sudo bash

The installer:

  1. Downloads the latest release and checks its SHA-256 and signature.
  2. Saves both databases and the settings file (.env) in /opt/growbud-edge/backups/. If the backup fails, it stops and changes nothing.
  3. Keeps your settings, data, devices and API tokens.
  4. Starts the new version and updates the database.

Outlets and Controllers stop for a short time while the Edge Server restarts. They do not have to join again.

To see the version that runs now:

cat /opt/growbud-edge/VERSION

To go back to the previous version, use the backup. See the README in /opt/growbud-edge, section 8. Data that the Edge Server wrote after the upgrade is lost.

Next