Hetzner Server Management Guide
Hetzner Server Management Guide
Section titled “Hetzner Server Management Guide”Server: production-server-01 Provider: Hetzner Last Updated: 2026-02-01
Server Overview
Section titled “Server Overview”| Property | Value |
|---|---|
| Hostname | production-server-01 |
| IP Address | 46.224.40.5 |
| OS | Ubuntu 22.04 LTS |
| Web Server | Nginx |
| Database | PostgreSQL 14 |
| Cache | Redis |
| Process Manager | systemd + PM2 |
| Container Runtime | Docker + Containerd |
Project Inventory
Section titled “Project Inventory”Active Projects (14 Applications)
Section titled “Active Projects (14 Applications)”| # | Project | Location | Domain | Service Type | Status |
|---|---|---|---|---|---|
| 1 | SANSA Frontend | /var/www/sansa-frontend/ | sansa.isutech.co.za | PM2 (port 3003) | ✅ Running |
| 2 | SANSA Backend | /var/www/sansa-backend/ | sansa.isutech.co.za/api | systemd (port 8003) | ✅ Running |
| 3 | Tumi Frontend | /var/www/tumi-frontend/ | tumi.isutech.co.za | nginx static | ✅ Serving |
| 4 | Tumi Backend | /var/www/tumi-backend/ | tumi.isutech.co.za/api | systemd (port 8004) | ✅ Running |
| 5 | SACE Frontend | /var/www/sace-frontend/ | sace.isutech.co.za | systemd | ✅ Running |
| 6 | SACE Backend | /var/www/sace-backend/ | sace.isutech.co.za/api | systemd | ✅ Running |
| 7 | ThriveSend | /var/www/thrivesend/ | thrivesend (nginx) | PM2 | ✅ Running |
| 8 | ProspectIQ | /var/www/prospect-iq/ | prospectiq (nginx) | systemd (5 services) | ✅ Running |
| 9 | DocsHub | /var/www/docs/repo/ | docs.isutech.co.za | nginx static | ✅ Serving |
| 10 | Umdoni | /var/www/umdoni/ | umdoni.gov.za | nginx + PHP | ✅ Serving |
| 11 | iSu Tech Frontend | /var/www/isutech-frontend/ | isutech.co.za | nginx static | ✅ Serving |
| 12 | iSu Tech Backend | /var/www/isutech-backend/ | api.isutech.co.za | PM2 | ✅ Running |
| 13 | Nhlanhla Portfolio | /var/www/nhlanhla-portfolio/ | nhlanhla.isutech.co.za | nginx static | ⚠️ Configured |
| 14 | MatchMind | /var/www/matchmind/ | - | - | 🔴 Stopped |
Development Projects: /projects/active/ (see Development Workflow)
Project Details
Section titled “Project Details”1. SANSA (Vision 2030 Educator Platform)
Section titled “1. SANSA (Vision 2030 Educator Platform)”Frontend:
- Path:
/var/www/sansa-frontend/ - Size: 712MB
- Type: Next.js application
- Port: 3003
- Process Manager: PM2
- Domain: https://sansa.isutech.co.za
Commands:
# Statuspm2 status sansa-frontend
# Restartpm2 restart sansa-frontend
# Logspm2 logs sansa-frontend
# Manual startcd /var/www/sansa-frontendnpm run buildpm2 start npm --name sansa-frontend -- startBackend:
- Path:
/var/www/sansa-backend/ - Size: 590MB
- Type: FastAPI (Python)
- Port: 8003
- Service:
sansa-backend.service - Domain: https://sansa.isutech.co.za/api
Commands:
# Statussystemctl status sansa-backend
# Restartsystemctl restart sansa-backend
# Logsjournalctl -u sansa-backend -f
# Manual operationcd /var/www/sansa-backendsource venv/bin/activateuvicorn app.main:app --host 0.0.0.0 --port 80032. Tumi Platform
Section titled “2. Tumi Platform”Frontend:
- Path:
/var/www/tumi-frontend/ - Size: 145MB
- Type: Static site
- Domain: https://tumi.isutech.co.za
Backend:
- Path:
/var/www/tumi-backend/ - Size: 94MB
- Type: FastAPI (Python)
- Port: 8004
- Service:
tumi-backend.service - Domain: https://tumi.isutech.co.za/api
Commands:
# Backend statussystemctl status tumi-backend
# Backend restartsystemctl restart tumi-backend
# Backend logsjournalctl -u tumi-backend -f
# Frontend (static - no restart needed)# Files served directly by nginx3. SACE (Provider Intelligence)
Section titled “3. SACE (Provider Intelligence)”Frontend:
- Path:
/var/www/sace-frontend/ - Size: 564MB
- Type: Next.js application
- Service:
sace-frontend.service - Domain: https://sace.isutech.co.za
Backend:
- Path:
/var/www/sace-backend/ - Size: 552MB
- Type: FastAPI (Python)
- Service:
sace-backend.service - Domain: https://sace.isutech.co.za/api
Commands:
# Statussystemctl status sace-backend sace-frontend
# Restart bothsystemctl restart sace-backend sace-frontend
# Logsjournalctl -u sace-backend -fjournalctl -u sace-frontend -f4. ThriveSend (B2B2G Platform)
Section titled “4. ThriveSend (B2B2G Platform)”- Path:
/var/www/thrivesend/ - Size: 1.2GB
- Type: Next.js full-stack application
- Process Manager: PM2
- Nginx Config:
/etc/nginx/sites-enabled/thrivesend
Commands:
# Statuspm2 status thrivesend
# Restartpm2 restart thrivesend
# Logspm2 logs thrivesend
# View all ThriveSend processespm2 list | grep thrive5. ProspectIQ (Lead Intelligence Platform)
Section titled “5. ProspectIQ (Lead Intelligence Platform)”- Path:
/var/www/prospect-iq/ - Size: 3.6MB (code) + node_modules
- Stack: Python FastAPI + Next.js + Celery + PostgreSQL + Redis
- Nginx Config:
/etc/nginx/sites-enabled/prospectiq
Services (5 total):
prospectiq-api.service- FastAPI Backendprospectiq-frontend.service- Next.js Frontendprospectiq-celery.service- Celery Workerprospectiq-celery-beat.service- Celery Beat Schedulerprospectiq-worker.service- Async Task Processor
Commands:
# Status all servicessystemctl status prospectiq-api prospectiq-frontend \ prospectiq-celery prospectiq-celery-beat prospectiq-worker
# Restart allsystemctl restart prospectiq-api prospectiq-frontend \ prospectiq-celery prospectiq-celery-beat prospectiq-worker
# Logsjournalctl -u prospectiq-api -fjournalctl -u prospectiq-frontend -fjournalctl -u prospectiq-celery -f6. DocsHub (Knowledge Hub)
Section titled “6. DocsHub (Knowledge Hub)”- Path:
/var/www/docs/repo/ - Size: 237MB
- Domain: https://docs.isutech.co.za 🔒 (Password Protected)
- Type: MkDocs static site (Material theme)
- Git Remote: git@github.com:gedeza/isutech-knowledge-hub.git
Commands:
# Update documentationcd /var/www/docs/repogit pull origin mainmkdocs build
# Preview locallymkdocs serve # http://localhost:8000
# Manual deploymentcd /var/www/docs/repogit pull && mkdocs buildAuto-Update:
- Documentation auto-updates via systemd timer
- Check:
systemctl status docs-update.timer
7. Umdoni Municipality Website
Section titled “7. Umdoni Municipality Website”- Path:
/var/www/umdoni/ - Size: 284MB
- Domain: https://umdoni.gov.za
- Type: PHP-based application
- Status: ✅ Serving
Commands:
# View nginx configurationcat /etc/nginx/sites-available/umdoni.gov.za
# Check PHP-FPM statussystemctl status php*-fpm
# View logstail -f /var/log/nginx/umdoni-access.log8. iSu Tech Corporate Website
Section titled “8. iSu Tech Corporate Website”Frontend:
- Path:
/var/www/isutech-frontend/ - Size: 3.2MB
- Domain: https://isutech.co.za
- Type: Static site
Backend:
- Path:
/var/www/isutech-backend/ - Size: 371MB
- Domain: https://api.isutech.co.za
- Process Manager: PM2
- PM2 Names:
isutech-backend,isu-api
Commands:
# Backend statuspm2 status isutech-backend
# Backend restartpm2 restart isutech-backend
# Backend logspm2 logs isutech-backend9. AutoSlip (Receipt Automation)
Section titled “9. AutoSlip (Receipt Automation)”- Production: Running as systemd service
- Development Code:
/projects/active/autoslip/ - Service:
autoslip.service - Purpose: WhatsApp-based receipt processing
Commands:
# Statussystemctl status autoslip
# Restartsystemctl restart autoslip
# Logsjournalctl -u autoslip -f10. Nhlanhla Portfolio
Section titled “10. Nhlanhla Portfolio”- Path:
/var/www/nhlanhla-portfolio/ - Size: 30MB
- Domain: https://nhlanhla.isutech.co.za
- Type: Static site
- Status: Configured, serving status unknown
11. MatchMind (Sports Prediction)
Section titled “11. MatchMind (Sports Prediction)”- Path:
/var/www/matchmind/ - Size: 568MB
- Status: 🔴 Stopped (code exists, no service running)
- Development:
/projects/active/matchmind/ - Primary Deployment: Railway
Development Workflow
Section titled “Development Workflow”Development Directory: /projects/active/ (3.1GB)
Active Development Projects:
- thrive-send-b2b2g (2.0GB)
- isutech-prospect-iq (696MB)
- umdoni-website (271MB)
- mnyandu-portfolio_from_root (147MB)
- matchmind (19MB)
- iSuMonitor (7.6MB)
- autoslip (1.7MB)
- MyProfile (56KB)
Workflow:
Development → Testing → Production/projects/active/[project] → test → /var/www/[project]See: Development Workflow Guide
Infrastructure Services
Section titled “Infrastructure Services”Nginx (Web Server / Reverse Proxy)
Section titled “Nginx (Web Server / Reverse Proxy)”Enabled Sites (13):
- api.isutech.co.za
- autoslip
- docs.isutech.co.za
- isutech.co.za
- monitor.isutech.co.za
- nhlanhla.isutech.co.za
- prospectiq
- sace.isutech.co.za
- sansa.isutech.co.za
- thrivesend
- tumi.isutech.co.za
- umdoni.gov.za
- (matchmind - configured but not serving)
Commands:
# Statussystemctl status nginx
# Test configurationnginx -t
# Reload configuration (no downtime)systemctl reload nginx
# Restart nginxsystemctl restart nginx
# View enabled sitesls -la /etc/nginx/sites-enabled/
# View specific configcat /etc/nginx/sites-available/docs.isutech.co.zaPostgreSQL 14
Section titled “PostgreSQL 14”Status: ✅ Running
Commands:
# Statussystemctl status postgresql@14-main
# Connect to databasesudo -u postgres psql
# List databasessudo -u postgres psql -c "\l"
# Backup databasesudo -u postgres pg_dump dbname > backup_$(date +%Y%m%d).sql
# Restore databasesudo -u postgres psql dbname < backup_20260201.sqlStatus: ✅ Running
Commands:
# Statussystemctl status redis-server
# Connect to Redis CLIredis-cli
# Check inforedis-cli INFO
# Inside redis-cli:# ping # Test connection# keys * # List all keys# info # Server info# quit # ExitDocker & Containerd
Section titled “Docker & Containerd”Status: ✅ Running
Commands:
# Docker statussystemctl status docker
# Containerd statussystemctl status containerd
# List containersdocker ps
# List imagesdocker imagesDirectory Structure
Section titled “Directory Structure”/var/www/├── docs/ # DocsHub (237MB)│ └── repo/ # Git repository + built site├── sansa-frontend/ # SANSA Frontend (712MB)├── sansa-backend/ # SANSA Backend (590MB)├── tumi-frontend/ # Tumi Frontend (145MB)├── tumi-backend/ # Tumi Backend (94MB)├── sace-frontend/ # SACE Frontend (564MB)├── sace-backend/ # SACE Backend (552MB)├── thrivesend/ # ThriveSend (1.2GB)├── prospect-iq/ # ProspectIQ (3.6MB + modules)├── umdoni/ # Umdoni Municipality (284MB)├── isutech-frontend/ # iSu Tech Frontend (3.2MB)├── isutech-backend/ # iSu Tech Backend (371MB)├── isutech-web/ # iSu Tech Web (6.5MB)├── nhlanhla-portfolio/ # Portfolio (30MB)├── matchmind/ # MatchMind (568MB - stopped)└── html/ # Default nginx (unused)
/projects/active/ # Development (3.1GB)├── thrive-send-b2b2g/ # ThriveSend dev├── isutech-prospect-iq/ # ProspectIQ dev├── umdoni-website/ # Umdoni dev├── mnyandu-portfolio_from_root/ # Portfolio dev├── matchmind/ # MatchMind dev├── autoslip/ # AutoSlip dev├── iSuMonitor/ # Monitoring assets└── MyProfile/ # CV and profiles
/etc/nginx/sites-enabled/├── api.isutech.co.za├── autoslip├── docs.isutech.co.za├── isutech.co.za├── monitor.isutech.co.za├── nhlanhla.isutech.co.za├── prospectiq├── sace.isutech.co.za├── sansa.isutech.co.za├── thrivesend├── tumi.isutech.co.za└── umdoni.gov.zaService Management Commands
Section titled “Service Management Commands”Quick Reference
Section titled “Quick Reference”# View all running systemd servicessystemctl list-units --type=service --state=running
# View all PM2 processespm2 list
# View nginx enabled sitesls /etc/nginx/sites-enabled/
# Check what's listening on portsss -tlnp | grep LISTEN
# Check disk usagedf -hdu -sh /var/www/*
# Check memory usagefree -hRestart All Application Services
Section titled “Restart All Application Services”# All systemd backend servicessystemctl restart sansa-backend tumi-backend sace-backend sace-frontend \ prospectiq-api prospectiq-frontend prospectiq-celery \ prospectiq-celery-beat prospectiq-worker autoslip
# All PM2 frontend servicespm2 restart all
# Nginxsystemctl reload nginxRestart by Application
Section titled “Restart by Application”# SANSAsystemctl restart sansa-backendpm2 restart sansa-frontend
# Tumisystemctl restart tumi-backend# (Frontend is static, no restart needed)
# SACEsystemctl restart sace-backend sace-frontend
# ThriveSendpm2 restart thrivesend
# ProspectIQsystemctl restart prospectiq-api prospectiq-frontend \ prospectiq-celery prospectiq-celery-beat prospectiq-worker
# AutoSlipsystemctl restart autoslip
# iSu Techpm2 restart isutech-backend# (Frontend is static, no restart needed)Deployment Workflows
Section titled “Deployment Workflows”General Deployment Pattern
Section titled “General Deployment Pattern”# 1. Backup current versioncp -r /var/www/[project] /var/www/[project].backup.$(date +%Y%m%d)
# 2. Pull latest code (if using Git)cd /var/www/[project]git pull origin main
# 3. Install dependencies# For Python:source venv/bin/activate && pip install -r requirements.txt# For Node:npm install
# 4. Build if needed# For Next.js:npm run build# For MkDocs:mkdocs build
# 5. Restart service# For systemd:systemctl restart [service-name]# For PM2:pm2 restart [app-name]
# 6. Verifycurl http://localhost:[port]/healthjournalctl -u [service] -n 20 # or pm2 logs [app]Specific Application Deployments
Section titled “Specific Application Deployments”SANSA:
# Backendcd /var/www/sansa-backendsource venv/bin/activategit pull && pip install -r requirements.txtalembic upgrade headsystemctl restart sansa-backend
# Frontendcd /var/www/sansa-frontendgit pull && npm install && npm run buildpm2 restart sansa-frontendDocsHub:
cd /var/www/docs/repogit pull origin mainmkdocs build# No restart needed - nginx serves static filesProspectIQ:
cd /var/www/prospect-iqgit pull origin mainpip install -r requirements.txtnpm install && npm run buildsystemctl restart prospectiq-api prospectiq-frontend \ prospectiq-celery prospectiq-celery-beat prospectiq-workerMonitoring & Logs
Section titled “Monitoring & Logs”View Service Logs
Section titled “View Service Logs”Systemd Services:
# Live logs (follow)journalctl -u SERVICE_NAME -f
# Last 100 linesjournalctl -u SERVICE_NAME -n 100
# Today's logsjournalctl -u SERVICE_NAME --since today
# Error level onlyjournalctl -u SERVICE_NAME -p err
# Multiple servicesjournalctl -u sansa-backend -u tumi-backend -fPM2 Applications:
# Live logspm2 logs APP_NAME
# Last 100 linespm2 logs APP_NAME --lines 100
# All PM2 appspm2 logs
# PM2 monitoring dashboardpm2 monitNginx:
# Access logstail -f /var/log/nginx/access.log
# Error logstail -f /var/log/nginx/error.log
# Site-specific logs (if configured)tail -f /var/log/nginx/sansa-access.logtail -f /var/log/nginx/docs-access.logCheck Resource Usage
Section titled “Check Resource Usage”# Overall systemhtop # or top
# Disk usagedf -hdu -sh /var/www/*
# Memory usagefree -h
# CPU and memory per processps aux | grep pythonps aux | grep node
# Network connectionsnetstat -tulpnss -tulpn
# PM2 resource monitoringpm2 monitKnown Issues & Notes
Section titled “Known Issues & Notes”| Issue | Project | Status | Notes |
|---|---|---|---|
| Multiple restarts | isutech-backend (PM2) | ⚠️ Monitor | Currently 23 restarts |
| Not running | MatchMind | 🔴 Stopped | Code exists, no active service |
| Not running | isu-api (PM2) | 🔴 Stopped | Check if needed |
| Development on prod | All projects | ⚠️ Notice | Development happens directly on production server (Mac broken) |
Security Notes
Section titled “Security Notes”- SSH Access: Key-based authentication only
- Firewall: UFW enabled (ports 80, 443, 22)
- SSL Certificates: Let’s Encrypt (auto-renewal via certbot.timer)
- Password Protection: DocsHub uses HTTP Basic Auth
- Git Authentication: SSH keys or Personal Access Tokens
- Database: PostgreSQL restricted to localhost
- Redis: Restricted to localhost
Check Security:
# Firewall statusufw status
# SSL certificate expirycertbot certificates
# Failed login attemptsjournalctl _SYSTEMD_UNIT=ssh.service | grep "Failed"
# Open portsss -tlnpContacts & Resources
Section titled “Contacts & Resources”- Server Provider: Hetzner Cloud
- Server IP: 46.224.40.5
- SSL Provider: Let’s Encrypt / Certbot
- Git Repositories: github.com/gedeza
- Documentation: https://docs.isutech.co.za
Quick Emergency Commands
Section titled “Quick Emergency Commands”# Service down - restartsystemctl restart [service-name]
# Check why service failedsystemctl status [service-name]journalctl -u [service-name] -n 50
# High memory usagefree -hps aux --sort=-%mem | head -10systemctl restart [problematic-service]
# Disk fulldf -hdu -sh /var/www/* /var/log/*journalctl --vacuum-time=7d # Clear old logs
# Nginx issuesnginx -t # Test configsystemctl restart nginxtail -f /var/log/nginx/error.log
# Database issuessystemctl status postgresql@14-mainsudo -u postgres psql -c "SELECT 1;"Document Version: 2.0 Last Updated: 2026-02-01 Previous Update: 2025-12-09 Author: iSu Technologies Operations Team