Installation
This guide covers installing TwinEdge Edge software on your edge devices for local data collection and processing.
Supported Hardware
Recommended Devices
| Device | RAM | Storage | Use Case |
|---|---|---|---|
| Raspberry Pi 4/5 | 4GB+ | 32GB+ | Small deployments |
| Intel NUC | 8GB+ | 128GB+ | Medium deployments |
| Jetson Nano | 4GB+ | 64GB+ | ML inference |
| Industrial PC | 8GB+ | 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
Method 1: One-Line Installer (Recommended)
The fastest way to install TwinEdge Edge:
curl -fsSL https://get.twinedgeai.com | sudo bash
This will:
- Install Docker and Docker Compose
- Pull the latest TwinEdge Edge images
- Configure the systemd service
- 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:
- Download the TwinEdge Edge Image
- Flash to SD card using Raspberry Pi Imager
- Configure WiFi and hostname in Imager settings
- Insert SD card and boot
Cloud Registration
After installation, register your device with TwinEdge Cloud:
Option A: QR Code (Recommended)
- In TwinEdge Cloud, go to Fleet → Enroll Device
- Select your device type
- A QR code and enrollment token will be displayed
- 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 gatewayml-inference- ML model executionstorage-service- Local data storagedashboard- Local web UI
Access the local dashboard at http://YOUR_DEVICE_IP:3000
Post-Installation
Configure Data Sources
Connect your industrial protocols:
- Access local dashboard at
http://YOUR_DEVICE_IP:3000 - Go to Settings → Data Sources
- Add OPC UA, Modbus, or other protocol connections
Enable Cloud Sync
Ensure telemetry flows to the cloud:
- Verify internet connectivity
- Check MQTT connection status in dashboard
- 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
- Verify API key in
.env - Check network/firewall settings
- 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
- Connect Protocols - Configure OPC UA, Modbus, etc.
- Local Dashboard - Use the on-device UI
- OTA Updates - Keep your device updated