A Kubernetes based setup to run a home server.
I had also created a video where I show how I set the homelab up for my use.
required_version = ">=1.3.0"
.envrc
with all the required values. Place one .envrc in each molecule, this will help segregate their values and also because each molecule should have its own state file, so export TF_BACKEND_GIT_GIT_STATE=
will change. I use state-<MOLECULE_NAME>.json
as the pattern. .envrc
in the directory of the moleculeterraform init -backend-config="address=${BACKEND}" -backend-config="lock_address=${BACKEND}" -backend-config="unlock_address=${BACKEND}"
the BACKEND env var is setup based on the other env vars in .envrcbackend "http" {}
from all molecules and init the molecules terraform init
terraform apply -var-file=inputs.tfvars
(modify the inputs.tfvars as per your liking)Read any specific requirements per molecule in their readme.
I'm using my Raspberry Pi 4 as my home server and all testing is done on it.
Jellyfin is a media server. Play all your local video content.
Local DNS
File Sharing
You can either use k3d to try out locally, or like I am, using a server. I have k3s installed on my Raspberry Pi 4.
Run the following to setup the cluster.
$ curl -sfL https://get.k3s.io | INSTALL_K3S_VERSION='v1.21.14+k3s1' sh -
Now you can run terraform -chdir=iac plan
to check what's getting installed.
Finally, run terraform -chdir=iac apply --auto-approve
to install everything.