gotosocial

by 0hlov3

Helm chartv2.1.5App 0.22.3

A Helm chart for Kubernetes to Deploy GoToSocial

About this chart

GoToSocial HELM Chart

This Helm chart deploys GoToSocial, a lightweight and privacy-focused social network server. It provides customization options for persistence, database configuration, and scaling.

⚠️ Important Warning

If PostgreSQL or external database is not enabled, SQLite is used by default. In this scenario, it is critical to back up your instance key before recreating the pod, as the instance key is tied to the database. Failure to do so may result in data loss and federation issues.

Upgrade to chart 2.1.5 — GoToSocial 0.22.3

Updates GoToSocial from 0.22.2 to 0.22.3, fixing remote-account impersonation and updating the Go runtime's certificate trust handling. Upstream reports no configuration changes or database migrations from 0.22.x. Back up the database before upgrading. Upgrades from versions before 0.22.0 must follow the 0.22.0 migration instructions. Do not downgrade a main/snapshot installation to this release.

See the 0.22.3 release notes.

Breaking Changes

v2.0.0 — Probe behavior changed (GoToSocial 0.21.0)

Before upgrading to chart version 1.4.0, disable all health probes.

GoToSocial 0.21.0 may run long-running database migrations on first boot. If Kubernetes probes are active during the upgrade, the pod can be killed before migrations finish, leaving the database in an inconsistent state.

Step 1 — Upgrade with probes disabled:

helm upgrade gotosocial schoenwald/gotosocial \
  --set startupProbe.enabled=false \
  --set livenessProbe.enabled=false \
  --set readinessProbe.enabled=false

Step 2 — Wait until the pod is Running and migrations are complete, then re-enable the probes:

helm upgrade gotosocial schoenwald/gotosocial \
  --set startupProbe.enabled=true \
  --set livenessProbe.enabled=true \
  --set readinessProbe.enabled=true

The enabled flag on each probe is new in this chart version. All three probes default to enabled: true. If you manage probes via a custom values.yaml, add the enabled key to each probe block.


Deployment Steps

Create Namespace

kubectl create ns gts-test

Create a PostgreSQL-Secret

kubectl create secret generic gts-postgresql-secret \
  --from-literal="password=$(openssl rand -hex 32)" \
  --from-literal="postgres-password=$(openssl rand -hex 32)" \
  -n gts-test

Deploy Helm Chart

helm repo add schoenwald https://charts.schoenwald.aero
helm repo update schoenwald
helm upgrade --install gotosocial schoenwald/gotosocial \
  --namespace gotosocial --create-namespace \
  --set gotosocial.config.host='domain.tld' \
  --set gotosocial.config.accountDomain='domain.tld'

Create First User

kubectl exec -ti $CONTAINER_ID -- /gotosocial/gotosocial --config-path /config/config.yaml admin account create --username $USERNAME --email $USER_EMAIL --password $USER_PASS
kubectl exec -ti $CONTAINER_ID -- /gotosocial/gotosocial --config-path /config/config.yaml admin account confirm --username $USERNAME
kubectl exec -ti $CONTAINER_ID -- /gotosocial/gotosocial --config-path /config/config.yaml admin account promote --username $USERNAME

Known Limitations

Rate Limiting

If your GoToSocial instance frequently exceeds rate limits, it may be due to NAT or load balancers that do not preserve client IPs. In such cases, all incoming requests are seen as originating from the same IP, causing rate limiting issues. For detailed information, refer to the official documentation.

Solution

  1. Preserve Source IPs (Kubernetes):
    When using a LoadBalancer or NodePort service type, set externalTrafficPolicy to Local in your Service specification to preserve client IPs:

    apiVersion: v1
    kind: Service
    metadata:
      name: gotosocial
    spec:
      type: LoadBalancer
      externalTrafficPolicy: Local
    
  2. Disable Rate Limiting (if IP preservation is not possible): If client IPs cannot be preserved due to NAT, disable rate limiting by adding the following to your Helm values:

    gotosocial:
      extraConfig:
        advanced-rate-limit-requests: 0
    

Parameters

GoToSocial parameters

NameDescriptionValue
image.registryGoToSocial image registrydocker.io
image.repositoryGoToSocial image repositorysuperseriousbusiness/gotosocial
image.pullPolicyGoToSocial image pull policyAlways
imagePullSecretsGoToSocial image pull secrets[]
gotosocial.strategy.typeGoToSocial deployment strategy type, should be Recreate if ReadWriteMany not enabled.Recreate
gotosocial.persistence.enabledEnable persistence using a PersistentVolumeClaimfalse
gotosocial.persistence.accessModePersistent Volume Access ModesReadWriteOnce
gotosocial.persistence.sizePersistent Volume Size10Gi
gotosocial.persistence.existingClaimuse an existing persistent volume claim instead of creating one""
gotosocial.tmpfs.enabledEnable tmpfs using an emptyDirfalse
gotosocial.tmpfs.sizeemptyDir Size1Gi
gotosocial.extraEnvadditional environment variables to pass to the gotosocial deployment[]
gotosocial.extraVolumesadditional volumes to pass to the gotosocial deployment[]
gotosocial.extraVolumeMountsadditional volume mounts to pass to the gotosocial deployment[]
gotosocial.config.applicationNameApplication name to use internally.gotosocial
gotosocial.config.hostHostname that this server will be reachable at.""
gotosocial.config.accountDomainDomain to use when federating profiles.""
gotosocial.config.protocolProtocol over which the server is reachable from the outside world.https
gotosocial.config.bindAddressAddress to bind the GoToSocial server to.0.0.0.0
gotosocial.config.trustedProxiesArray of string. CIDRs or IP addresses of proxies that should be trusted when determining real client IP from behind a reverse proxy.["::1","10.0.0.0/8","172.16.0.0/12","192.168.0.0/16"]
gotosocial.config.db.maxOpenConnsMultiplierNumber to multiply by CPU count to set permitted total of open database connections (in-use and idle).8
gotosocial.config.db.cache.memoryTargetcache.memory-target sets a target limit that the application will try to keep it's caches within.100MiB
gotosocial.config.storage.backendType of storage backend to use.local
gotosocial.config.storage.localBasePathDirectory to use as a base path for storing files./gotosocial/storage
gotosocial.config.storage.s3.enabledEnables s3 support in Configfalse
gotosocial.config.storage.s3.endpointAPI endpoint of the S3 compatible service.""
gotosocial.config.storage.s3.proxySet this to true if data stored in S3 should be proxied through GoToSocial instead of forwarding the request to a presigned URL.false
gotosocial.config.storage.s3.useSSLUse SSL for S3 connections.true
gotosocial.config.storage.s3.accessKeyAccess key part of the S3 credentials.""
gotosocial.config.storage.s3.secretKeySecret key part of the S3 credentials.""
gotosocial.config.storage.s3.existingSecretIf this is set, accessKey, secretKey will not take place, Needs the S3_ACCESS_KEY_ID and S3_SECRET_ACCESS_KEY keys.""
gotosocial.config.storage.s3.bucketName of the storage bucket.""
gotosocial.config.oidc.enabledEnable authentication with external OIDC provider.false
gotosocial.config.oidc.idpNameName of the oidc idp (identity provider). This will be shown to users when they log in.""
gotosocial.config.oidc.skipVerificationSkip the normal verification flow of tokens returned from the OIDC prov

Deploy gotosocial with OpenTenant

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