Skip to content

PeerTube is a Free and Open Source social media networking platform based on ActivityPub.

We are mostly stable for running PeerTube on Kubernetes. Check out our PeerTube Argo CD ApplicationSet:

screenshot of the peertube applicationset in Argo CD's web interface using the tree mode view. the main peertube app has 6 child apps: peertube-valkey, peertube-app-set with child peertube-web-app, peertube-external-secrets-appset with child peertube-external-secrets, peertube-postgres-app-set with child peertube-postgres-cluster, peertube-s3-provider-app-set with child peertube-seaweedfs, and peertube-s3-pvc-appset with child peertube-s3-pvc.

This is the networking view in Argo CD:

screenshot of the peertube applicationset in Argo CD's web interface using the networking tree mode view. it shows the flow of cloud to ip address to peertube-web-app ingress to two services peertube-web-app-streaming and peertube-web-app-web which each go to their respective pods. There's also additional services and pods outside of that flow. pods masotdon-web-app-media and masotdon-web-app-sidekiq have no children. 2 elastic search services have the same elastic search pod child. and then there's an additional 3 matching elastic search service and pod pairs

Required Init Values

To use the default smol-k8s-lab Argo CD Application, you'll need to provide one time init values for:

  • admin_user
  • admin_email
  • smtp_user
  • smtp_host
  • smtp_port

Required ApplicationSet Values

And you'll also need to provide the following values to be templated for your personal installation:

  • hostname - the hostname for your web interface

Required Sensitive Values

If you'd like to setup SMTP, we need a bit more sensitive data. This includes your SMTP password, S3 backup credentials, and restic repo password.

You have two options. You can:

  • respond to a one-time prompt for these credentials (one-time per cluster)
  • export an environment variable

Environment Variables

You can export the following env vars and we'll use them for your sensitive data:

  • PEERTUBE_SMTP_PASSWORD
  • PEERTUBE_S3_BACKUP_ACCESS_ID
  • PEERTUBE_S3_BACKUP_SECRET_KEY
  • PEERTUBE_RESTIC_REPO_PASSWORD

Example Config

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
apps:
  peertube:
    description: |
       [link=https://joinpeertube.org/]PeerTube[/link] is an open source self hosted video hosting platform, similar to YouTube.

       smol-k8s-lab supports initializing peertube, by setting up your hostname, SMTP credentials, admin credentials, valkey credentials, postgresql credentials, and an admin user credentials. We pass all credentials as Secrets in the namespace and optionally save them to Bitwarden.

       smol-k8s-lab also creates a local s3 endpoint and as well as S3 bucket and credentials if you enable set peertube.argo.secret_keys.s3_provider to "minio" or "seaweedfs". Both seaweedfs and minio require you to specify a remote s3 endpoint, bucket, region, and accessID/secretKey so that we can make sure you have remote backups.

       To provide sensitive values via environment variables to smol-k8s-lab use:
         - PEERTUBE_SMTP_PASSWORD
         - PEERTUBE_S3_BACKUP_ACCESS_ID
         - PEERTUBE_S3_BACKUP_SECRET_KEY
         - PEERTUBE_RESTIC_REPO_PASSWORD
         - PEERTUBE_ADMIN_PASSWORD
    enabled: false
    init:
      enabled: true
      restore:
        enabled: false
        cnpg_restore: true
        restic_snapshot_ids:
          # seaweedfs_master: latest
          seaweedfs_volume: latest
          seaweedfs_filer: latest
          peertube_data: latest
      values:
        # admin user
        admin_user: "peeradmin"
        # admin user's email
        admin_email: ""
        # mail server to send verification and notification emails
        smtp_host: "change-me-to-enable.mail"
        # mail user for smtp host
        smtp_user: "change me to enable mail"
        # mail user for smtp host
        smtp_port: "change me to enable mail"
        smtp_password:
          value_from:
            env: PEERTUBE_SMTP_PASSWORD
    backups:
      # cronjob syntax schedule to run peertube pvc backups
      pvc_schedule: 10 0 * * *
      # cronjob syntax (with SECONDS field) for peertube postgres backups
      # must happen at least 10 minutes before pvc backups, to avoid corruption
      # due to missing files. This is because the backup shows as completed before
      # it actually is
      postgres_schedule: 0 0 0 * * *
      s3:
        # these are for pushing remote backups of your local s3 storage, for speed and cost optimization
        endpoint: ""
        bucket: ""
        region: ""
        secret_access_key:
          value_from:
            env: PEERTUBE_S3_BACKUP_SECRET_KEY
        access_key_id:
          value_from:
            env: PEERTUBE_S3_BACKUP_ACCESS_ID
      restic_repo_password:
        value_from:
          env: PEERTUBE_RESTIC_REPO_PASSWORD
    argo:
      # secrets keys to make available to Argo CD ApplicationSets
      secret_keys:
        # you can delete these if you're not using tolerations/affinity
        toleration_key: ""
        toleration_operator: ""
        toleration_value: ""
        toleration_effect: ""
        # these are for node affinity, delete if not in use
        affinity_key: ""
        affinity_value: ""
        # admin email for your peertube instance
        admin_email: ""
        # hostname that users go to in the browser
        hostname: ""
        # set the local s3 provider for peertube's public data in one bucket
        # and private database backups in another. can be minio or seaweedfs
        s3_provider: seaweedfs
        # how large the backing pvc's capacity should be for minio or seaweedfs
        s3_pvc_capacity: 120Gi
        # main local s3 endpoint for postgresql backups, backed up constantly
        s3_endpoint: ""
        # region for s3 endpoint and buckets
        s3_region: eu-west-1
        # s3 bucket for storing orig videos (cannot be path based, must be dns)
        s3_orig_video_bucket: ""
        # s3 bucket for storing web videos (cannot be path based, must be dns)
        s3_web_video_bucket: ""
        # s3 bucket for storing streaming playlists (cannot be path based, must be dns)
        s3_streaming_bucket: ""
        # s3 bucket for storing user exports (cannot be path based, must be dns)
        s3_user_exports_bucket: ""
        # enable persistence for valkey - recommended
        valkey_pvc_enabled: 'true'
        # size of valkey pvc storage
        valkey_storage: 3Gi
        valkey_storage_class: local-path
        valkey_access_mode: ReadWriteOnce
        # enable a pvc for peertube
        data_pvc_enabled: "true"
        # size of the pvc for peertube
        data_storage: "10Gi"
        # access mode for the peertube storage
        data_access_mode: "ReadWriteOnce"
      # git repo to install the Argo CD app from
      repo: https://github.com/small-hack/argocd-apps
      # path in the argo repo to point to. Trailing slash very important!
      # you can also use peertube/app_of_apps_with_tolerations/ if you have a
      # special peertube node you want to apply affinity and tolerations for
      path: peertube/app_of_apps/
      # either the branch or tag to point at in the argo repo above
      revision: main
      # kubernetes cluster to install the k8s app into, defaults to Argo CD default
      cluster: https://kubernetes.default.svc
      # namespace to install the k8s app in
      namespace: peertube
      # recurse directories in the git repo
      directory_recursion: false
      # source repos for Argo CD App Project (in addition to argo.repo)
      project:
        name: peertube
        # depending on if you use seaweedfs or minio, you can remove the other source repo
        source_repos:
          - registry-1.docker.io
          - https://small-hack.github.io/cloudnative-pg-cluster-chart
          - https://operator.min.io/
          - https://seaweedfs.github.io/seaweedfs/helm
          - https://small-hack.github.io/peertube-helm-chart
        destination:
          # automatically includes the app's namespace and argocd's namespace
          namespaces: []