Skip to content

GagaMen/odroid

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

46 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Odroid Home Server

A Kubernetes-based home server setup running on ODROID-M2 with 16GB RAM. This repository contains Helm charts and configurations for a complete self-hosted infrastructure including DNS ad-blocking, a customizable dashboard, push notifications, distributed storage, and a full monitoring stack.

🚀 Features

  • AdGuard Home - Network-wide ad & tracker blocking DNS server
  • Homepage - Modern, customizable application dashboard
  • ntfy - Self-hosted push notification service
  • Longhorn - Cloud-native distributed storage
  • cert-manager DNS Lexicon Webhook - DNS-01 ACME challenge solver
  • WireGuard VPN - Secure remote access to your home network
  • Prometheus - Metrics collection and storage (incl. node-exporter & kube-state-metrics)
  • Grafana - Dashboards, visualization, and alerting (with ntfy integration)
  • Loki - Log aggregation
  • Grafana Alloy - Log shipping from Kubernetes pods to Loki

📋 Prerequisites

  • ODROID-M2 (or compatible ARM64 device)
  • Ubuntu Server (or compatible Linux distribution)
  • Basic knowledge of Kubernetes and Helm

🛠️ Installation

1. Install MicroK8s

Use this command to install the latest version:

snap install microk8s --classic

To install a specific version see MicroK8s Snap Channels.

2. Enable Basic Addons

microk8s enable dns
microk8s enable ingress
microk8s enable cert-manager
microk8s enable metrics-server

3. Configure Shell (zsh)

Add kubectl aliases and enable autocompletion:

alias kubectl="microk8s.kubectl"
alias k="kubectl"
source <(kubectl completion zsh | sed "s/kubectl/microk8s.kubectl/g")
source <(k completion zsh | sed "s/k/microk8s.kubectl/g")

Add helm alias and enable autocompletion:

alias helm="microk8s.helm3"
source <(helm completion zsh | sed "s/helm/microk8s.helm3/g")

4. Install k9s (Optional)

k9s is a terminal-based UI for managing Kubernetes clusters.

Go to the release page, download the latest arm64 binary:

wget https://github.com/derailed/k9s/releases/download/v0.40.10/k9s_Linux_arm64.tar.gz
tar -xvzf k9s_Linux_arm64.tar.gz
sudo mv k9s /usr/local/bin

# Clean up
rm k9s_Linux_arm64.tar.gz README.md LICENSE 

Configure kubectl for k9s Shell Access

To use shell access in pods via k9s, create a kubectl wrapper:

sudo tee /usr/local/bin/kubectl > /dev/null << 'EOF'
#!/bin/bash
exec /snap/bin/microk8s.kubectl "$@"
EOF
sudo chmod +x /usr/local/bin/kubectl

Note: A symbolic link doesn't work in this case.

5. Export KUBECONFIG Environment Variable

Add this to your .zshrc or .bashrc:

export KUBECONFIG=/var/snap/microk8s/current/credentials/client.config

📦 Deploy the Platform

1. Update Helm Dependencies

cd platform
helm dependency update

2. Create Your values.yaml

Create a platform/values.yaml file with your configuration. See the individual chart READMEs for available options:

3. Install the Platform

helm install odroid-platform ./platform -f platform/values.yaml

4. Upgrade the Platform

helm upgrade odroid-platform ./platform -f platform/values.yaml

📁 Repository Structure

├── charts/                                 # Individual Helm charts
│   ├── adguard/                            # AdGuard Home DNS ad-blocker
│   ├── alloy/                              # Grafana Alloy log shipper
│   ├── cert-manager-dns-lexicon-webhook/   # DNS-01 ACME solver
│   ├── grafana/                            # Grafana dashboards & alerting
│   ├── homepage/                           # Application dashboard
│   ├── loki/                               # Log aggregation
│   ├── longhorn/                           # Distributed storage
│   ├── ntfy/                               # Push notification service
│   └── prometheus/                         # Metrics collection & storage
├── platform/                               # Umbrella chart combining all services
│   ├── Chart.yaml                          # Dependencies definition
│   ├── templates/                          # Platform-wide resources
│   │   ├── clusterissuer.yaml              # Let's Encrypt configuration
│   │   ├── namespace.yaml                  # Namespace definitions
│   │   ├── recurring-job.yaml              # Longhorn backup jobs
│   │   ├── secret.yaml                     # DNS provider credentials
│   │   └── storageclass.yaml               # Longhorn storage class
│   └── values.yaml                         # Your configuration (gitignored)
└── wireguard/                              # WireGuard VPN setup guide

🔐 Security Notes

  • The platform/values.yaml file is gitignored as it contains sensitive configuration
  • DNS provider credentials are stored in Kubernetes secrets
  • TLS certificates are automatically managed via cert-manager
  • Consider using sealed-secrets for GitOps workflows

📄 License

This project is licensed under the MIT License - see the LICENSE file for details.

🤝 Contributing

Contributions are welcome! Feel free to open issues or submit pull requests.

About

Production-ready Kubernetes home server platform for Odroid with Helm charts for DNS (AdGuard), dashboard (Homepage), notifications (Ntfy), storage (Longhorn), and automatic TLS certificates via DNS challenge. Complete deployment guide included.

Topics

Resources

License

Stars

Watchers

Forks

Contributors