Installation¶
GreenThumb can be deployed in two ways: using the GreenthumbOS image (recommended for production) or by installing manually on an existing Raspberry Pi OS.
Option A — GreenthumbOS Image (Recommended)¶
Planned for v1
GreenthumbOS is a pre-configured Raspberry Pi OS image with Docker, all system packages, and pre-pulled Docker images baked in. See rasp5/resources/greenthumbos-plan.md for the full specification.
- Flash the GreenthumbOS image onto a ≥32 GB SD card using Balena Etcher or rpi-imager.
- Mount the boot partition. Edit
/boot/greenthumb.env: - Edit
/boot/wpa_supplicant.confwith your WiFi credentials (or use rpi-imager's Advanced Options). - Insert SD card, power on Pi. Wait ~90 s for first-boot setup.
- SSH in and run:
That's it. No further configuration is required for a standard single-camera, single-sensor setup.
Option B — Manual Installation¶
Prerequisites¶
- Raspberry Pi 5 (4 GB+ RAM recommended)
- Raspberry Pi OS Lite 64-bit (Bookworm)
- ≥32 GB SD card
- Docker CE + Docker Compose plugin installed
- I2C and Camera interfaces enabled
1. Enable Hardware Interfaces¶
sudo raspi-config
# Interface Options → I2C → Enable
# Interface Options → Camera → Enable
sudo reboot
Verify I2C:
2. Connect Hardware¶
Sensors (I2C bus)¶
| Sensor | I2C Address | Measurements |
|---|---|---|
| AHT10 | 0x38 | Temperature, Humidity |
| BMP280 | 0x76 | Pressure, Temperature |
| TSL2561 | 0x39 | Light Intensity |
Actuators (GPIO)¶
| Actuator | GPIO Pins | Purpose |
|---|---|---|
| RGB LED | 17, 27, 22 (R, G, B) | Grow lighting |
| Water Pump | 18 | Irrigation |
Camera¶
Connect a USB camera to any USB port (appears as /dev/video0).
3. Install Docker¶
4. Clone the Repository¶
5. Configure Environment¶
Minimum required variables:
See Configuration for all variables.
6. Provision the Device in the Cloud¶
Before the Pi can sync, you must register it in the cloud admin dashboard:
- Log in to the cloud admin dashboard.
- Navigate to Devices → New Device — fill in name and location.
- Click Rotate Token next to the new device — copy the generated token.
- Paste it into
DEVICE_TOKENin the Pi's.env.
7. Start Services¶
This starts: db, api, controller, local-dashboard, watchtower.
8. Verify Installation¶
# Check running containers
docker compose ps
# Follow logs
make logs
# Test API
curl http://localhost:8080/state/
# Open local dashboard
# Navigate to http://<pi-ip> in your browser
Cloud Deployment¶
The cloud stack lives in cloud/. See Local Setup for development, or the cloud/k8s/ directory for Kubernetes manifests.
cd cloud
cp .env.example .env
docker compose up --build
# Admin dashboard: http://localhost:3000
# API docs: http://localhost:8000/docs
Next Steps¶
- Configuration — Full environment variable reference
- Quick Start — Start collecting data
- Tailscale Setup — Enable remote access