Skip to main content

Detailed Setup Guide

This guide provides step-by-step instructions for setting up your homelab environment using OpenTofu and Talos Linux.

Initial Setup

First, navigate to the OpenTofu directory:

cd tofu

Create a terraform.tfvars file with your configuration:

proxmox = {
name = "host3" # Your Proxmox host name
cluster_name = "host3" # Your Proxmox cluster name
endpoint = "https://pve:8006" # Your Proxmox API endpoint
insecure = false # Set to true if using self-signed certificates
username = "root@pam" # Your Proxmox username
api_token = "USER@pam!ID=TOKEN" # Your Proxmox API token
}

image = {
version = "v1.9.5" # Current Talos version
update_version = "v1.10.1" # Target Talos version for updates
schematic = "standard"
platform = "proxmox"
arch = "amd64"
proxmox_datastore = "local" # Your Proxmox datastore name
factory_url = "https://factory.talos.dev"
}

Initialize the OpenTofu configuration:

tofu init

Configuration

Create a terraform.tfvars file with your specific configuration:

proxmox = {
name = "proxmox-host"
cluster_name = "homelab-cluster"
endpoint = "https://proxmox.example.com:8006"
insecure = false
username = "root"
api_token = "root@pam!token_id=your_token_secret"
}

image = {
version = "v1.9.4"
schematic = "standard"
update_version = "v1.9.4"
update_schematic = "standard"
platform = "proxmox"
arch = "amd64"
proxmox_datastore = "local"
factory_url = "https://factory.talos.dev"
}

Deployment Process

Preview the changes that will be applied:

tofu plan

First, generate the Talos image schematics:

tofu apply -target=module.talos.talos_image_factory_schematic.this -target=module.talos.talos_image_factory_schematic.updated

Then apply the full configuration to deploy your cluster:

tofu apply

After the cluster is deployed, follow the Manual Bootstrap Guide to initialize your Kubernetes environment.