qbittorrent-vpn

by bdclark

Helm chartv0.8.1App 5.3.1MITVerified publisher

qBittorrent with Gluetun VPN sidecar

About this chart

Qbittorrent-Vpn Helm Chart

qBittorrent with Gluetun VPN sidecar

[!NOTE] This chart is under active development. Breaking changes may occur between minor versions.

Installing

helm repo add bdclark https://bdclark.github.io/helm-charts
helm repo update
helm install qbittorrent-vpn bdclark/qbittorrent-vpn -f values.yaml

Gluetun Sidecar

Gluetun runs as a sidecar to route all traffic through a VPN tunnel. By default it runs as a native sidecar (requires Kubernetes 1.29+). Set gluetun.lifecycleMode: standard for older clusters.

Gluetun requires provider-specific configuration via environment variables. See the Gluetun wiki for setup details.

Control Server Authentication

Gluetun's control server can be protected with role-based authentication. Enable gluetun.controlServer to mount a TOML config file:

gluetun:
  env:
    HTTP_CONTROL_SERVER_AUTH_CONFIG: /gluetun/auth/config.toml
  controlServer:
    enabled: true
    config: |
      [[roles]]
      name = "readonly"
      routes = ["GET /v1/publicip/ip"]
      auth = "apikey"
      apikey = "my-secret-key"

For production, use an existing Secret instead of inline config:

gluetun:
  controlServer:
    enabled: true
    existingSecret:
      name: gluetun-control-auth
      key: config.toml

Control Server Service

To expose the Gluetun control server within the cluster, enable the dedicated service:

gluetun:
  service:
    enabled: true
    port: 8000

This creates a separate Service for the control server API (default port 8000), allowing other applications to query VPN status or trigger actions via the control server endpoints.

Environment Variables

Both containers support environment variables via env (inline values or refs) and envFrom (bulk refs).

qbittorrent:
  env:
    TZ: America/New_York
    PUID: "1000"
    PGID: "1000"

gluetun:
  env:
    VPN_SERVICE_PROVIDER: protonvpn
    VPN_TYPE: wireguard
    SERVER_COUNTRIES: Netherlands
    WIREGUARD_PRIVATE_KEY:
      valueFrom:
        secretKeyRef:
          name: gluetun-vpn
          key: wireguard-private-key

For bulk environment variables from ConfigMaps or Secrets:

gluetun:
  envFrom:
    - secretRef:
        name: gluetun-credentials

qBittorrent Config Bootstrapping

The chart can seed a qBittorrent config file on first run when qbittorrent.config.bootstrap.enabled is true (the default). Inline config creates a ConfigMap automatically:

qbittorrent:
  config:
    bootstrap:
      enabled: true
      config: |
        [LegalNotice]
        Accepted=true

        [Preferences]
        Downloads\SavePath=/data/
        WebUI\Address=*

To use an existing ConfigMap or Secret:

qbittorrent:
  config:
    bootstrap:
      existingConfig:
        type: secret  # or "configMap"
        name: qbittorrent-config
        key: qBittorrent.conf

WebUI Password

The WebUI password can be injected from a Secret containing a PBKDF2-hashed password. Generate one externally or extract from an existing qBittorrent config.

qbittorrent:
  config:
    bootstrap:
      webuiPassword:
        mode: ifMissing  # or "overwrite"
        existingSecret:
          name: qbittorrent-webui
          key: WebUI_Password_PBKDF2

Modes:

  • disabled - no password management (default)
  • ifMissing - set only if not already present in config
  • overwrite - replace password on every container start

Persistence

Config persistence is enabled by default. Data persistence must be explicitly enabled.

qbittorrent:
  persistence:
    config:
      enabled: true
      size: 2Gi
      mountPath: /config
    data:
      enabled: true
      size: 100Gi
      mountPath: /data
      storageClass: fast-storage
      # existingClaim: my-data-pvc

Configuration

