timemachine

by lbenicio

Helm chartv0.1.6App smb-20261124Verified publisher

Time Machine Samba backup server with managed named local PVs, PVCs, and StorageClass support

About this chart

timemachine

Samba-based Time Machine backup server for macOS — persistent, scalable, with Traefik TCP routing.

TL;DR

helm repo add lbenicio-community https://helm.lbenicio.dev/
helm install my-release lbenicio-community/timemachine --version 0.1.6

Introduction

This chart deploys mbentley/timemachine, a Docker container that runs Samba configured as a Time Machine target. Each replica gets its own persistent volume, making it suitable for backing up multiple Macs. The chart supports Traefik IngressRouteTCP for exposing SMB over the network, and integrates with Keel for automatic image updates.

Prerequisites

  • Kubernetes 1.19+
  • Helm 3.x+
  • A Secret with credentials (TM_USERNAME and PASSWORD keys) or credentials.createSecret: true

Installing the Chart

# First, create a credentials secret
kubectl create secret generic credentials \
  --from-literal=TM_USERNAME=myuser \
  --from-literal=PASSWORD=mypassword

# Then install
helm install timemachine lbenicio-community/timemachine \
  --namespace default \
  --set replicaCount=3 \
  --set persistence.size=200Gi

Parameters

Core

KeyTypeDefaultDescription
image.repositorystringmbentley/timemachineContainer image
image.tagstring""Image tag
replicaCountint1Number of replicas (one PVC each)

Time Machine

KeyTypeDefaultDescription
timemachine.shareNamestring""Samba share name (defaults to pod name)
timemachine.volumeSizeLimitint0Volume size limit in MB (0 = unlimited)
timemachine.setPermissionsbooltrueSet permissions on startup

Credentials

KeyTypeDefaultDescription
credentials.createSecretboolfalseCreate a Secret with credentials
credentials.existingSecretstringcredentialsName of existing Secret
credentials.usernameKeystringTM_USERNAMESecret key for username
credentials.passwordKeystringPASSWORDSecret key for password

Persistence

KeyTypeDefaultDescription
persistence.enabledbooltrueEnable persistent storage
persistence.existingClaimstring""Use existing PVC
persistence.claimNamestring""Name a chart-managed PVC instead of a volumeClaimTemplate
persistence.storageClassstringlocal-pathStorageClass
persistence.sizestring100GiPVC size per replica
persistence.retainOnDeletebooltrueKeep PVCs when deleting StatefulSet
persistence.staticLocalPV.enabledboolfalseCreate a static local PV and named PVC
persistence.staticLocalPV.namestring""Static PV name
persistence.staticLocalPV.localPathstring""Host path for the static local PV
persistence.staticLocalPV.nodeAffinityHoststring""Node hostname for the static local PV
storageClass.createboolfalseCreate one shared StorageClass (enable in one release only)
storageClass.namestring""Shared StorageClass name

Use persistence.staticLocalPV with claimName to let Helm own a static local PV and its PVC for a specific host path. The shared storageClass.create option should be enabled in one release only. Alternatively, set claimName and a dynamic persistence.storageClass to let Helm create a named PVC, or use existingClaim when another controller owns the claim. With no claimName, the StatefulSet creates one PVC per replica using a volumeClaimTemplate.

Network

KeyTypeDefaultDescription
service.typestringClusterIPService type
service.smbPortint445SMB port
ingressRouteTCP.enabledboolfalseTraefik IngressRouteTCP
ingressRouteTCP.entryPointslist[smb]Traefik entrypoints

Monitoring

KeyTypeDefaultDescription
keel.enabledbooltrueKeel auto-update
podAnnotationsobject{}Prometheus scrape annotations
serviceMonitor.enabledboolfalsePrometheus ServiceMonitor

Traefik IngressRouteTCP

Expose Samba externally via Traefik TCP routing:

ingressRouteTCP:
  enabled: true
  entryPoints:
    - smb
  routes:
    - match: HostSNI(`*`)
      services:
        - name: timemachine
          port: 445

Multiple Backups

Each replica provisions its own PVC and gets a unique share name (pod name). Scale up to add more backup targets:

helm upgrade timemachine lbenicio-community/timemachine \
  --set replicaCount=3

This creates timemachine-0, timemachine-1, timemachine-2 each with their own 100Gi PVC and share name matching the pod name.

License

This chart is licensed under GPL-3.0. The timemachine Docker image is maintained by mbentley.

Deploy timemachine with OpenTenant

Each tenant gets its own release of this chart, with its own namespace, secrets and domain. The builder below already has timemachine on a Hetzner server. Change the host, add apps from the marketplace, then copy the generated files. Providers and prices are samples, and nothing here is sent anywhere.

  1. Pick a serverConnect Hetzner, OVHcloud or AWS. The builder starts on Hetzner, the cheapest sample rate.
  2. Place the charttimemachine is pinned at v0.1.6 in opentenant.yaml. Drag more apps from the marketplace onto a rack.
  3. ApplySave opentenant.yaml and main.tf from the console, then run the commands below.
# opentenant.yaml, main.tf and dns.tf come from the builder below
opentenant validate opentenant.yaml
terraform init && terraform apply