Skip to content

iSuTech Knowledge Hub - Admin Guide

For System Administrators


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


On the server, run:

Terminal window
# SSH to server
ssh root@46.224.40.5
# Add new user to password file
htpasswd /etc/nginx/.htpasswd newusername
# Enter password when prompted (twice)

Example:

Terminal window
htpasswd /etc/nginx/.htpasswd john.doe
New password: ********
Re-type new password: ********
Adding password for user john.doe

No restart needed - works immediately!


Terminal window
# Remove user from password file
htpasswd -D /etc/nginx/.htpasswd username

Terminal window
# Change existing user's password
htpasswd /etc/nginx/.htpasswd username
# Enter new password when prompted

Security Best Practice: Rotate the main password quarterly.


Terminal window
# View all users
cat /etc/nginx/.htpasswd
# Output shows usernames (passwords are hashed)

Quick verification:

Terminal window
# SSH to server
ssh root@46.224.40.5
# Check all services
systemctl status nginx
systemctl status cron
# Check recent auto-updates
tail -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

Terminal window
# Check disk space
df -h
# Should be <80% full
# Check logs size
du -sh /var/log/docs-update.log
du -sh /var/log/nginx/
# Check SSL certificate
certbot certificates
# Should show >30 days remaining
# Test site accessibility
curl -I https://docs.isutech.co.za
# Should return: HTTP/2 200 (after auth)

Terminal window
# Instead of waiting 10 minutes for auto-update
/var/www/docs/scripts/update-docs.sh
# Check logs
tail -n 30 /var/log/docs-update.log

When to use:

  • Urgent documentation update needed
  • Testing after configuration change
  • Troubleshooting update issues

Terminal window
# Navigate to repository
cd /var/www/docs/repo
# Activate virtual environment
source /var/www/docs/venv/bin/activate
# Clean rebuild
mkdocs build --clean
# Check for errors in output

Terminal window
# Edit nginx config
nano /etc/nginx/sites-available/docs.isutech.co.za
# Make changes
# Test configuration
nginx -t
# If successful, reload
systemctl reload nginx
# Verify
systemctl status nginx

Common changes:

  • Add new IP to whitelist
  • Update password file path
  • Adjust caching settings

Terminal window
# Edit update script
nano /var/www/docs/scripts/update-docs.sh
# Make changes
# Test manually
/var/www/docs/scripts/update-docs.sh
# Check logs
tail -n 50 /var/log/docs-update.log

Terminal window
# Edit cron jobs
crontab -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

Check certificate status:

Terminal window
certbot certificates
# Output shows:
# - Certificate name
# - Domains
# - Expiry date
# - Certificate path

Manual renewal (if needed):

Terminal window
certbot renew
# Or specific domain:
certbot renew --cert-name docs.isutech.co.za
# Reload nginx
systemctl reload nginx

Test renewal process:

Terminal window
certbot renew --dry-run
# Should complete successfully

Auto-renewal: Configured automatically by Certbot. Runs twice daily.


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

Terminal window
# Check who's accessing the site
tail -n 100 /var/log/nginx/docs-access.log
# Check for failed login attempts
grep " 401 " /var/log/nginx/docs-access.log | tail -n 20
# Check for errors
tail -n 50 /var/log/nginx/docs-error.log

Red flags:

  • Many 401 errors (failed logins) from one IP
  • Unusual access patterns
  • Errors in error log

Diagnosis:

Terminal window
systemctl status nginx
nginx -t
tail -n 50 /var/log/nginx/docs-error.log

Fix:

Terminal window
# Restart nginx
systemctl restart nginx
# If configuration error:
nginx -t # Shows error line
nano /etc/nginx/sites-available/docs.isutech.co.za
# Fix error
nginx -t # Test again
systemctl reload nginx

Diagnosis:

Terminal window
# Check update log
tail -n 100 /var/log/docs-update.log
# Check Git status
cd /var/www/docs/repo
git status
git log -n 5
# Check cron is running
systemctl status cron

Fix:

Terminal window
# Manual update
/var/www/docs/scripts/update-docs.sh
# If Git issues:
cd /var/www/docs/repo
git pull origin main
# If build fails:
source /var/www/docs/venv/bin/activate
mkdocs build --clean

Diagnosis:

Terminal window
certbot certificates
# Check expiry date

Fix:

Terminal window
# Manual renewal
certbot renew
systemctl reload nginx
# If renewal fails, check:
tail -n 50 /var/log/letsencrypt/letsencrypt.log

Diagnosis:

Terminal window
df -h
# Check % used

Fix:

Terminal window
# Clean old logs
journalctl --vacuum-time=30d
# Remove old nginx logs
find /var/log/nginx -name "*.gz" -mtime +90 -delete
# Clean apt cache
apt clean
# Check again
df -h

First Monday of each month:

Terminal window
apt update
apt upgrade -y
# Check if reboot needed
[ -f /var/run/reboot-required ] && echo "Reboot required"
# If needed (schedule during off-hours):
reboot

Terminal window
# Documentation updates
tail -n 100 /var/log/docs-update.log
grep -i "error" /var/log/docs-update.log | tail -n 20
# Nginx errors
tail -n 50 /var/log/nginx/docs-error.log
# Failed logins
grep " 401 " /var/log/nginx/docs-access.log | tail -n 20

Terminal window
df -h
du -sh /var/www/docs
du -sh /var/log/nginx

Action if >80% full: Clean logs (see troubleshooting above)


Terminal window
certbot certificates
# Should show >30 days remaining
# Test renewal
certbot renew --dry-run

Task 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

Terminal window
source /var/www/docs/venv/bin/activate
pip list | grep mkdocs-material
# If update available:
pip install --upgrade mkdocs-material
pip install --upgrade mkdocs-git-revision-date-localized-plugin
pip install --upgrade mkdocs-minify-plugin
# Test build
cd /var/www/docs/repo
mkdocs build

Terminal window
# Create monthly backup
cp /etc/nginx/.htpasswd /root/backups/htpasswd-$(date +%Y%m%d).bak
# Keep last 12 months only
find /root/backups/ -name "htpasswd-*.bak" -mtime +365 -delete

Terminal window
# 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

IP: 46.224.40.5 User: root Auth: SSH key How to connect: ssh root@46.224.40.5

Repo: https://github.com/gedeza/isutech-knowledge-hub Access: Personal Access Token Token location: [Securely stored - you have this]

Username: isutech Password: [Password manager] Password file: /etc/nginx/.htpasswd


Target metrics:

MetricTargetCheck Command
Uptime>99.9%systemctl status nginx
Page load<2 secondsBrowser DevTools
Build time<10 secondsCheck update logs
Disk space<80%df -h
Auto-update success100%Check logs
SSL validity>30 dayscertbot certificates

1. Quick assessment (2 minutes):

Terminal window
ssh root@46.224.40.5
systemctl status nginx
nginx -t
tail -n 50 /var/log/nginx/docs-error.log

2. Quick fixes (5 minutes):

Terminal window
# Restart nginx
systemctl restart nginx
# If configuration error, restore backup
cp /etc/nginx/sites-available/docs.isutech.co.za.backup /etc/nginx/sites-available/docs.isutech.co.za
nginx -t
systemctl reload nginx

3. Escalate if not resolved in 10 minutes


Terminal window
# SSH to server (using SSH key)
ssh root@46.224.40.5
# Create new password for main user
htpasswd /etc/nginx/.htpasswd isutech
# Enter new password

Git repository is the source of truth:

Terminal window
# If local copy corrupted, re-clone
cd /var/www/docs
mv repo repo.corrupted
git clone https://TOKEN@github.com/gedeza/isutech-knowledge-hub.git repo
/var/www/docs/scripts/update-docs.sh

Everything is in Git - no data loss possible!


Escalate immediately if:

  • Site down >30 minutes
  • Security breach suspected
  • Data corruption
  • Server unresponsive
  • SSL certificate issues not resolving

Technical Lead: [Contact info] Hetzner Support: https://console.hetzner.cloud/ Let’s Encrypt Support: https://community.letsencrypt.org/

When escalating, include:

  1. What’s wrong - specific symptoms
  2. When it started - date/time
  3. What you tried - troubleshooting steps
  4. Logs - relevant excerpts
  5. Impact - who/what affected

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

MkDocs Material:

Nginx:

Let’s Encrypt:

Linux System Administration:


Keep a log of major changes:

Date: DD/MM/YYYY
Admin: [Your Name]
Change: [What changed]
Reason: [Why]
Result: [Outcome]

Example:

Date: 09/11/2025
Admin: Technical Lead
Change: Added logo to header
Reason: Professional branding
Result: Successfully deployed

iSuTech Knowledge Hub Admin Guide Last Updated: 09/11/2025 Questions? Contact Technical Lead