Docs / Server Management / Setting Up etckeeper for Configuration Tracking

Setting Up etckeeper for Configuration Tracking

By Admin · Mar 15, 2026 · Updated Apr 24, 2026 · 9 views · 3 min read

Setting Up etckeeper for Configuration Tracking is a common requirement for VPS administrators. This guide provides practical instructions that you can follow on Ubuntu 22.04/24.04 or Debian 12, though most steps apply to other distributions as well.

Prerequisites

  • Root or sudo access to the server
  • Basic familiarity with the Linux command line
  • A VPS running Ubuntu 22.04 or later (2GB+ RAM recommended)
  • Root access to the server
  • A registered domain name (for public-facing services)

Initial Setup

After applying these changes, monitor the server's resource usage for at least 24 hours to ensure stability. Tools like htop, iostat, and vmstat can provide real-time insights into system performance.


# Systemd service management
sudo systemctl status nginx
sudo systemctl enable --now nginx
sudo systemctl restart nginx

# View service logs
sudo journalctl -u nginx -f --since "10 minutes ago"

# List all running services
systemctl list-units --type=service --state=running

This configuration provides a good balance between performance and resource usage. For high-traffic scenarios, you may need to increase the limits further.

Important Notes

When scaling this setup, consider vertical scaling (adding more RAM/CPU) first, as it's simpler to implement. Horizontal scaling adds complexity but may be necessary for high-traffic applications.

  • Enable automatic security updates for critical patches
  • Test your backup restore procedure monthly
  • Monitor disk space usage and set up alerts
  • Review log files weekly for anomalies

Configuration Steps

The git component plays a crucial role in the overall architecture. Understanding how it interacts with etckeeper will help you make better configuration decisions.


# Server resource monitoring
htop                          # Interactive process viewer
iostat -x 1 5                 # Disk I/O stats (5 samples)
vmstat 1 5                    # Virtual memory stats
ss -tlnp                      # Open listening ports
netstat -an | wc -l           # Total connections

Note that file paths may vary depending on your Linux distribution. The examples here are for Debian/Ubuntu; adjust paths accordingly for RHEL/CentOS-based systems.

  • Set up monitoring before going to production
  • Test disaster recovery procedures regularly
  • Document all configuration changes

Automation and Scheduling

If you encounter issues during setup, check the system logs first. Most problems can be diagnosed by examining the output of journalctl or the application-specific log files in /var/log/.


# Systemd service management
sudo systemctl status nginx
sudo systemctl enable --now nginx
sudo systemctl restart nginx

# View service logs
sudo journalctl -u nginx -f --since "10 minutes ago"

# List all running services
systemctl list-units --type=service --state=running

The output should show the service running without errors. If you see any warning messages, address them before proceeding to the next step.

  • Use connection pooling for database connections
  • Scale vertically before scaling horizontally
  • Start with the minimum required resources
  • Implement caching at every appropriate layer

Summary

You've successfully configured etckeeper on your VPS. Remember to monitor performance, keep your software updated, and maintain regular backups. If you run into issues, consult the official documentation or open a support ticket for assistance.

Was this article helpful?