Wedding RSVP Multi-Site Server Setup
Diese Anwendung wurde für den Betrieb auf einem eigenen Server mit nginx und Certbot umgestellt.
✅ Entfernte Abhängigkeiten
- ❌ Docker / Docker Compose
- ❌ PostgreSQL/Neon Database
- ❌ Vercel Deployment
- ❌ Drizzle ORM
✅ Neue Features
- ✉️ E-Mail-basierte RSVP-Verarbeitung (statt Datenbank)
- 🌍 Multi-Site-Unterstützung mit Domain-basierter Isolation
- 🔒 Individuelle Authentifizierung pro Site
- 🎨 Anpassbare Themes pro Site
Server-Anforderungen
- Ubuntu/Debian Linux Server
- Node.js 18+
- nginx
- Certbot (Let's Encrypt)
- SMTP-Server für E-Mail-Versand
Installation
1. System-Dependencies installieren
# Node.js installieren
curl -fsSL https://deb.nodesource.com/setup_20.x | sudo -E bash -
sudo apt-get install -y nodejs
# nginx installieren
sudo apt-get install nginx
# Certbot installieren
sudo apt-get install certbot python3-certbot-nginx
2. Anwendung einrichten
# Repository klonen
sudo mkdir -p /var/www/ed.pixelbrew.de
sudo git clone https://github.com/ihr-username/wedding-rsvp.git /var/www/ed.pixelbrew.de
cd /var/www/ed.pixelbrew.de
# Dependencies installieren
npm install
# Umgebungsvariablen konfigurieren
cp .env.example .env
sudo nano .env
3. E-Mail-Konfiguration (.env)
# SMTP-Server Konfiguration
SMTP_HOST=mail.ihre-domain.de
SMTP_PORT=587
SMTP_SECURE=false
SMTP_USER=noreply@ihre-domain.de
SMTP_PASS=ihr-smtp-passwort
NOTIFICATION_EMAIL=hochzeit@ihre-domain.de
4. Multi-Site Konfiguration (.env)
# JSON-Format für mehrere Sites
SITES_CONFIG='{
"ed.pixelbrew.de": {
"title": "Hochzeit Eillen & Dennis",
"email": "hochzeit@pixelbrew.de",
"theme": {"primaryColor": "#d4a574"},
"auth": {
"credentials": [
{"username": "hochzeit", "password": "eillen2026"}
]
}
}
}'
5. Systemd Service einrichten
# Service-Datei kopieren
sudo cp deployment/pixelbrew-wedding.service /etc/systemd/system/
sudo systemctl daemon-reload
sudo systemctl enable pixelbrew-wedding
6. nginx Konfiguration
# nginx-Konfiguration kopieren
sudo cp deployment/nginx-wedding-sites.conf /etc/nginx/sites-available/wedding-sites
sudo ln -s /etc/nginx/sites-available/wedding-sites /etc/nginx/sites-enabled/
sudo nginx -t
sudo systemctl reload nginx
7. SSL-Zertifikate generieren
# Für jede Domain SSL-Zertifikat erstellen
sudo certbot --nginx -d ed.pixelbrew.de
sudo certbot --nginx -d weitere-domain.de
8. Deployment ausführen
# Anwendung bauen und starten
chmod +x deployment/deploy.sh
./deployment/deploy.sh ed.pixelbrew.de
Neue Site hinzufügen
1. Domain zur nginx-Konfiguration hinzufügen
sudo nano /etc/nginx/sites-available/wedding-sites
# Neuen server-Block für die Domain hinzufügen
sudo nginx -t && sudo systemctl reload nginx
2. SSL-Zertifikat für neue Domain
sudo certbot --nginx -d neue-domain.de
3. Site-Konfiguration in .env erweitern
sudo nano /var/www/ed.pixelbrew.de/.env
# SITES_CONFIG JSON um neue Domain erweitern
4. Service neu starten
sudo systemctl restart pixelbrew-wedding
Monitoring & Logs
Service-Status prüfen
sudo systemctl status pixelbrew-wedding
Logs ansehen
# Application Logs
sudo journalctl -u pixelbrew-wedding -f
# nginx Access Logs
sudo tail -f /var/log/nginx/ed.pixelbrew.de.access.log
# nginx Error Logs
sudo tail -f /var/log/nginx/ed.pixelbrew.de.error.log
E-Mail-Test
# Ins Application-Verzeichnis wechseln
cd /var/www/ed.pixelbrew.de
# E-Mail-Verbindung testen (falls Test-Endpoint implementiert)
curl -X POST https://ed.pixelbrew.de/api/test-email
Backup
Wichtige Dateien sichern
# .env Datei (enthält alle Konfigurationen)
sudo cp /var/www/ed.pixelbrew.de/.env ~/backup/
# nginx Konfiguration
sudo cp /etc/nginx/sites-available/wedding-sites ~/backup/
# SSL-Zertifikate (optional, werden automatisch erneuert)
sudo cp -r /etc/letsencrypt ~/backup/
Sicherheits-Features
- ✅ HTTP Basic Auth pro Site
- ✅ HTTPS-only mit automatischen SSL-Zertifikaten
- ✅ Security Headers (HSTS, X-Frame-Options, etc.)
- ✅ Domain-basierte Isolation
- ✅ Minimale Systemd-Permissions
Troubleshooting
Service startet nicht
# Logs prüfen
sudo journalctl -u pixelbrew-wedding --no-pager
# Konfiguration testen
cd /var/www/ed.pixelbrew.de
npm run check
nginx Fehler
# Konfiguration testen
sudo nginx -t
# Error Logs prüfen
sudo tail -f /var/log/nginx/error.log
E-Mail wird nicht versendet
# SMTP-Verbindung testen
telnet ihr-smtp-server.de 587
# .env Konfiguration prüfen
sudo nano /var/www/ed.pixelbrew.de/.env