Deployment
Deploying SelenaCore on Raspberry Pi
Deploying SelenaCore on Raspberry Pi
Supported Platforms
| Device | Support | Recommended |
|---|---|---|
| Raspberry Pi 5 (8 GB) | ✅ Full | Yes — including LLM |
| Raspberry Pi 5 (4 GB) | ✅ Full | Yes |
| Raspberry Pi 4 (4/8 GB) | ✅ Full | Without LLM |
| Raspberry Pi 4 (2 GB) | ⚠️ Limited | LLM disabled |
| Debian x86-64 / ARM | ✅ | Yes |
System Preparation
1. Operating System
Recommended: Raspberry Pi OS 64-bit Lite or Debian 12 Bookworm.
sudo apt update && sudo apt upgrade -y
sudo apt install -y python3.11 python3.11-venv python3-pip \
git curl wget sqlite3 ffmpeg alsa-utils pulseaudio \
iptables iptables-persistent avahi-daemon avahi-utils \
bluetooth bluez bluez-tools
2. Docker
curl -fsSL https://get.docker.com | sh
sudo usermod -aG docker $USER
docker run --rm hello-world
3. Clone the Repository
sudo mkdir -p /opt/selena-core
sudo chown $USER:$USER /opt/selena-core
cd /opt/selena-core
git clone https://github.com/dotradepro/SelenaCore.git .
Configuration
cp .env.example .env
nano .env
Minimum settings: CORE_PORT=7070, UI_PORT=80, CORE_DATA_DIR=/var/lib/selena, CORE_SECURE_DIR=/secure.
Launch
Docker Compose (Recommended)
docker compose up -d
docker compose logs -f core
curl http://localhost:7070/api/v1/health
Systemd (Without Docker)
sudo cp smarthome-core.service /etc/systemd/system/
sudo cp smarthome-agent.service /etc/systemd/system/
sudo systemctl daemon-reload
sudo systemctl enable smarthome-core smarthome-agent
sudo systemctl start smarthome-core
Onboarding Wizard
Steps: wifi → language → device_name → timezone → stt_model → tts_voice → admin_user → platform → import.
Audio
Auto-detection of ALSA cards. Supports USB microphone, I2S (INMP441), Bluetooth speaker. Force selection via AUDIO_FORCE_INPUT / AUDIO_FORCE_OUTPUT in .env.
Firewall (iptables)
sudo bash scripts/setup_iptables.sh
# Or manually:
sudo iptables -A INPUT -i lo -j ACCEPT
sudo iptables -A INPUT -p tcp --dport 80 -j ACCEPT # UI
sudo iptables -A INPUT -p tcp --dport 7070 -j DROP # Core API — localhost only
sudo iptables -A INPUT -p tcp --dport 22 -j ACCEPT # SSH
sudo netfilter-persistent save
Backup
Local: POST /api/v1/backup/local with destination path.
Cloud: POST /api/v1/backup/cloud — data encrypted E2E (PBKDF2 + AES-256-GCM).
Monitoring
curl http://localhost:7070/api/v1/system/info
curl http://localhost:7070/api/v1/integrity/status
curl http://localhost:7070/api/v1/system/hardware