Skip to content

GagaMen/odroid

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

50 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

πŸ”§ Development

JSON Schema Generation

Each chart and the platform provide a values.schema.json that enables IDE validation and autocompletion when editing values.yaml files. The schemas are generated from TypeScript type definitions (values.schema.ts) using ts-json-schema-generator.

Prerequisites

node --version  # requires 24.x
npm install

Generate a Single Schema

npm run generate:adguard
npm run generate:alloy
npm run generate:cert-manager-dns-lexicon-webhook
npm run generate:grafana
npm run generate:homepage
npm run generate:loki
npm run generate:longhorn
npm run generate:ntfy
npm run generate:prometheus
npm run generate:platform

Generate All Schemas at Once

npm run generate:all

After modifying any values.schema.ts file, re-run the corresponding script to keep the values.schema.json in sync.

πŸ” 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

0 stars

Watchers

1 watching

Forks

Contributors