Skip to main content
Vision-only — This StackKit is not yet implemented. The documentation below describes the planned architecture and capabilities. Use the Base Kit for production deployments today.
The High Availability Kit provides high-availability infrastructure for homelabs that can’t afford downtime. It supports 2-5 nodes with automatic failover.

Overview

Key Features

Auto Failover

Automatic failover when primary node fails

Load Balancing

Distribute traffic across healthy nodes

Data Replication

Synchronous database replication

Requirements

ResourcePer NodeTotal (2 nodes)
CPU2 cores4 cores
RAM8 GB16 GB
Storage50 GB SSD100 GB
Network1 GbpsSame subnet

Architecture

Failover Mechanism

Database Replication

Quick Start

1

Define your nodes

kombination.yaml
stackkit: ha-kit

domain: homelab.local
email: you@example.com

nodes:
  - name: node-1
    ip: 192.168.1.10
    role: primary
    
  - name: node-2
    ip: 192.168.1.11
    role: replica

# Virtual IP for failover
failover:
  strategy: keepalived
  virtual_ip: 192.168.1.100
  interface: eth0
2

Configure services

services:
  traefik:
    enabled: true
    replicas: all         # Run on all nodes
    
  authelia:
    enabled: true
    replicas: all
    
  postgres:
    enabled: true
    mode: ha              # Enable replication
    synchronous: true     # Zero data loss
    
  redis:
    enabled: true
    mode: sentinel        # Redis Sentinel for HA
3

Validate and generate

stackkit validate
stackkit generate
4

Deploy to all nodes

# Deploy to primary first
stackkit deploy --node node-1

# Then replicas
stackkit deploy --node node-2

Configuration Reference

Failover Strategies

Database HA Modes

ModeDescriptionRPORTO
asyncAsync replicationSeconds~30s
syncSync replicationZero~30s
quorumQuorum commitZero~30s
services:
  postgres:
    enabled: true
    mode: ha
    replication:
      type: sync        # async, sync, quorum
      max_replicas: 2

Service Distribution

services:
  # Run on all nodes (stateless)
  traefik:
    replicas: all
    
  # Run on specific nodes
  home-assistant:
    replicas: 1
    preferred_node: node-1
    
  # Run on N nodes
  plex:
    replicas: 2

Network Architecture

Monitoring

Built-in health checks and monitoring:
monitoring:
  enabled: true
  
  healthchecks:
    interval: 10s
    timeout: 5s
    
  alerts:
    - type: node_down
      notify: email
    - type: failover_triggered
      notify: [email, slack]
    - type: replication_lag
      threshold: 10s
      notify: slack

Testing Failover

Always test failover in a maintenance window first!
# Simulate node failure
ssh node-1 "sudo systemctl stop docker"

# Watch failover
stackkit status --watch

# Expected output:
# [12:00:01] node-1: UNREACHABLE
# [12:00:03] Failover triggered: node-1 → node-2
# [12:00:04] VIP 192.168.1.100 moved to node-2
# [12:00:05] Services healthy on node-2

# Restore node-1
ssh node-1 "sudo systemctl start docker"

# node-1 becomes backup (no auto-failback by default)

Constraints

ConstraintValueReason
Min nodes2Need backup for HA
Max nodes5Complexity ceiling
Same subnetRequiredVRRP/VIP requirement
Network1 Gbps+Replication bandwidth

Troubleshooting

When nodes can’t communicate but both think they’re primary:
  1. Check network connectivity between nodes
  2. Review Keepalived logs: journalctl -u keepalived
  3. Consider adding a third node for quorum
If replica falls behind:
  1. Check network bandwidth: iperf3 -c node-1
  2. Review PostgreSQL logs for errors
  3. Consider async replication for high-write workloads
  1. Verify Keepalived is running on both nodes
  2. Check VRRP traffic: tcpdump -i eth0 vrrp
  3. Review interface configuration

Migration from the Base Kit

1

Add second node hardware

Install same OS and Docker version as your current node.
2

Update kombination.yaml

stackkit: ha-kit  # Changed from base-kit!

nodes:
  - name: node-1      # Existing
    ip: 192.168.1.10
    role: primary
  - name: node-2      # New
    ip: 192.168.1.11
    role: replica

failover:
  strategy: keepalived
  virtual_ip: 192.168.1.100
3

Migrate data

stackkit migrate --from base-kit --to ha-kit

Next Steps

Monitoring Setup

Set up comprehensive monitoring