Skip to content

Instantly share code, notes, and snippets.

@asachs01
Created April 2, 2025 18:18
Show Gist options
  • Save asachs01/6507b0dddc0f8195e0268bfd272d52f3 to your computer and use it in GitHub Desktop.
Save asachs01/6507b0dddc0f8195e0268bfd272d52f3 to your computer and use it in GitHub Desktop.
A modern infrastructure deployment exercise for those wanting to get started in tech.

Modern Low-Cost Infrastructure Project for Beginners

Overall Goal

Set up a personal website on a virtual machine that follows modern best practices while minimizing costs.

Required Resources

  • A low-cost virtual machine (VM) from a provider like DigitalOcean, Linode, or Hetzner (~$5/month)
  • A domain name (can be as low as $1-2/year for some TLDs, or free from Freenom)
  • A personal computer with internet access

Tasks

1. Basic Web Server Setup

  • Sign up for a VM provider and create your first Linux server (Ubuntu or Debian recommended for beginners)
  • Learn basic Linux navigation and file management commands
  • Install a web server (Nginx or Apache)
  • Create a simple HTML website and make it accessible via your VM's IP address
  • Test that your website is visible from the internet

2. Domain and DNS Configuration

  • Register a domain name
  • Configure the domain's DNS settings to point to your VM's IP address
  • Learn about A records, CNAME records, and TTL values
  • Wait for DNS propagation and verify your website is accessible via your domain name

3. Backup Implementation

  • Create a simple backup script using tools like tar and cron
  • Set up your script to run automatically on a schedule
  • Configure backups to be stored in multiple locations:
    • Locally on your VM (different directory)
    • Off-site (could be a free cloud storage service or another location)
  • Test your backup system by recovering files

4. Development Environment

  • Create a separate directory for testing changes before they go live
  • Configure your web server to serve this directory under a subdomain (e.g., dev.yourdomain.com)
  • Learn how to safely test changes in this environment before applying them to your main website
  • Implement a simple process for promoting changes from development to production

5. Email Configuration

  • Set up a basic email forwarding system
  • Configure MX records in your DNS
  • Create email addresses like [email protected] that forward to your personal email
  • Test that emails are properly received

6. Security Implementation

  • Configure a firewall using UFW (Uncomplicated Firewall)
  • Secure SSH access:
    • Disable password authentication
    • Set up SSH key-based authentication
    • Consider changing the default SSH port
  • Install Let's Encrypt for free SSL certificates
  • Configure your web server to use HTTPS
  • Set up automatic certificate renewal
  • Implement basic security headers for your website

7. Documentation

  • Create a comprehensive document that includes:
    • All commands used during setup
    • Configuration file locations and important settings
    • Regular maintenance tasks and how to perform them
    • Troubleshooting steps for common issues
    • Backup and restore procedures
  • Store this documentation securely but accessibly

8. Monitoring and Maintenance Plan

  • Set up basic system monitoring using built-in tools like top, htop, or glances
  • Create a simple maintenance schedule for:
    • Checking system logs
    • Applying security updates
    • Verifying backups
    • Renewing SSL certificates

Challenge Rules

You must complete this project using ONLY:

  • Official documentation from software and service providers
  • Linux man pages
  • Official tutorials from your VM provider
  • NO AI tools, NO forums, NO Stack Overflow, NO YouTube tutorials

Learning Outcomes

By completing this project, you will gain practical experience with:

  • Linux server administration
  • Web server configuration
  • DNS management
  • Backup strategies
  • Basic security practices
  • Technical documentation
  • Problem-solving through official documentation

Extension Challenges (Optional)

Once you've completed the main project, consider these extensions:

  • Implement a simple CI/CD pipeline using Git hooks
  • Set up a static site generator (like Hugo or Jekyll)
  • Add a simple database to your website
  • Configure server monitoring with email alerts
  • Implement content caching for better performance

Remember, the goal is not just to get a website running, but to understand each component of your infrastructure and why it's configured the way it is. Good luck!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment