Server Operation & Maintenance Guide: daily management, monitoring, and troubleshooting

Server maintenance is the foundation of reliable website operations. Over 60% of website outages can be prevented through standardized maintenance procedures. This guide covers daily management and troubleshooting techniques.

1. Daily Checklist

Daily Checks

# System load
uptime
top -bn1 | head -5
free -h

# Disk
df -h
du -sh /var/log/

# Network
ping -c 4 google.com
ss -tlnp

# Services
systemctl status nginx
systemctl status mysql
systemctl status php8.3-fpm

Weekly Maintenance

# Updates
apt update && apt upgrade -y

# Check errors
journalctl -p err -b
tail -100 /var/log/nginx/error.log

# Database maintenance
mysqlcheck -o --all-databases

# SSL expiry check
openssl s_client -connect example.com:443 -servername example.com < /dev/null 2>/dev/null | openssl x509 -noout -dates

Monthly

  • Audit user accounts and SSH keys
  • Review login attempts
  • Rotate and compress logs
  • Test backup restoration
  • Evaluate resource usage trends

2. Monitoring Setup

UptimeRobot

Free website monitoring service:

  1. Register at UptimeRobot
  2. Add monitor → HTTP(s) type
  3. Set check frequency (5 min free)
  4. Configure notifications (Email/Slack/Telegram)

Self-hosted: Prometheus + Grafana

version: '3.8'
services:
  prometheus:
    image: prom/prometheus
    volumes:
      - ./prometheus.yml:/etc/prometheus/prometheus.yml
    ports:
      - "9090:9090"
  grafana:
    image: grafana/grafana
    ports:
      - "3000:3000"
    depends_on:
      - prometheus
  node-exporter:
    image: prom/node-exporter
    ports:
      - "9100:9100"

3. Troubleshooting

Website Down Flowchart

User reports site down
  │
  ├─→ Is server online?
  │    ├─→ ping IP
  │    ├─→ SSH reachable?
  │    └─→ Contact data center
  │
  ├─→ Web service running?
  │    ├─→ systemctl status nginx
  │    ├─→ ss -tlnp | grep :80
  │    └─→ Check error logs
  │
  ├─→ Database running?
  │    ├─→ systemctl status mysql
  │    ├─→ mysqladmin ping
  │    └─→ Check disk space
  │
  ├─→ Firewall issues?
  │    ├─→ iptables -L -n
  │    ├─→ ufw status
  │    └─→ Check cloud security groups
  │
  └─→ SSL certificate?
       ├─→ openssl s_client
       └─→ certbot certificates

High CPU/Memory

top -o %CPU
top -o %MEM
ps aux --sort=-%cpu | head

Disk Cleanup

find / -type f -size +100M -exec ls -lh {} \; 2>/dev/null
journalctl --vacuum-time=7d
docker system prune -af
apt autoremove -y
apt autoclean

4. Backup Strategy

#!/bin/bash
BACKUP_DIR="/backup"
DATE=$(date +%Y%m%d)

# MySQL backup
mysqldump --all-databases --single-transaction | gzip > ${BACKUP_DIR}/mysql_${DATE}.sql.gz

# Website files
tar -czf ${BACKUP_DIR}/www_${DATE}.tar.gz /var/www/

# Config files
tar -czf ${BACKUP_DIR}/etc_${DATE}.tar.gz /etc/nginx/ /etc/mysql/ /etc/php/

# Delete backups older than 30 days
find ${BACKUP_DIR} -name "*.gz" -mtime +30 -delete

# Offsite backup
rclone copy ${BACKUP_DIR} remote:backup-bucket/ --progress

16IDC Takeaway

The core of server maintenance isn't about fixing problems fast — it's about preventing them. Establish monitoring (even simple UptimeRobot + Telegram), automated backups (backup is only useful if you can restore), and an operations manual from day one. These basics will solve 90% of issues before users notice.