foundry-vtt

by Mahahe

Helm chartv1.1.0App 14.370.0Verified publisher

Foundry Virtual Tabletop

About this chart

Foundry VTT

Foundry VTT is a standalone application built for experiencing multiplayer tabletop RPGs using a feature-rich and modern self-hosted application where your players connect directly through the browser.

The chart runs the felddy/foundryvtt container, which downloads and installs Foundry at startup using your foundryvtt.com account or license.

TL;DR

helm install my-release oci://ghcr.io/mahahe-it/helm/foundry-vtt \
  --set foundryvtt.username=<foundryvtt.com user> \
  --set foundryvtt.password=<foundryvtt.com password> \
  --set foundryvtt.adminPassword=<admin password>

Prerequisites

  • Kubernetes 1.25+
  • 512 MB of RAM
  • A PV provisioner for persistent data (or persistence.existingClaim)

Installing the Chart

helm install my-release oci://ghcr.io/mahahe-it/helm/foundry-vtt --version <version> -f values.yaml

Credentials can come from the values (stored in a Secret created by the chart) or from an existing Secret with foundryvtt.existingSecret: it must hold adminPassword plus either username/password (foundryvtt.existingLicenseType: account) or licenseKey (foundryvtt.existingLicenseType: licenseKey).

The Parameters section lists everything that can be configured.

Exposing Foundry

Route the hosts in hostnames with an Ingress or, with the Gateway API, an HTTPRoute; TLS ends there. Set foundryvtt.hostname to the public host as well, so Foundry shows the right invitation links. Foundry uses WebSockets, which both the Ingress controllers and the Gateway API implementations in common use pass through.

# Ingress, with cert-manager
hostnames:
  - vtt.example.com
ingress:
  enabled: true
  className: nginx
  tls: true  # secret <fullname>-tls, for every host
  annotations:
    cert-manager.io/cluster-issuer: letsencrypt
# Gateway API
hostnames:
  - vtt.example.com
httpRoute:
  enabled: true
  parentRefs:
    - name: public
      namespace: gateway
      sectionName: https

ingress.hostname still works when hostnames is empty. ingress.configurationSnippet is specific to ingress-nginx and has no HTTPRoute equivalent.

Uninstalling the Chart

helm uninstall my-release

The PersistentVolumeClaim is kept: delete it by hand to drop the Foundry data.

Upgrading

To 1.0.0

Foundry VTT moves from v10 to v14. Back up /data before upgrading: Foundry migrates worlds and modules on first start, and the migration cannot be undone.

  • Images before felddy/foundryvtt 11.315.1 can no longer log in to foundryvtt.com, so the previous default (10.288) does not start with account credentials anymore.
  • The container runs as the non-root node user (UID/GID 1000) with a read-only root filesystem. The default podSecurityContext sets fsGroup: 1000 so Kubernetes makes the existing data volume writable for it; with a custom podSecurityContext, keep an equivalent fsGroup.
  • Removed values: threadCount (not passed to Foundry by the container anymore), container.uid, container.gid, container.preserveOwner, foundryvtt.turnConfigs, foundryvtt.turnMaxPort (no longer supported by the container).
  • image.tag and foundryvtt.version default to the version the chart ships; set them only to pin another release.
  • container.timezone is now passed as TZ.
  • Probes use Foundry's /api/status, with a startup probe (startupProbe.failureThreshold, 10 minutes by default) instead of a 10 minute liveness delay.
  • The pod hostname is fixed (podHostname, default the release fullname) so the license binding survives restarts.
  • An empty persistence.storageClass now uses the cluster default StorageClass instead of one named default.

Parameters

Common Parameters

KeyTypeDefaultDescription
nameOverridestring""Name Override
fullnameOverridestring""FullName Override
dnsConfigobject{}Override for FoundryVTT DNS Configuration
podHostnamestring""Pod hostname, fixed so the Foundry license binding survives restarts (defaults to the release fullname)
extraEnvlist[]Extra environment variables for the container (list of EnvVar)
serviceAccount.createboolfalseEnable ServiceAccount Creation
serviceAccount.annotationsobject{}Extra annotations to add to the ServiceAccount
serviceAccount.namestringnilName of the Service Account
resources.requests.cpustring"500m"Percentile of CPU Requested to run
resources.requests.memorystring"512Mi"RAM Requested to run
resources.limits.cpustring"1000m"Maximum CPU allowed
resources.limits.memorystring"1024Mi"Maximum RAM allowed
podSecurityContext.runAsNonRootbooltrueThe image runs as the non-root node user
podSecurityContext.runAsUserint1000UID of the node user in the image
podSecurityContext.runAsGroupint1000GID of the node user in the image
podSecurityContext.fsGroupint1000Group that owns the data volume, so the node user can write to it (also fixes volumes created by chart versions before 1.0.0)
podSecurityContext.fsGroupChangePolicystring"OnRootMismatch"Only change volume ownership when the root of the volume does not match
podSecurityContext.seccompProfile.typestring"RuntimeDefault"Seccomp profile
securityContext.allowPrivilegeEscalationboolfalseAllow privilege escalation
securityContext.readOnlyRootFilesystembooltrueRead-only root filesystem: Foundry writes to /data and to emptyDir volumes only
securityContext.capabilities.droplist["ALL"]Dropped Linux capabilities
startupProbe.failureThresholdint60Startup probe attempts, 10s apart, before liveness takes over (first start downloads Foundry)
nodeSelectorobject{}Pod Node selector
tolerationslist[]Pod Tolerations
affinityobject{}Pod Affinity

