Skip to content

s-gas/hauslab

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

344 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

hauslab

This repository contains all the services running on my self-hosted Linux lab. I use it as a personal engineering environment to experiment with backend development and DevOps workflows in a real, self-managed infrastructure setup.

The services that I develop myself are written in Go and are integrated with DevOps tools such as Docker, Prometheus, and Grafana for deployment, containerization, and observability.

Goal

Since I learn best by doing, the goal of this homelab is to improve my understanding of backend systems, Go, Linux, and DevOps, while also having something real and practical that I could use every day.

Hardware

Lenovo ThinkCentre M710Q Tiny

  • CPU: Intel Core i5 2.4GHz
  • Storage: 256GB SSD
  • RAM: 8GB
  • OS: Debian

Services

Each service runs in containers and has its own docker-compose.yaml.

In this way services can be developed, deployed, and restarted independently.

Current services:

  • Home gas consumption tracker (Telegram bot, server, CLI).

    Go Docker

  • Server that exposes CPU and RAM usage.

    Go Docker

  • Monitor that checks the status of the services and exposes them.

    Go Docker

  • Observability stack running Prometheus and Grafana.

    Docker Prometheus Grafana

  • DNS server with ad blocking.

    Docker

  • Web server and reverse proxy.

    Docker

  • PostgreSQL database.

    Postgres Docker

CI/CD

Continuous Integration: GitHub Actions builds and pushes the Docker images.

Continuous Deployment: pull-and-run runs as a cron job, pulling the latest images and redeploying the services.

Network

Since every service has its own docker-compose.yaml, communication is enabled through an external Docker network.

This network is created by the Makefile before the containers are started.

IP Address

The homelab uses a static IP address:

192.168.178.2

In this way it is easily accessible from other devices connected to the same network.

Hostnames

A reverse proxy (nginx) allows each service to be accessible via its own subdomain.

All hostnames points to the same IP and are routed to the correct service by the reverse proxy.

The subdomains are handled via AdGuard DNS rewrites, which contain the following entries:

192.168.178.2   hauslab
192.168.178.2   gasmetrics.hauslab
192.168.178.2   grafana.hauslab
192.168.178.2   prometheus.hauslab
192.168.178.2   adguard.hauslab
192.168.178.2   setup.adguard.hauslab

Host Ports

The following ports are exposed on the host machine:

Port Protocol Service
22 TCP SSH
53 TCP DNS (AdGuard)
53 UDP DNS (AdGuard)
80 TCP Nginx

SSH

The homelab runs an SSH server, which means it can be accessed by any device in the local network:

ssh <username>@hauslab

About

Where I experiment with Backend and DevOps concepts by developing and deploying services on self-hosted Linux hardware

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors