Skip to main content

Raspberry Pi Setup

Connect your Raspberry Pi to noBGP and manage it through your AI assistant. This guide covers installation, configuration, and common Pi-specific use cases.

Why Connect Your Pi?

Once connected to noBGP, you can:

  • Manage remotely through your AI assistant (no SSH needed)
  • Access via browser terminal from anywhere in the world
  • Expose services running on your Pi (web servers, dashboards, etc.)
  • Integrate with other infrastructure in your noBGP networks
  • Monitor and troubleshoot through natural conversation

Prerequisites

Hardware Requirements

  • Raspberry Pi 3, 4, or 5 (recommended)
  • Raspberry Pi Zero 2 W (minimum)
  • 512MB RAM minimum (1GB+ recommended)
  • 4GB SD card minimum (8GB+ recommended)
  • Internet connectivity (Ethernet or WiFi)

Software Requirements

  • Raspberry Pi OS (32-bit or 64-bit)
  • Debian-based OS (Ubuntu, Raspbian, etc.)
  • Root/sudo access
  • Active internet connection
tip

The noBGP agent works on both 32-bit and 64-bit Raspberry Pi OS. The installer automatically detects your architecture.

Quick Installation

Step 1: Get Your Network Key

Get your network key from the web dashboard:

  1. Visit https://app.nobgp.com
  2. Sign in to your account
  3. Navigate to "Networks"
  4. Select an existing network or create a new one
  5. Copy the network key

Step 2: Install on Your Pi

SSH into your Raspberry Pi (or work directly on it), then run:

curl -sSL https://downloads.nobgp.com/agent/install.sh | sudo sh

This downloads and installs the noBGP agent.

Step 3: Configure the Agent

Configure the agent with your network key:

sudo nobgp config --key "YOUR_NETWORK_KEY" --name "raspberry-pi"

Replace:

  • YOUR_NETWORK_KEY with your actual network key
  • raspberry-pi with whatever you want to name your Pi (e.g., "living-room-pi", "home-server", etc.)

Step 4: Start the Service

Install and start the noBGP service:

sudo nobgp service install
sudo nobgp service start

Step 5: Verify Connection

Ask your AI assistant:

Show me my networks and nodes

You should see your Raspberry Pi listed as "online"!

Complete Setup Example

Here's a complete walkthrough from start to finish:

# On your Raspberry Pi

# 1. Install the agent
curl -sSL https://downloads.nobgp.com/agent/install.sh | sudo sh

# 2. Configure with your network key
sudo nobgp config --key "VSH8vKlciUXLyFcnKptFBoQmhYQvq4PqC3/l0FrG/qQ=" --name "home-pi"

# 3. Install and start the service
sudo nobgp service install
sudo nobgp service start

# 4. Check status
sudo nobgp service status

Expected output:

● nobgp.service - noBGP Agent
Loaded: loaded (/etc/systemd/system/nobgp.service; enabled)
Active: active (running) since Mon 2024-11-04 10:30:15 GMT

Verification

From Your Pi

Check the service status:

sudo nobgp service status

View logs:

sudo journalctl -u nobgp.service -f

From Your AI Assistant

Verify connectivity:

You: Show me my Raspberry Pi status

AI: Your Raspberry Pi "home-pi" is online.

- OS: Raspberry Pi OS (Debian 12)
- Architecture: arm64
- Connected to network: default
- Uptime: 2 hours, 34 minutes
- IP: 192.168.1.42

Common Pi Use Cases

1. Home Automation Hub

Access your Home Assistant, Pi-hole, or other dashboards from anywhere:

You: Publish the Home Assistant interface from my raspberry-pi

AI: ✓ Service published: https://ha123.nobgp.com (auth required)

You can now access your Home Assistant from anywhere!

2. Browser-Based Terminal

Get terminal access through your web browser:

You: Create a browser terminal for my raspberry-pi

AI: ✓ Terminal created: https://term456.nobgp.com

Open this URL to access your Pi's terminal from any browser.

