ownfoil

by alekc

Helm chartv2.6.0App 2.5.0AGPL-3.0Verified publisher

Nintendo Switch library manager: serves your legally-owned game library to Switch clients (Tinfoil, etc.) with automated title/version/DLC management and shop customization.

About this chart

ownfoil

Nintendo Switch library manager: serves your legally-owned game library to Switch clients (Tinfoil, etc.) with automated title/version/DLC management and shop customization.

Ownfoil manages a personal Nintendo Switch game library and serves it over the Tinfoil/es-de shop protocol, with automatic scanning, title/version/DLC resolution against Nintendo's titledb, and per-user access control.

Quick start

From the classic chart repository:

helm repo add alekc https://charts.alekc.dev
helm repo update
helm install my-ownfoil alekc/ownfoil \
  --set persistence.library.enabled=true \
  --set persistence.config.enabled=true \
  --set ingress.enabled=true

Or directly from the OCI registry, no helm repo add needed:

helm install my-ownfoil oci://charts.alekc.dev/ownfoil --version 2.5.0

Verifying the signature

curl -sO https://charts.alekc.dev/pubring.gpg
helm pull oci://charts.alekc.dev/ownfoil --version 2.5.0 --verify --keyring pubring.gpg

A minimal working values.yaml:

persistence:
  library:
    enabled: true
    size: 500Gi
  config:
    enabled: true
    size: 1Gi
ingress:
  enabled: true
  hosts:
    - host: ownfoil.example.com
      paths:
        - path: /
          pathType: ImplementationSpecific

Maintainers

NameEmailUrl
alekc[email protected]https://blog.alekc.org

Source Code

Values

KeyTypeDefaultDescription
additionalManifestsobject{}Additional raw Kubernetes manifests to render alongside the chart's own resources. Supports any valid Kubernetes object; values are templated with tpl, so a manifest can reference .Release.Namespace and friends.
affinityobject{}Affinity rules for pod scheduling.
annotations.deploymentobject{}Deployment's annotations
autoscaling.enabledboolfalseRenders a HorizontalPodAutoscaler instead of a fixed replicaCount.
autoscaling.maxReplicasint100Maximum replica count.
autoscaling.minReplicasint1Minimum replica count.
autoscaling.targetCPUUtilizationPercentageint80Target average CPU utilization percentage.
commonAnnotationsobject{}Annotations merged onto every resource this chart renders, in addition to each resource's own dedicated annotations field.
commonLabelsobject{}Labels merged onto every resource this chart renders. Never reaches selector/matchLabels, safe to change without forcing a Deployment recreate.
deployment.strategyobject{"type":"Recreate"}Deployment strategy. Recreate avoids two pods writing to the same library/config volumes at once (both default to ReadWriteOnce).
envobject{"full":[],"simple":{"PGID":1000,"PUID":1000}}environment values
env.fulllist[]full envs, they will be rendered as written here. Useful if you need to use secrets/cm
env.simpleobject{"PGID":1000,"PUID":1000}simple key: val based env vars. PUID/PGID are honored by the entrypoint (chown + setuid to this uid/gid before starting the app).
extraContainerslist[]Extra sidecar containers appended to the pod spec, templated with tpl so they can reference .Release.Namespace and friends.
fullnameOverridestring""Overrides the full resource name, instead of the default <release>-<chart> pattern.
image.pullPolicystring"IfNotPresent"Image pull policy.
image.repositorystring"a1ex4/ownfoil"Image repository.
image.tagstring""Overrides the image tag whose default is the chart appVersion.
imagePullSecretslist[]Image pull secrets, for a private registry mirror.
ingress.annotationsobject{}Annotations to add to the Ingress
ingress.classNamestring""IngressClass name, e.g. "nginx" or "traefik"
ingress.enabledboolfalseRenders an Ingress for the Service.
ingress.hostslist[{"host":"chart-example.local","paths":[{"path":"/","pathType":"ImplementationSpecific"}]}]Ingress host and path rules
ingress.tlslist[]TLS configuration for the Ingress
initContainerslist[]Extra init containers appended to the pod spec, templated with tpl.
nameOverridestring""Overrides the chart name used to build resource names.
networkPolicy.annotationsobject{}Annotations to add to the NetworkPolicy
networkPolicy.enabledboolfalseRender a NetworkPolicy restricting ingress to the Service port and egress to DNS plus a broad HTTPS allowance. ownfoil fetches title metadata updates from the internet, so egress is broad by default, see Gotchas.
networkPolicy.extraEgresslist[]Additional raw egress rules, appended as-is under spec.egress.
networkPolicy.extraIngresslist[]Additional raw ingress rules, appended as-is under spec.ingress.
nodeSelectorobject{}Node selector for pod scheduling.
persistence.additionalMountslist[]Extra volume mounts appended as-is, paired with additionalVolumes.
persistence.additionalVolumeslist[]Extra volumes appended as-is, e.g. read-only source volumes to populate the library from, mounted via additionalMounts below.
persistence.config.accessModestring"ReadWriteOnce"Access mode for the created PVC.
persistence.config.enabledboolfalseRender a PersistentVolumeClaim and mount it at /app/config. When false, an emptyDir is used and all settings/auth are lost on restart.
persistence.config.existingClaimstring""Use an existing PVC instead of creating one.
persistence.config.sizestring"100Mi"Requested size for the created PVC.
persistence.config.storageClassstring""StorageClass for the created PVC. Empty uses the cluster default.
persistence.library.accessModestring"ReadWriteOnce"Access mode for the created PVC.
persistence.library.enabledboolfalseRender a PersistentVolumeClaim and mount it at /games. When false, an emptyDir is used and the library is lost on restart.
persistence.library.existingClaimstring""Use an existing PVC instead of creating one.
persistence.library.sizestring"100Mi"Requested size for the created PVC.
persistence.library.storageClassstring""StorageClass for the created PVC. Empty uses the cluster default.
podAnnotationsobject{}Annotations added to the pod template.
podSecurityContextobject{}Pod-level securityContext.
replicaCountint1Pod replica count. Ignored when autoscaling.enabled is true.
resourcesobject{}
securityContextobject{}Container-level securityContext. The entrypoint itself drops privileges to PUID/PGID via sudo, so this can safely stay empty for most deployments.
service.annotationsobject{}Annotations to add to the Service
service.portint8465Service port.
service.typestring"ClusterIP"Kubernetes Service type.
serviceAccount.annotationsobject{}Annotations to add to the service account
serviceAccount.createbooltrueSpecifies whether a service account should be created
serviceAccount.namestring""The name of the service account to use. If not set and create is true, a name is generated using the fullname template
tolerationslist[]Tolerations for pod scheduling.

Gotchas

  • env.simple.PUID/PGID are real, not decorative. The entrypoint chowns /app and /games//app/config to this uid/gid and drops root before starting, so they must match whatever owns your persistent volumes' contents.
  • networkPolicy.enabled allows broad egress to 0.0.0.0/0 by default. Ownfoil fetches title/version metadata updates (titledb) from the internet, which isn't a small fixed CIDR, so there's no useful default to narrow this to out of the box. Narrow it with networkPolicy.extraEgress if your environment allows it.
  • deployment.strategy defaults to Recreate, not RollingUpdate. Both persistence volumes default to ReadWriteOnce; a rolling update would try to schedule the new pod before the old one releases the volume.

Upgrade notes

No breaking changes yet. This section will list migration steps for any future release with a kind: removed or kind: changed entry in artifacthub.io/changes that requires one.

Deploy ownfoil with OpenTenant

Each tenant gets its own release of this chart, with its own namespace, secrets and domain. The builder below already has ownfoil 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 chartownfoil is pinned at v2.6.0 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