ownfoil
by alekc
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
| Name | Url | |
|---|---|---|
| alekc | [email protected] | https://blog.alekc.org |
Source Code
Values
| Key | Type | Default | Description |
|---|---|---|---|
| additionalManifests | object | {} | 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. |
| affinity | object | {} | Affinity rules for pod scheduling. |
| annotations.deployment | object | {} | Deployment's annotations |
| autoscaling.enabled | bool | false | Renders a HorizontalPodAutoscaler instead of a fixed replicaCount. |
| autoscaling.maxReplicas | int | 100 | Maximum replica count. |
| autoscaling.minReplicas | int | 1 | Minimum replica count. |
| autoscaling.targetCPUUtilizationPercentage | int | 80 | Target average CPU utilization percentage. |
| commonAnnotations | object | {} | Annotations merged onto every resource this chart renders, in addition to each resource's own dedicated annotations field. |
| commonLabels | object | {} | Labels merged onto every resource this chart renders. Never reaches selector/matchLabels, safe to change without forcing a Deployment recreate. |
| deployment.strategy | object | {"type":"Recreate"} | Deployment strategy. Recreate avoids two pods writing to the same library/config volumes at once (both default to ReadWriteOnce). |
| env | object | {"full":[],"simple":{"PGID":1000,"PUID":1000}} | environment values |
| env.full | list | [] | full envs, they will be rendered as written here. Useful if you need to use secrets/cm |
| env.simple | object | {"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). |
| extraContainers | list | [] | Extra sidecar containers appended to the pod spec, templated with tpl so they can reference .Release.Namespace and friends. |
| fullnameOverride | string | "" | Overrides the full resource name, instead of the default <release>-<chart> pattern. |
| image.pullPolicy | string | "IfNotPresent" | Image pull policy. |
| image.repository | string | "a1ex4/ownfoil" | Image repository. |
| image.tag | string | "" | Overrides the image tag whose default is the chart appVersion. |
| imagePullSecrets | list | [] | Image pull secrets, for a private registry mirror. |
| ingress.annotations | object | {} | Annotations to add to the Ingress |
| ingress.className | string | "" | IngressClass name, e.g. "nginx" or "traefik" |
| ingress.enabled | bool | false | Renders an Ingress for the Service. |
| ingress.hosts | list | [{"host":"chart-example.local","paths":[{"path":"/","pathType":"ImplementationSpecific"}]}] | Ingress host and path rules |
| ingress.tls | list | [] | TLS configuration for the Ingress |
| initContainers | list | [] | Extra init containers appended to the pod spec, templated with tpl. |
| nameOverride | string | "" | Overrides the chart name used to build resource names. |
| networkPolicy.annotations | object | {} | Annotations to add to the NetworkPolicy |
| networkPolicy.enabled | bool | false | Render 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.extraEgress | list | [] | Additional raw egress rules, appended as-is under spec.egress. |
| networkPolicy.extraIngress | list | [] | Additional raw ingress rules, appended as-is under spec.ingress. |
| nodeSelector | object | {} | Node selector for pod scheduling. |
| persistence.additionalMounts | list | [] | Extra volume mounts appended as-is, paired with additionalVolumes. |
| persistence.additionalVolumes | list | [] | Extra volumes appended as-is, e.g. read-only source volumes to populate the library from, mounted via additionalMounts below. |
| persistence.config.accessMode | string | "ReadWriteOnce" | Access mode for the created PVC. |
| persistence.config.enabled | bool | false | Render a PersistentVolumeClaim and mount it at /app/config. When false, an emptyDir is used and all settings/auth are lost on restart. |
| persistence.config.existingClaim | string | "" | Use an existing PVC instead of creating one. |
| persistence.config.size | string | "100Mi" | Requested size for the created PVC. |
| persistence.config.storageClass | string | "" | StorageClass for the created PVC. Empty uses the cluster default. |
| persistence.library.accessMode | string | "ReadWriteOnce" | Access mode for the created PVC. |
| persistence.library.enabled | bool | false | Render a PersistentVolumeClaim and mount it at /games. When false, an emptyDir is used and the library is lost on restart. |
| persistence.library.existingClaim | string | "" | Use an existing PVC instead of creating one. |
| persistence.library.size | string | "100Mi" | Requested size for the created PVC. |
| persistence.library.storageClass | string | "" | StorageClass for the created PVC. Empty uses the cluster default. |
| podAnnotations | object | {} | Annotations added to the pod template. |
| podSecurityContext | object | {} | Pod-level securityContext. |
| replicaCount | int | 1 | Pod replica count. Ignored when autoscaling.enabled is true. |
| resources | object | {} | |
| securityContext | object | {} | Container-level securityContext. The entrypoint itself drops privileges to PUID/PGID via sudo, so this can safely stay empty for most deployments. |
| service.annotations | object | {} | Annotations to add to the Service |
| service.port | int | 8465 | Service port. |
| service.type | string | "ClusterIP" | Kubernetes Service type. |
| serviceAccount.annotations | object | {} | Annotations to add to the service account |
| serviceAccount.create | bool | true | Specifies whether a service account should be created |
| serviceAccount.name | string | "" | The name of the service account to use. If not set and create is true, a name is generated using the fullname template |
| tolerations | list | [] | Tolerations for pod scheduling. |
Gotchas
env.simple.PUID/PGIDare real, not decorative. The entrypointchowns/appand/games//app/configto this uid/gid and drops root before starting, so they must match whatever owns your persistent volumes' contents.networkPolicy.enabledallows broad egress to0.0.0.0/0by 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 withnetworkPolicy.extraEgressif your environment allows it.deployment.strategydefaults toRecreate, notRollingUpdate. Both persistence volumes default toReadWriteOnce; 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.
- Pick a serverConnect Hetzner, OVHcloud or AWS. The builder starts on Hetzner, the cheapest sample rate.
- Place the chartownfoil is pinned at v2.6.0 in opentenant.yaml. Drag more apps from the marketplace onto a rack.
- 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