iSuTech Knowledge Hub - Admin Guide
iSuTech Knowledge Hub - Admin Guide
Section titled “iSuTech Knowledge Hub - Admin Guide”For System Administrators
🎯 Overview
Section titled “🎯 Overview”This guide is for administrators who manage the iSuTech Knowledge Hub infrastructure, security, and maintenance.
Your responsibilities:
- User access management
- System monitoring
- Monthly maintenance
- Troubleshooting issues
- Security management
Server: Hetzner (46.224.40.5) Site: https://docs.isutech.co.za Repository: https://github.com/gedeza/isutech-knowledge-hub
🔐 Access Management
Section titled “🔐 Access Management”Adding New Users
Section titled “Adding New Users”On the server, run:
# SSH to serverssh root@46.224.40.5
# Add new user to password filehtpasswd /etc/nginx/.htpasswd newusername
# Enter password when prompted (twice)Example:
htpasswd /etc/nginx/.htpasswd john.doeNew password: ********Re-type new password: ********Adding password for user john.doeNo restart needed - works immediately!
Removing Users
Section titled “Removing Users”# Remove user from password filehtpasswd -D /etc/nginx/.htpasswd usernameChanging Passwords
Section titled “Changing Passwords”# Change existing user's passwordhtpasswd /etc/nginx/.htpasswd username
# Enter new password when promptedSecurity Best Practice: Rotate the main password quarterly.
Listing All Users
Section titled “Listing All Users”# View all userscat /etc/nginx/.htpasswd
# Output shows usernames (passwords are hashed)📊 System Monitoring
Section titled “📊 System Monitoring”Daily Health Checks (5 minutes)
Section titled “Daily Health Checks (5 minutes)”Quick verification:
# SSH to serverssh root@46.224.40.5
# Check all servicessystemctl status nginxsystemctl status cron
# Check recent auto-updatestail -n 20 /var/log/docs-update.log
# Should show: "Update Completed Successfully"Green lights:
- ✅ Nginx: active (running)
- ✅ Cron: active (running)
- ✅ Last update: successful
- ✅ No errors in logs
Weekly Checks (10 minutes)
Section titled “Weekly Checks (10 minutes)”# Check disk spacedf -h# Should be <80% full
# Check logs sizedu -sh /var/log/docs-update.logdu -sh /var/log/nginx/
# Check SSL certificatecertbot certificates# Should show >30 days remaining
# Test site accessibilitycurl -I https://docs.isutech.co.za# Should return: HTTP/2 200 (after auth)🔄 Manual Updates
Section titled “🔄 Manual Updates”Trigger Update Immediately
Section titled “Trigger Update Immediately”# Instead of waiting 10 minutes for auto-update/var/www/docs/scripts/update-docs.sh
# Check logstail -n 30 /var/log/docs-update.logWhen to use:
- Urgent documentation update needed
- Testing after configuration change
- Troubleshooting update issues
Force Rebuild
Section titled “Force Rebuild”# Navigate to repositorycd /var/www/docs/repo
# Activate virtual environmentsource /var/www/docs/venv/bin/activate
# Clean rebuildmkdocs build --clean
# Check for errors in output🛠️ Configuration Management
Section titled “🛠️ Configuration Management”Update Nginx Configuration
Section titled “Update Nginx Configuration”# Edit nginx confignano /etc/nginx/sites-available/docs.isutech.co.za
# Make changes
# Test configurationnginx -t
# If successful, reloadsystemctl reload nginx
# Verifysystemctl status nginxCommon changes:
- Add new IP to whitelist
- Update password file path
- Adjust caching settings
Update Auto-Update Script
Section titled “Update Auto-Update Script”# Edit update scriptnano /var/www/docs/scripts/update-docs.sh
# Make changes
# Test manually/var/www/docs/scripts/update-docs.sh
# Check logstail -n 50 /var/log/docs-update.logUpdate Cron Schedule
Section titled “Update Cron Schedule”# Edit cron jobscrontab -e
# Current: */10 * * * * /var/www/docs/scripts/update-docs.sh# (every 10 minutes)
# Change to hourly:# 0 * * * * /var/www/docs/scripts/update-docs.sh
# Save and exit🔐 Security Management
Section titled “🔐 Security Management”SSL Certificate Management
Section titled “SSL Certificate Management”Check certificate status:
certbot certificates
# Output shows:# - Certificate name# - Domains# - Expiry date# - Certificate pathManual renewal (if needed):
certbot renew
# Or specific domain:certbot renew --cert-name docs.isutech.co.za
# Reload nginxsystemctl reload nginxTest renewal process:
certbot renew --dry-run
# Should complete successfullyAuto-renewal: Configured automatically by Certbot. Runs twice daily.
Password Security
Section titled “Password Security”Strong password guidelines:
- Minimum 12 characters
- Mix of upper/lower case
- Include numbers and symbols
- Not a dictionary word
- Unique to this system
Recommended: Use password manager to generate and store.
Rotation schedule:
- Main password: Every 3 months
- Individual users: As needed
- After staff departure: Immediately
Access Log Review
Section titled “Access Log Review”# Check who's accessing the sitetail -n 100 /var/log/nginx/docs-access.log
# Check for failed login attemptsgrep " 401 " /var/log/nginx/docs-access.log | tail -n 20
# Check for errorstail -n 50 /var/log/nginx/docs-error.logRed flags:
- Many 401 errors (failed logins) from one IP
- Unusual access patterns
- Errors in error log
🆘 Troubleshooting
Section titled “🆘 Troubleshooting”Issue: Site Not Loading
Section titled “Issue: Site Not Loading”Diagnosis:
systemctl status nginxnginx -ttail -n 50 /var/log/nginx/docs-error.logFix:
# Restart nginxsystemctl restart nginx
# If configuration error:nginx -t # Shows error linenano /etc/nginx/sites-available/docs.isutech.co.za# Fix errornginx -t # Test againsystemctl reload nginxIssue: Documentation Not Updating
Section titled “Issue: Documentation Not Updating”Diagnosis:
# Check update logtail -n 100 /var/log/docs-update.log
# Check Git statuscd /var/www/docs/repogit statusgit log -n 5
# Check cron is runningsystemctl status cronFix:
# Manual update/var/www/docs/scripts/update-docs.sh
# If Git issues:cd /var/www/docs/repogit pull origin main
# If build fails:source /var/www/docs/venv/bin/activatemkdocs build --cleanIssue: SSL Certificate Expired
Section titled “Issue: SSL Certificate Expired”Diagnosis:
certbot certificates# Check expiry dateFix:
# Manual renewalcertbot renewsystemctl reload nginx
# If renewal fails, check:tail -n 50 /var/log/letsencrypt/letsencrypt.logIssue: Disk Space Full
Section titled “Issue: Disk Space Full”Diagnosis:
df -h# Check % usedFix:
# Clean old logsjournalctl --vacuum-time=30d
# Remove old nginx logsfind /var/log/nginx -name "*.gz" -mtime +90 -delete
# Clean apt cacheapt clean
# Check againdf -h📅 Monthly Maintenance (15 minutes)
Section titled “📅 Monthly Maintenance (15 minutes)”First Monday of each month:
Task 1: Update System Packages
Section titled “Task 1: Update System Packages”apt updateapt upgrade -y
# Check if reboot needed[ -f /var/run/reboot-required ] && echo "Reboot required"
# If needed (schedule during off-hours):rebootTask 2: Review Logs
Section titled “Task 2: Review Logs”# Documentation updatestail -n 100 /var/log/docs-update.loggrep -i "error" /var/log/docs-update.log | tail -n 20
# Nginx errorstail -n 50 /var/log/nginx/docs-error.log
# Failed loginsgrep " 401 " /var/log/nginx/docs-access.log | tail -n 20Task 3: Disk Space Check
Section titled “Task 3: Disk Space Check”df -hdu -sh /var/www/docsdu -sh /var/log/nginxAction if >80% full: Clean logs (see troubleshooting above)
Task 4: SSL Certificate Check
Section titled “Task 4: SSL Certificate Check”certbot certificates
# Should show >30 days remaining
# Test renewalcertbot renew --dry-runTask 5: Update MkDocs Material (if new version)
Section titled “Task 5: Update MkDocs Material (if new version)”Check https://github.com/squidfunk/mkdocs-material/releases
source /var/www/docs/venv/bin/activatepip list | grep mkdocs-material
# If update available:pip install --upgrade mkdocs-materialpip install --upgrade mkdocs-git-revision-date-localized-pluginpip install --upgrade mkdocs-minify-plugin
# Test buildcd /var/www/docs/repomkdocs buildTask 6: Backup Password File
Section titled “Task 6: Backup Password File”# Create monthly backupcp /etc/nginx/.htpasswd /root/backups/htpasswd-$(date +%Y%m%d).bak
# Keep last 12 months onlyfind /root/backups/ -name "htpasswd-*.bak" -mtime +365 -delete📁 Important File Locations
Section titled “📁 Important File Locations”Server Paths
Section titled “Server Paths”# Documentation/var/www/docs/ # Main directory/var/www/docs/repo/ # Git repository/var/www/docs/repo/site/ # Built static site (served by Nginx)/var/www/docs/venv/ # Python virtual environment/var/www/docs/scripts/ # Auto-update script
# Configuration/etc/nginx/sites-available/docs.isutech.co.za # Nginx config/etc/nginx/sites-enabled/docs.isutech.co.za # Symlink to above/etc/nginx/.htpasswd # Password file
# Logs/var/log/docs-update.log # Auto-update logs/var/log/nginx/docs-access.log # Web access logs/var/log/nginx/docs-error.log # Nginx errors/var/log/letsencrypt/ # SSL certificate logs
# SSL Certificates/etc/letsencrypt/live/docs.isutech.co.za/ # Current certificates🔑 Credentials & Access
Section titled “🔑 Credentials & Access”Server Access
Section titled “Server Access”IP: 46.224.40.5
User: root
Auth: SSH key
How to connect: ssh root@46.224.40.5
GitHub Repository
Section titled “GitHub Repository”Repo: https://github.com/gedeza/isutech-knowledge-hub Access: Personal Access Token Token location: [Securely stored - you have this]
Site Authentication
Section titled “Site Authentication”Username: isutech Password: [Password manager] Password file: /etc/nginx/.htpasswd
📊 Performance Metrics
Section titled “📊 Performance Metrics”Target metrics:
| Metric | Target | Check Command |
|---|---|---|
| Uptime | >99.9% | systemctl status nginx |
| Page load | <2 seconds | Browser DevTools |
| Build time | <10 seconds | Check update logs |
| Disk space | <80% | df -h |
| Auto-update success | 100% | Check logs |
| SSL validity | >30 days | certbot certificates |
🚨 Emergency Procedures
Section titled “🚨 Emergency Procedures”Site Down - Emergency Response
Section titled “Site Down - Emergency Response”1. Quick assessment (2 minutes):
ssh root@46.224.40.5systemctl status nginxnginx -ttail -n 50 /var/log/nginx/docs-error.log2. Quick fixes (5 minutes):
# Restart nginxsystemctl restart nginx
# If configuration error, restore backupcp /etc/nginx/sites-available/docs.isutech.co.za.backup /etc/nginx/sites-available/docs.isutech.co.zanginx -tsystemctl reload nginx3. Escalate if not resolved in 10 minutes
Locked Out - Password Reset
Section titled “Locked Out - Password Reset”# SSH to server (using SSH key)ssh root@46.224.40.5
# Create new password for main userhtpasswd /etc/nginx/.htpasswd isutech
# Enter new passwordData Recovery
Section titled “Data Recovery”Git repository is the source of truth:
# If local copy corrupted, re-clonecd /var/www/docsmv repo repo.corruptedgit clone https://TOKEN@github.com/gedeza/isutech-knowledge-hub.git repo/var/www/docs/scripts/update-docs.shEverything is in Git - no data loss possible!
📞 Escalation
Section titled “📞 Escalation”When to Escalate
Section titled “When to Escalate”Escalate immediately if:
- Site down >30 minutes
- Security breach suspected
- Data corruption
- Server unresponsive
- SSL certificate issues not resolving
Escalation Contacts
Section titled “Escalation Contacts”Technical Lead: [Contact info] Hetzner Support: https://console.hetzner.cloud/ Let’s Encrypt Support: https://community.letsencrypt.org/
Information to Provide
Section titled “Information to Provide”When escalating, include:
- What’s wrong - specific symptoms
- When it started - date/time
- What you tried - troubleshooting steps
- Logs - relevant excerpts
- Impact - who/what affected
✅ Admin Checklist
Section titled “✅ Admin Checklist”Keep this handy for routine tasks:
Daily (5 min):
- Check site loads
- Review update logs
- Check for errors
Weekly (10 min):
- Disk space check
- SSL certificate check
- Review access logs
- Test auto-updates
Monthly (15 min):
- Update system packages
- Review all logs
- SSL renewal test
- Update MkDocs if needed
- Backup password file
Quarterly (30 min):
- Rotate main password
- Review user access list
- Security audit
- Performance review
🎓 Learning Resources
Section titled “🎓 Learning Resources”MkDocs Material:
- Docs: https://squidfunk.github.io/mkdocs-material/
- GitHub: https://github.com/squidfunk/mkdocs-material
Nginx:
- Docs: https://nginx.org/en/docs/
- Beginners Guide: https://nginx.org/en/docs/beginners_guide.html
Let’s Encrypt:
- Certbot: https://certbot.eff.org/
- Community: https://community.letsencrypt.org/
Linux System Administration:
- Ubuntu Server: https://ubuntu.com/server/docs
📝 Change Log
Section titled “📝 Change Log”Keep a log of major changes:
Date: DD/MM/YYYYAdmin: [Your Name]Change: [What changed]Reason: [Why]Result: [Outcome]Example:
Date: 09/11/2025Admin: Technical LeadChange: Added logo to headerReason: Professional brandingResult: Successfully deployediSuTech Knowledge Hub Admin Guide Last Updated: 09/11/2025 Questions? Contact Technical Lead