KeyTypeDefaultDescription
nameOverridestring""Override the release name.
fullnameOverridestring""Override the full release name.
replicaCountint1Number of replicas.
strategyobject{"type":"Recreate"}Deployment update strategy.
imagePullSecretslist[]Image pull secrets.
deploymentAnnotationsobject{}Annotations for the Deployment.
extraDeploymentLabelsobject{}Additional labels for the Deployment.
podAnnotationsobject{}Annotations for pods.
podLabelsobject{}Additional labels for pods.
commonLabelsobject{}Labels to add to all resources.
podSecurityContextobject{}Pod security context.
qbittorrent.image.repositorystring"linuxserver/qbittorrent"Image repository.
qbittorrent.image.tagstring""Image tag (defaults to chart appVersion).
qbittorrent.image.pullPolicystring"IfNotPresent"Image pull policy.
qbittorrent.securityContextobject{}Container security context.
qbittorrent.resourcesobject{}Resource requests and limits.
qbittorrent.portslist[{"containerPort":8080,"name":"http","protocol":"TCP"}]Container ports.
qbittorrent.startupProbeobject{}Startup probe configuration.
qbittorrent.livenessProbeobject{}Liveness probe configuration.
qbittorrent.readinessProbeobject{}Readiness probe configuration.
qbittorrent.envobject{} (see values.yaml comments for examples)Environment variables.
qbittorrent.envFromlist[]Environment variables from ConfigMaps or Secrets.
qbittorrent.config.mountPathstring"/config/qBittorrent"Directory containing the configuration file.
qbittorrent.config.fileNamestring"qBittorrent.conf"Configuration file name.
qbittorrent.config.bootstrap.enabledboolfalseCreate config file if missing. Requires persistence.config.enabled=true.
qbittorrent.config.bootstrap.configstringSane defaults for containerized deployment.Initial configuration content (used when existingConfig.type is empty).
qbittorrent.config.bootstrap.existingConfig.typestring""Source type for existing config: "configMap", "secret", or "" (use bootstrap.config).
qbittorrent.config.bootstrap.existingConfig.namestring""Name of the ConfigMap or Secret.
qbittorrent.config.bootstrap.existingConfig.keystring"qBittorrent.conf"Key containing the configuration data.
qbittorrent.config.bootstrap.webuiPassword.modestring"disabled"Password injection mode: "disabled", "ifMissing", or "overwrite". Requires bootstrap.enabled=true.
qbittorrent.config.bootstrap.webuiPassword.existingSecret.namestring"qbittorrent-webui"Secret name containing the PBKDF2-hashed password.
qbittorrent.config.bootstrap.webuiPassword.existingSecret.keystring"WebUI_Password_PBKDF2"Secret key for the password.
qbittorrent.persistence.config.enabledbooltrueEnable config persistence.
qbittorrent.persistence.config.mountPathstring"/config"Mount path.
qbittorrent.persistence.config.subPathstring""Subdirectory of the volume to mount (optional).
qbittorrent.persistence.config.storageClassstring""Storage class ("-" for default, "" for cluster default).
qbittorrent.persistence.config.accessModeslist["ReadWriteOnce"]Access modes.
qbittorrent.persistence.config.sizestring"2Gi"Volume size.
qbittorrent.persistence.config.existingClaimstring""Use existing PVC (disables provisioning).
qbittorrent.persistence.config.extraLabelsobject{}Additional labels for PVCs created by this chart.
qbittorrent.persistence.config.annotationsobject{}PVC annotations.
qbittorrent.persistence.data.enabledboolfalseEnable data persistence.
qbittorrent.persistence.data.mountPathstring"/data"Mount path.
qbittorrent.persistence.data.subPathstring""Subdirectory of the volume to mount (optional).
qbittorrent.persistence.data.storageClassstring""Storage class ("-" for default, "" for cluster default).
qbittorrent.persistence.data.accessModeslist["ReadWriteOnce"]Access modes.
qbittorrent.persistence.data.sizestring"2Gi"Volume size.
qbittorrent.persistence.data.existingClaimstring""Use existing PVC (disables provisioning).
qbittorrent.persistence.data.extraLabelsobject{}Additional labels for PVCs created by this chart.
qbittorrent.persistence.data.annotationsobject{}PVC annotations.
qbittorrent.volumeMountslist[]Additional volume mounts.
qbittorrent.service.typestring"ClusterIP"Service type.
qbittorrent.service.portint8080Service port.
qbittorrent.ingress.enabledboolfalseEnable Ingress.
qbittorrent.ingress.classNamestring""Ingress class name.
qbittorrent.ingress.annotationsobject{}Ingress annotations.
qbittorrent.ingress.hostslist[{"host":"qbittorrent.local","paths":[{"path":"/","pathType":"ImplementationSpecific"}]}]Ingress hosts.
qbittorrent.ingress.tlslist[]Ingress TLS configuration.
gluetun.enabledbooltrueEnable VPN sidecar.
gluetun.lifecycleModestring"nativeSidecar"Lifecycle mode: "nativeSidecar" or "standard". Native sidecars (initContainer with restartPolicy Always) require Kubernetes 1.29+.
gluetun.lifecycleHooksobject{}Container lifecycle hooks.
gluetun.image.repositorystring"qmcgaw/gluetun"Image repository.
gluetun.image.tagstring"v3.41.3"Image tag.
gluetun.image.pullPolicystring"IfNotPresent"Image pull policy.
gluetun.needsTunDevicebooltrueMount /dev/net/tun device.
gluetun.securityContextobject{"capabilities":{"add":["NET_ADMIN"]}}Container security context.
gluetun.resourcesobject{}Resource requests and limits.
gluetun.portslist[]Container ports.
gluetun.startupProbeobject{}Startup probe configuration.
gluetun.livenessProbeobject{}Liveness probe configuration.
gluetun.readinessProbeobject{}Readiness probe configuration.
gluetun.envobject{} (see values.yaml comments for examples)Environment variables.
gluetun.envFromlist[]Environment variables from ConfigMaps or Secrets.
gluetun.persistence.enabledboolfalseEnable persistence.
gluetun.persistence.storageClassstring""Storage class ("-" for default, "" for cluster default).
gluetun.persistence.accessModeslist["ReadWriteOnce"]Access modes.
gluetun.persistence.sizestring"200Mi"Volume size.
gluetun.persistence.existingClaimstring""Use existing PVC (disables provisioning).
gluetun.persistence.extraLabelsobject{}Additional labels for PVCs created by this chart.
gluetun.persistence.annotationsobject{}PVC annotations.
gluetun.volumeMountslist[]Additional volume mounts.
gluetun.controlServer.enabledboolfalseEnable control server authentication config file.
gluetun.controlServer.mountPathstring"/gluetun/auth"Mount path for the auth config directory.
gluetun.controlServer.fileNamestring"config.toml"Config file name.
gluetun.controlServer.existingSecret.namestring""Name of an existing Secret containing the TOML config. If empty and config is set, a Secret will be created from the inline config.
gluetun.controlServer.existingSecret.keystring"config.toml"Key within the Secret.
gluetun.controlServer.configstring"" (disabled)Inline TOML config. Creates a chart-managed Secret when existingSecret.name is empty. Visible in Helm values/history, so not recommended for production.
gluetun.service.enabledboolfalseEnable gluetun control server service.
gluetun.service.typestring"ClusterIP"Service type.
gluetun.service.portint8000Service port.
initContainerslist[]Additional init containers (run before gluetun if native sidecar mode).
extraContainerslist[]Additional containers.
volumeslist[]Additional volumes.
nodeSelectorobject{}Node selector.
tolerationslist[]Tolerations.
affinityobject{}Affinity rules.

License

MIT - see LICENSE.

Deploy qbittorrent-vpn with OpenTenant

Each tenant gets its own release of this chart, with its own namespace, secrets and domain. The builder below already has qbittorrent-vpn 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 chartqbittorrent-vpn is pinned at v0.8.1 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