Giter VIP home page Giter VIP logo

homelab-2's Introduction

Homelab Setup

My servers setup at home

Hardware

I run two Raspberry Pi 4s' as servers currently.

NAS/media server

falcon

  • โšก Raspberry Pi 4 (8GB model)
    • Ubuntu Server 20.04 LTS
    • Overclocked to 2.0GHz
  • ๐Ÿ”Œ Powered USB 3.0 hub
    • TP-Link TL-UH700
  • ๐Ÿ“ผ Primary storage
    • Sandisk Ultra microSD card (8GB, boot)
    • Crucial BX500 SSD (480GB, root)
  • ๐Ÿ“€ Secondary storage
    • Seagate Expansion 4TB
    • Seagate Barracuda 2.5" 1TB
    • WD My Passport 1TB
    • Sony HD-B1 1TB
  • ๐ŸŒ Gigabit ethernet
    • TP-Link TL-SG1008D
  • ๐Ÿ”Š 3.5mm out...
    • Fenda E200 Plus

Main server that runs the majority of my self-hosted apps, functions as a NAS and audio server using librespot, shairport-sync, and mpv.

Runs (mostly in Docker):

๐Ÿ”— Docker Compose

  • ๐Ÿ’ก Home Assistant
  • ๏ฟฝ Grafana/Prometheus
  • ๏ฟฝ๐Ÿ“ฝ Plex Media Server
  • ๐Ÿ“บ Sonarr/Radarr
  • ๐Ÿงฒ qBittorrent

DNS/proxy server

always-on

  • โšก Raspberry Pi 4 (4GB model)
    • Ubuntu Server 20.04 LTS
  • ๐Ÿ“ผ 32GB microSD card
  • ๐ŸŒ Gigabit ethernet

DNS/DHCP server, also handles the Traefik network proxy over Tailscale, more on that below.

Since this server runs on a SD card, log2ram is used to store certain logs in-memory to reduce writes.

Runs (mostly in Docker):

๐Ÿ”— Docker Compose

Cloud VMs

  • Oracle Cloud (A1 Compute)
  • Google Cloud Platform (e2-micro)
  • Digital Ocean Droplets

๐Ÿ”— Docker Compose


DNS

AdGuard Home manages DNS and DHCP, as well as acts as the content-blocker in the network.

I use Google Public DNS over DNS-over-HTTPS as well as my ISP's DNS servers using AdGuard as well as Unbound, blocky, and dnsmasq.

dns mess

Unified access

I use Tailscale to access all devices and services. All cloud VMs have their storages mounted locally using NFS, securely.

Some apps are hosted in cloud to balance system resources. I use Traefik to access them as if they're hosted locally, using the format http://<app>.<machine>.nt.

This requires Traefik and containers on all VMs, with Traefik routers created locally (for each VM) that proxy requests to remote Traefik instances.

File management

Files are stored both in the cloud and locally.

Cloud storage

rclone is used to communicate with various cloud storages.

During system startup, two systemd files mount rclone remotes to /mnt/rc-drive and /mnt/rc-crypt and caches the entire file structure in memory.

Another systemd file uses mergerFS to create a mount at /mnt/mfs-drive that combines the above two mount points with another local folder, that way all new files are created locally.

# SSD cache
/home/../drive-local ->-|
/mnt/rc-drive  ---->----|
/mnt/rc-crypt  ---->----|
# NFS mounts over Tailscale
/mnt/oc*-drive ---->----|
                        |
/mnt/mfs-drive  <-------|

At 6AM everyday, a cron job runs a script that moves local content to the cloud.

Local storage

Also at startup, mergerFS combines all external drives and creates a single mount point at /mnt/mfs-knox using a systemd mount file.

All disks are formatted in ext4 (with no reserved space) and mounted inside /mnt/pool using fstab entries.

homelab-2's People

Contributors

agneevx avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.