Skip to main content
Version: 1.0.0

Installation

This guide covers installing TwinEdge Edge software on your edge devices for local data collection and processing.

Supported Hardware

DeviceRAMStorageUse Case
Raspberry Pi 4/54GB+32GB+Small deployments
Intel NUC8GB+128GB+Medium deployments
Jetson Nano4GB+64GB+ML inference
Industrial PC8GB+256GB+Large deployments

Operating Systems

  • Raspberry Pi OS (64-bit, Bookworm or later)
  • Ubuntu Server 22.04 LTS or later
  • Debian 12 or later

Installation Methods

The fastest way to install TwinEdge Edge:

curl -fsSL https://get.twinedgeai.com | sudo bash

This will:

  1. Install Docker and Docker Compose
  2. Pull the latest TwinEdge Edge images
  3. Configure the systemd service
  4. Start all services

Method 2: Manual Installation

Step 1: Install Docker

# Update system
sudo apt update && sudo apt upgrade -y

# Install Docker
curl -fsSL https://get.docker.com | sudo sh
sudo usermod -aG docker $USER

# Install Docker Compose
sudo apt install docker-compose-plugin -y

Step 2: Create Installation Directory

sudo mkdir -p /opt/twinedge
cd /opt/twinedge

Step 3: Download Configuration

sudo curl -fsSL https://raw.githubusercontent.com/twinedge/edge/main/docker-compose.yml -o docker-compose.yml
sudo curl -fsSL https://raw.githubusercontent.com/twinedge/edge/main/.env.example -o .env

Step 4: Configure Environment

Edit the .env file:

sudo nano .env

Required settings:

# Cloud Connection
TWINEDGE_CLOUD_URL=https://api.twinedgeai.com
TWINEDGE_API_KEY=your-api-key-here
TWINEDGE_ORG_ID=your-org-id

# Device Identity
DEVICE_NAME=factory-floor-edge-1
DEVICE_LOCATION=Building A

# Deployment Mode
DEPLOYMENT_MODE=production

Step 5: Start Services

sudo docker compose up -d

Method 3: SD Card Image (Raspberry Pi)

For Raspberry Pi, you can flash a pre-configured image:

  1. Download the TwinEdge Edge Image
  2. Flash to SD card using Raspberry Pi Imager
  3. Configure WiFi and hostname in Imager settings
  4. Insert SD card and boot

Cloud Registration

After installation, register your device with TwinEdge Cloud:

  1. In TwinEdge Cloud, go to FleetEnroll Device
  2. Select your device type
  3. A QR code and enrollment token will be displayed
  4. On the edge device, run:
twinedge enroll --token YOUR_TOKEN

Option B: Automatic Registration

If you configured the API key in .env, the device will auto-register on first connection.

Verify Installation

Check that all services are running:

docker compose ps

Expected services:

  • opcua-server - Protocol gateway
  • ml-inference - ML model execution
  • storage-service - Local data storage
  • dashboard - Local web UI

Access the local dashboard at http://YOUR_DEVICE_IP:3000

Post-Installation

Configure Data Sources

Connect your industrial protocols:

  1. Access local dashboard at http://YOUR_DEVICE_IP:3000
  2. Go to SettingsData Sources
  3. Add OPC UA, Modbus, or other protocol connections

Enable Cloud Sync

Ensure telemetry flows to the cloud:

  1. Verify internet connectivity
  2. Check MQTT connection status in dashboard
  3. View device in TwinEdge Cloud fleet view

Troubleshooting

Services Won't Start

# Check logs
docker compose logs -f

# Restart all services
docker compose restart

No Cloud Connection

  1. Verify API key in .env
  2. Check network/firewall settings
  3. Ensure port 8883 (MQTT) is open outbound

Memory Issues (Raspberry Pi)

# Check memory usage
docker stats

# Reduce memory if needed
# Edit docker-compose.yml to lower memory limits

Uninstallation

To remove TwinEdge Edge:

cd /opt/twinedge
sudo docker compose down -v
sudo rm -rf /opt/twinedge

Next Steps