3. Remote Monitoring

Check system stats through conversation:

You: What's the CPU temperature on my Pi?

AI: Current temperature: 45.2°C

Temperature is normal. The Pi is running cool.

You: What about disk space?

AI: Disk usage: 3.2GB / 32GB (10%)

Plenty of space available.

4. Software Updates

Keep your Pi updated:

You: Update all packages on my raspberry-pi

AI: I'll update the package list and upgrade installed packages.

[Runs apt update && apt upgrade]

Updated 23 packages. System is up to date.
A reboot is recommended. Should I reboot the Pi?

You: Yes, reboot it

AI: [Reboots Pi]
✓ Reboot initiated

5. Media Server Management

Manage Plex, Jellyfin, or other media servers:

You: Check if Plex is running on my raspberry-pi

AI: Plex Media Server is running (PID: 1234)
Using 15% CPU, 320MB RAM

6. IoT Projects

Run scripts and manage GPIO:

You: Run my LED blink script on the Pi

AI: [Executes script]
✓ Script running. LED is blinking every 2 seconds.

Configuration Tips for Pi

Optimize for Limited Resources

If you have a Pi Zero or older model with limited RAM, use these settings:

sudo nobgp config --compress true --log-level warning

This reduces memory usage and logging overhead.

WiFi Considerations

For WiFi-connected Pis, you might want to increase the ping interval to reduce network usage:

sudo nobgp config --ping-interval 120s

Static Node Name

Always give your Pi a descriptive name:

# Good names:
sudo nobgp config --name "living-room-pi"
sudo nobgp config --name "garage-camera"
sudo nobgp config --name "home-server"

# Less good (not descriptive):
sudo nobgp config --name "pi1"
sudo nobgp config --name "rpi"

Running on Pi OS Lite

If you're using Raspberry Pi OS Lite (no desktop), the agent works perfectly:

  1. Install as normal
  2. All management happens remotely through your AI assistant
  3. Use browser terminals for command-line access
  4. No need for SSH once noBGP is set up

Multiple Pis in One Network

You can connect multiple Raspberry Pis to the same network:

# On Pi #1
sudo nobgp config --key "NETWORK_KEY" --name "bedroom-pi"

# On Pi #2
sudo nobgp config --key "NETWORK_KEY" --name "kitchen-pi"

# On Pi #3
sudo nobgp config --key "NETWORK_KEY" --name "garage-pi"

Then manage them all through your AI assistant:

You: Show me all my Raspberry Pis

AI: You have 3 Raspberry Pis online:
- bedroom-pi (online)
- kitchen-pi (online)
- garage-pi (online)

You: Check disk space on all of them

AI: Disk usage:
- bedroom-pi: 12% (2.1GB / 16GB)
- kitchen-pi: 45% (7.2GB / 16GB)
- garage-pi: 8% (1.3GB / 16GB)

Project Ideas

Home Lab

Build a Pi cluster:

You: I want to set up a 3-node Kubernetes cluster on my Pis

AI: Great! I'll help you set up Kubernetes on your three Pis.
[Walks through installation and configuration]

Network-Wide Pi-hole

DNS filtering for your whole network:

You: Install Pi-hole on my raspberry-pi and publish the admin interface

AI: [Installs Pi-hole]
[Publishes admin dashboard]
✓ Pi-hole is now running
✓ Admin dashboard: https://pihole789.nobgp.com

Security Camera System

Manage motion detection cameras:

You: Check if motion is running on my garage-pi

AI: Motion is running and has detected 3 events today.
Latest event: 2 hours ago

You: Show me the most recent camera image

AI: [Retrieves latest image]
[Shows timestamp and thumbnail]

Weather Station

Monitor environmental sensors:

You: Run my weather station script and show me current conditions

AI: [Executes script]

Current conditions:
Temperature: 72°F (22°C)
Humidity: 45%
Pressure: 1013 hPa

Troubleshooting Pi-Specific Issues

Agent Won't Start on Pi Zero

Issue: Limited resources on Pi Zero W

Solution:

# Use minimal config
sudo nobgp config --log-level error --compress true

# Increase swap if needed
sudo dphys-swapfile swapoff
sudo nano /etc/dphys-swapfile # Set CONF_SWAPSIZE=512
sudo dphys-swapfile setup
sudo dphys-swapfile swapon

WiFi Disconnects

Issue: Pi loses connection on WiFi

Solutions:

  • Disable WiFi power management:
    sudo iwconfig wlan0 power off
  • Add to /etc/rc.local:
    /sbin/iwconfig wlan0 power off
  • Consider using Ethernet if possible

SD Card Running Out of Space

Issue: Limited SD card space

Solutions:

You: My Pi is running out of space, help me clean it up

AI: I'll check what's using space...

Largest directories:
1. /var/log - 2.1GB
2. /var/cache - 800MB

Should I clean old logs and cached packages?

You: Yes

AI: [Cleans up space]
✓ Freed 2.8GB

Can't Access Pi After Setup

Issue: Pi not showing as online

Solutions:

  1. Check Pi is connected to internet
  2. Verify network key is correct:
    cat /etc/nobgp/agent.yml
  3. Check service status:
    sudo nobgp service status
  4. View logs for errors:
    sudo journalctl -u nobgp.service -n 50

Performance Considerations

Pi Model Recommendations

ModelUse CaseNotes
Pi Zero WLight monitoring, simple sensorsMinimal resources
Pi Zero 2 WBasic home automationAdequate for most uses
Pi 3Home servers, media centersGood all-around
Pi 4 (2GB)Docker containers, multi-serviceRecommended
Pi 4 (4GB+)Heavy workloads, databasesBest performance
Pi 5All use casesLatest and fastest

Resource Usage

Typical noBGP agent resource usage on a Pi:

  • CPU: < 1% idle, 2-5% during operations
  • RAM: 20-40MB
  • Storage: ~50MB for agent binary and config
  • Network: Minimal (ping every 58s, command traffic as needed)

Advanced Configuration

Custom Router

Enterprise Feature

Custom routers are available for enterprise deployments only. Contact sales@nobgp.com for more information.

For enterprise deployments with custom routers:

sudo nobgp config --router "wss://custom-router.example.com"

Environment Variables

For Docker or custom setups:

export NOBGP_NETWORK_KEY="your_key"
export NOBGP_NODE_NAME="docker-pi"
export NOBGP_LOG_LEVEL="info"

sudo -E nobgp agent

Headless Auto-Setup

For completely automated setups (provisioning scripts):

#!/bin/bash
curl -sSL https://downloads.nobgp.com/agent/install.sh | sudo sh
sudo nobgp config --key "$NETWORK_KEY" --name "auto-pi-$(hostname)"
sudo nobgp service install
sudo nobgp service start

Uninstallation

To remove noBGP from your Pi:

# Stop and uninstall service
sudo nobgp service stop
sudo nobgp service uninstall

# Remove package (Raspberry Pi OS / Debian)
sudo apt remove nobgp

# Remove configuration
sudo rm -rf /etc/nobgp/

Next Steps

Community Resources

FAQ

Q: Does noBGP work on Raspberry Pi 1 or 2? A: The Pi 1 is not supported. Pi 2 may work but is not officially tested.

Q: Can I use noBGP with Ubuntu on my Pi? A: Yes! Ubuntu for Raspberry Pi is fully supported.

Q: Will noBGP slow down my Pi? A: No. The agent has minimal resource usage (< 1% CPU, ~30MB RAM).

Q: Can I use GPIO pins while noBGP is running? A: Yes! noBGP doesn't interfere with GPIO or any hardware features.

Q: Do I need to keep SSH enabled? A: No. Once noBGP is set up, you can disable SSH and use browser terminals instead.

Q: Can I run noBGP on a Pi with Docker? A: Yes, though you'll need specific Docker capabilities. See the agent installation guide.