Image Parameters

KeyTypeDefaultDescription
image.pullPolicystring"IfNotPresent"pullPolicy for the Image
image.repositorystring"felddy/foundryvtt"Repository to take the Image from
image.tagstring""Image tag, defaults to the chart appVersion
imagePullSecretslist[]Credentials for Docker private repository.

FoundryVTT Configuration

KeyTypeDefaultDescription
foundryvtt.usernamestring""Username of the Account who bought the FoundryVTT License
foundryvtt.passwordstring""Password of the Account who bought the FoundryVTT License
foundryvtt.existingLicenseTypestring"account"Type of License to be fetched from the existing secret. Must be either account or licenseKey. If set to account, the existingSecret must contain a username/password data pair. If set to licenseKey, the secret must contain a licenseKey data entry
foundryvtt.existingSecretstring""Name of an existing Secret to fetch the account from. If set, account settings from values are ignored. Must be used in combination with foundryvtt.existingLicenseType to fetch the correct data
foundryvtt.licenseKeystring""License Key for FoundryVTT. If set the account infos are ignored.
foundryvtt.adminPasswordstring""Admin Password to Access Admin Page
foundryvtt.hostnamestring"foundry.domain.com"Hostname of FoundryVTT
foundryvtt.languagestring"en.core"Language to use
foundryvtt.minifyStaticFilesbooltrueWhether to minify static files or not
foundryvtt.proxySSLbooltrueIndicates whether the software is running behind a reverse proxy that uses SSL. This allows invitation links and A/V functionality to work as if the Foundry Server had SSL configured directly.
foundryvtt.s3.enabledboolfalseEnable S3 Integration
foundryvtt.s3.existingSecretstring""Existing Secret containing a aws-credentials.json data entry, which must contain supported values by FoundryVTT. More Info Here
foundryvtt.s3.config.accessKeystring""Access Key ID
foundryvtt.s3.config.secretKeystring""Secret Access Key
foundryvtt.s3.config.regionstring""S3 Bucket Region
foundryvtt.s3.config.endpointstring""Custom S3 Endpoint, if different from AWS
foundryvtt.upnpboolfalseEnable UPNP
foundryvtt.versionstring""Foundry VTT version to install, defaults to the one matching the image
foundryvtt.worldstring""World to load at startup

Service Parameters

KeyTypeDefaultDescription
service.serviceTypestring"ClusterIP"Type of Service to create, defaults to ClusterIP
service.portint80Port to expose
service.protocolstring"TCP"Protocol to use
service.loadBalancerIPstringnilIP to assign to the Service if type LoadBalancer is selected, deprecated
service.loadBalancerSourceRangeslist[]Range from which to choose the IP to assign to the Service
service.externalTrafficPolicystring"Local"External Traffic Policy
service.labelsobject{}Extra labels to assign to the Service
service.tlsbooltrueEnable TLS for the Service
service.annotationsobject{}Extra annotations to assign to the Service

Persistence Parameters

KeyTypeDefaultDescription
persistence.enabledbooltrueEnable or Disable Persistence
persistence.storageClassstring""Storage Class to use when creating the Persistent Volume Claim
persistence.sizestring"8Gi"Size of the PV to create
persistence.readAccessModeslist["ReadWriteOnce"]List of ReadAccessModes to use with the PVC
persistence.existingClaimstring""Name of an existing claim to use instead of creating a new one. If this is set and

Extra Container Configurations

KeyTypeDefaultDescription
container.cachestring"/data/container_cache"Path to use when downloading FoundryVTT
container.preserveConfigboolfalseNormally new options.json and admin.txt files are generated by the container at each startup. Setting this to true prevents the container from modifying these files when they exist. If they do not exist, they will be created as normal. Default is false.
container.timezonestring"UTC"Container TZ database name, passed as TZ. Default is UTC
container.verboseboolfalseSet to true to enable verbose logging for the container utility scripts. Default is false

Ingress Parameters

KeyTypeDefaultDescription
hostnameslist[]Host names routed to Foundry by the Ingress and the HTTPRoute. When empty, ingress.hostname is used
ingress.enabledboolfalseEnable Ingress creations
ingress.hostnamestring"foundry.domain.com"Single host name, used when hostnames is empty (kept for compatibility, prefer hostnames)
ingress.annotationsobject{}Ingress Annotations, useful for TLS
ingress.pathstring"/"FoundryVTT Path
ingress.pathTypestring"Prefix"Type of Path
ingress.configurationSnippetstring""Extra NGINX Configuration to add as Annotation
ingress.tlsboolfalseEnable or Disable TLS
ingress.classNamestring""Optional Ingress class name
httpRoute.enabledboolfalseCreate an HTTPRoute (gateway.networking.k8s.io/v1)
httpRoute.parentRefslist[]Gateways the route attaches to, e.g. [{name: public, namespace: gateway, sectionName: https}]; required when enabled
httpRoute.annotationsobject{}HTTPRoute annotations

Deploy foundry-vtt with OpenTenant

Each tenant gets its own release of this chart, with its own namespace, secrets and domain. The builder below already has foundry-vtt 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 chartfoundry-vtt is pinned at v1.1.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