Skip to content
PHASE 08Intermediate3 weeks

Services and Self-Hosting

Objective: Install, configure, and manage real services on your machine.

The Mission

A computer that just sits there with a desktop is a paperweight. IT professionals make machines do things: serve websites, handle DNS, share files, host applications. You're going to turn your machine into a working server.

A service is a program that runs in the background and does a job. systemd manages them all.

What you'll build
  • Nginx: Web server. Serve HTML pages. Configure virtual hosts. Change ports.

  • Pi-hole: Network-level DNS server. Block ad domains. Understand DNS traffic.

  • Samba: File server. Share directories across your local network.

  • systemd: The init system and service manager. start vs. enable is the critical distinction.

systemd service management
  • systemctl start [service]Start a service right now
  • systemctl stop [service]Stop a running service
  • systemctl restart [service]Restart a service
  • systemctl enable [service]Auto-start on boot
  • systemctl disable [service]Remove from boot sequence
  • systemctl status [service]Current status and recent log output
  • journalctl -u [service] -fFollow live logs for a service
  • journalctl -u [service] --since '1 hour ago'Recent log history
The Challenge5 tasks
  1. 1

    Install Nginx. Configure it to serve an HTML page you write yourself. Access it from your browser at http://localhost. Change the port to 8080 and access it there.

  2. 2

    Install Pi-hole. Configure your machine to use it as its DNS server. Block an ad domain and verify it's blocked.

  3. 3

    Install and configure Samba. Create a shared folder accessible from another device on your network.

  4. 4

    Use systemctl to start, stop, restart, enable, and check the status of each service. Understand the difference between start and enable.

  5. 5

    Find the log files for Nginx and Pi-hole. Read them. Identify what a normal log entry looks like vs. an error.

The Log
course-notes/phase-8-services/
  • nginx-setup.md
    Full install/config process, your config file contents, the HTML page you wrote, how you changed the port.
  • pihole-setup.md
    Installation steps, DNS config changes, proof of a blocked domain.
  • samba-setup.md
    Config file contents, user permissions, and how you tested from another device.
  • systemd-reference.md
    The difference between start and enable. Commands for managing services. Output of systemctl status for each.
  • log-analysis.md
    Examples of normal vs. error log entries from each service with your interpretation.
Resources
All phases