#!/bin/bash # ============================================================ # EEG Portal - Hetzner Server Setup Script # Run this on a fresh Debian/Ubuntu server # ============================================================ set -e echo "=== Hetzner Server Setup for EEG Portal ===" echo "" # Update system echo "Updating system packages..." apt update && apt upgrade -y # Install Docker echo "Installing Docker..." apt install -y ca-certificates curl gnupg install -m 0755 -d /etc/apt/keyrings curl -fsSL https://download.docker.com/linux/debian/gpg | gpg --dearmor -o /etc/apt/keyrings/docker.gpg chmod a+r /etc/apt/keyrings/docker.gpg echo "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/debian $(. /etc/os-release && echo "$VERSION_CODENAME") stable" | tee /etc/apt/sources.list.d/docker.list > /dev/null apt update apt install -y docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin # Enable Docker systemctl enable docker systemctl start docker # Install Git echo "Installing Git..." apt install -y git # Install Certbot for SSL echo "Installing Certbot..." apt install -y certbot echo "" echo "=== Server setup complete! ===" echo "" echo "Next steps:" echo " 1. Clone your repository:" echo " git clone " echo " cd eeg_portal" echo "" echo " 2. Create .env file:" echo " cp .env.example .env" echo " nano .env" echo "" echo " 3. Start the application:" echo " bash deploy.sh" echo "" echo " 4. For SSL (after DNS is configured):" echo " certbot certonly --standalone -d your-domain.at"