Installation Guide
Detailed instructions for installing TheiaCast on various platforms
Table of Contents
System Requirements
Server Requirements
| Component | Minimum | Recommended |
|---|---|---|
| CPU | 2 cores | 4 cores |
| RAM | 2 GB | 4 GB |
| Storage | 10 GB | 50+ GB (depending on content) |
| OS | Linux, Windows, macOS | Linux (Ubuntu 22.04 LTS) |
| Network | 100 Mbps | 1 Gbps |
| Software | Docker & Docker Compose | Docker & Docker Compose |
Display Device Requirements
Windows Client
| Component | Minimum | Recommended |
|---|---|---|
| CPU | Intel Core i3 or equivalent | Intel Core i5 or better |
| RAM | 2 GB | 4 GB |
| Storage | 5 GB | 10 GB |
| OS | Windows 10 | Windows 11 |
| Network | Stable connection to server | Wired Ethernet |
Raspberry Pi Client
| Component | Minimum | Recommended |
|---|---|---|
| Model | Raspberry Pi 3B+ | Raspberry Pi 4 (4GB RAM) |
| Storage | 16 GB microSD | 32 GB microSD (Class 10) |
| OS | Raspberry Pi OS Lite | Raspberry Pi OS (64-bit) |
| Network | Wi-Fi | Wired Ethernet |
Server Installation
Docker Installation (Recommended)
Docker provides the easiest and most reliable installation method.
Step 1: Install Docker
On Ubuntu/Debian:
# Update package index sudo apt update # Install prerequisites sudo apt install -y apt-transport-https ca-certificates curl software-properties-common # Add Docker's official GPG key curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg # Add Docker repository echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null # Install Docker sudo apt update sudo apt install -y docker-ce docker-ce-cli containerd.io docker-compose-plugin # Add your user to docker group sudo usermod -aG docker $USER # Log out and back in for group changes to take effect
On Windows:
- Download Docker Desktop from https://www.docker.com/products/docker-desktop
- Run the installer
- Restart your computer
- Launch Docker Desktop
On macOS:
- Download Docker Desktop from https://www.docker.com/products/docker-desktop
- Drag Docker.app to Applications
- Launch Docker from Applications
Step 2: Verify Docker Installation
docker --version docker compose version
You should see version numbers for both commands.
Step 3: Create TheiaCast Directory Structure
mkdir -p ~/theiacast cd ~/theiacast mkdir -p ssl-certs # For optional SSL certificates
Step 4: Create docker-compose.yml
Create a file named docker-compose.yml with the following content:
services:
postgres:
image: postgres:15-alpine
container_name: theiacast-postgres
environment:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-postgres}
POSTGRES_DB: theiacast
volumes:
- postgres_data:/var/lib/postgresql/data
ports:
- "5432:5432"
healthcheck:
test: ["CMD-SHELL", "pg_isready -U postgres -d theiacast"]
interval: 5s
timeout: 5s
retries: 5
start_period: 10s
restart: unless-stopped
backend:
image: ghcr.io/jimmyeao/theiacast-backend:latest
container_name: theiacast-backend
environment:
- ConnectionStrings__Default=Host=postgres;Port=5432;Database=theiacast;Username=postgres;Password=${POSTGRES_PASSWORD:-postgres}
- ASPNETCORE_ENVIRONMENT=Production
- Jwt__Secret=${JWT_SECRET:-dev-secret-key}
- BASE_URL=http://backend:8080
ports:
- "5001:8080"
depends_on:
postgres:
condition: service_healthy
volumes:
- theiacast_media:/app/wwwroot
restart: unless-stopped
frontend:
image: ghcr.io/jimmyeao/theiacast-frontend:latest
container_name: theiacast-frontend
ports:
- "${HTTP_PORT:-80}:80"
- "${HTTPS_PORT:-443}:443"
volumes:
- ${SSL_CERT_PATH:-./ssl-certs}:/etc/nginx/ssl:ro
depends_on:
- backend
restart: unless-stopped
volumes:
postgres_data:
theiacast_media:Step 5: Create Environment File (.env)
Create a .env file in the same directory:
# PostgreSQL password POSTGRES_PASSWORD=YourSecurePassword123! # JWT secret (minimum 32 characters) JWT_SECRET=your-very-long-and-secure-secret-key-here-32-chars-minimum # Optional: Custom ports # HTTP_PORT=80 # HTTPS_PORT=443 # Optional: Custom SSL certificate path # SSL_CERT_PATH=./ssl-certs
Important Security Notes:
- Replace
YourSecurePassword123!with a strong, unique password - Replace the JWT_SECRET with a long, random string (32+ characters)
- Keep this file secure and never commit it to version control
Step 6: Start TheiaCast
sudo docker compose up -d
This command will:
- Download the required Docker images (first time only)
- Create and start all containers
- Set up the database
- Configure networking
Step 7: Verify Installation
Check that all containers are running:
sudo docker compose ps
You should see three containers (postgres, backend, frontend) with status "Up".
Check the logs:
# View all logs sudo docker compose logs # Follow backend logs sudo docker compose logs -f backend # Follow frontend logs sudo docker compose logs -f frontend
Step 8: Access the Dashboard
Open your web browser and navigate to:
- HTTP:
http://localhostorhttp://your-server-ip - HTTPS:
https://localhostorhttps://your-server-ip(if SSL configured)
First Login:
- Click "Register" (if shown) or use default credentials
- Create an admin account
- The first user becomes the administrator
Client Installation
Windows Client
The Windows installer provides an interactive setup that configures everything automatically.
Step 1: Register Device in Dashboard
- Open the TheiaCast web dashboard
- Navigate to "Devices"
- Click "+ Add Device"
- Enter a device name (e.g., "Reception Display")
- Enter a unique device ID (e.g., "reception-01")
- Click "Create"
- Copy the device token from the popup - you'll need this during installation
Step 2: Download and Run Installer
- Download the installer from our CDN
- Run the installer as Administrator
- When prompted, enter:
- Server URL: http://your-server-ip:5001
- Device ID: The device ID you created (e.g., "reception-01")
- Device Token: The token you copied from the dashboard
- The installer will automatically install and start the client as a Windows service
Note: The installer handles all configuration automatically. You do not need to manually edit any files or install the service using PowerShell.
Step 3: Verify Connection
- Return to the TheiaCast web dashboard
- Go to "Devices"
- Your device should show "Online" with a green indicator
- If not online, check the service status in Windows Services or view logs in Event Viewer
Raspberry Pi Client
The automated installer script handles all dependencies, configuration, and service setup.
Step 1: Prepare Raspberry Pi
1. Install Raspberry Pi OS:
- Download Raspberry Pi Imager: https://www.raspberrypi.com/software/
- Flash Raspberry Pi OS (64-bit recommended) to microSD card
- Boot the Raspberry Pi and complete initial setup
2. Update system:
sudo apt update sudo apt upgrade -y
Step 2: Register Device in Dashboard
- Open the TheiaCast web dashboard on another computer
- Navigate to "Devices"
- Click "+ Add Device"
- Enter a device name (e.g., "Lobby Display")
- Enter a unique device ID (e.g., "lobby-pi-01")
- Click "Create"
- Copy the device token from the popup - you'll need this during installation
Step 3: Run Automated Installer
Run the following command on your Raspberry Pi. The installer will automatically detect your system, install all required dependencies (Node.js, Chromium, etc.), and configure the client.
curl -sSL https://gist.githubusercontent.com/jimmyeao/9a6922cdf1c69da92f1be9c7e3463052/raw/install-theiacast-client.sh | bash
During installation, you will be prompted to enter:
- Server URL: http://your-server-ip:5001
- Device ID: The device ID you created in the dashboard
- Device Token: The token you copied from the dashboard
Note: The installer script handles everything automatically including:
- Installing Node.js and other dependencies
- Downloading and installing the TheiaCast client
- Creating the configuration file
- Setting up the systemd service
- Starting the client automatically
Step 4: Verify Connection
- Check the service status:
sudo systemctl status theiacast-client
- Return to the TheiaCast web dashboard
- Go to "Devices"
- Your device should show "Online" with a green indicator
View logs if needed:
# View recent logs sudo journalctl -u theiacast-client -n 50 # Follow live logs sudo journalctl -u theiacast-client -f
Post-Installation
SSL Certificate Setup (Optional)
For HTTPS access, you need SSL certificates.
Option 1: Self-Signed Certificate (Testing)
cd ~/theiacast/ssl-certs openssl req -x509 -nodes -days 365 -newkey rsa:2048 \ -keyout key.pem -out cert.pem \ -subj "/CN=localhost"
Option 2: Let's Encrypt (Production)
# Install certbot sudo apt install certbot python3-certbot-nginx # Obtain certificate sudo certbot --nginx -d yourdomain.com # Certificates will be in /etc/letsencrypt/live/yourdomain.com/ # Copy to TheiaCast directory sudo cp /etc/letsencrypt/live/yourdomain.com/fullchain.pem ~/theiacast/ssl-certs/cert.pem sudo cp /etc/letsencrypt/live/yourdomain.com/privkey.pem ~/theiacast/ssl-certs/key.pem sudo chown $USER:$USER ~/theiacast/ssl-certs/*.pem
Restart frontend:
cd ~/theiacast docker-compose restart frontend
Firewall Configuration
If you're using a firewall, open the required ports:
# Ubuntu/Debian with ufw sudo ufw allow 80/tcp # HTTP sudo ufw allow 443/tcp # HTTPS sudo ufw allow 5001/tcp # Backend API # Or with firewalld (CentOS/RHEL) sudo firewall-cmd --permanent --add-port=80/tcp sudo firewall-cmd --permanent --add-port=443/tcp sudo firewall-cmd --permanent --add-port=5001/tcp sudo firewall-cmd --reload
Backup Configuration
Set up regular backups of your data:
#!/bin/bash # backup-theiacast.sh BACKUP_DIR="/backup/theiacast" DATE=$(date +%Y%m%d_%H%M%S) mkdir -p $BACKUP_DIR # Backup database docker exec theiacast-postgres pg_dump -U postgres theiacast > $BACKUP_DIR/db_$DATE.sql # Backup media files docker run --rm -v theiacast_media:/data -v $BACKUP_DIR:/backup alpine tar czf /backup/media_$DATE.tar.gz -C /data . # Keep only last 7 days find $BACKUP_DIR -name "*.sql" -mtime +7 -delete find $BACKUP_DIR -name "*.tar.gz" -mtime +7 -delete
Make it executable and add to cron:
chmod +x backup-theiacast.sh crontab -e # Add: 0 2 * * * /path/to/backup-theiacast.sh
Troubleshooting
Server Issues
Containers won't start:
# Check logs docker compose logs # Check specific service docker compose logs backend # Restart all services docker-compose restart
Database connection errors:
# Check PostgreSQL is running docker-compose ps postgres # Check database logs docker compose logs postgres # Reset database (WARNING: Deletes all data) docker-compose down -v docker-compose up -d
Port conflicts:
# Check what's using port 80 sudo lsof -i :80 # Change port in .env file echo "HTTP_PORT=8080" >> .env docker-compose up -d
Client Issues
Windows client won't start:
- Check Windows Event Viewer for errors
- Verify service is running in Windows Services
- Check firewall allows outbound connections
- Verify server URL is accessible:
curl http://your-server:5001/health
Raspberry Pi client crashes:
# Check logs sudo journalctl -u theiacast-client -n 100 # Check system resources htop # Increase memory (edit /boot/config.txt) gpu_mem=256 # Restart sudo reboot
Device shows offline:
- Check network connectivity:
ping your-server-ip - Verify device token is correct
- Check client logs for connection errors
- Verify firewall allows WebSocket connections (port 5001)
Common Issues
See the FAQ for more troubleshooting tips.
Next Steps
- User Guide - Learn how to use all features
- Administrator Guide - Advanced configuration
- FAQ - Common questions and solutions
Need Help?
Need technical support? Visit our Contact page or email [email protected]