gotosocial
by 0hlov3
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
-
Preserve Source IPs (Kubernetes):
When using aLoadBalancerorNodePortservice type, setexternalTrafficPolicytoLocalin your Service specification to preserve client IPs:apiVersion: v1 kind: Service metadata: name: gotosocial spec: type: LoadBalancer externalTrafficPolicy: Local -
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
| Name | Description | Value |
|---|---|---|
image.registry | GoToSocial image registry | docker.io |
image.repository | GoToSocial image repository | superseriousbusiness/gotosocial |
image.pullPolicy | GoToSocial image pull policy | Always |
imagePullSecrets | GoToSocial image pull secrets | [] |
gotosocial.strategy.type | GoToSocial deployment strategy type, should be Recreate if ReadWriteMany not enabled. | Recreate |
gotosocial.persistence.enabled | Enable persistence using a PersistentVolumeClaim | false |
gotosocial.persistence.accessMode | Persistent Volume Access Modes | ReadWriteOnce |
gotosocial.persistence.size | Persistent Volume Size | 10Gi |
gotosocial.persistence.existingClaim | use an existing persistent volume claim instead of creating one | "" |
gotosocial.tmpfs.enabled | Enable tmpfs using an emptyDir | false |
gotosocial.tmpfs.size | emptyDir Size | 1Gi |
gotosocial.extraEnv | additional environment variables to pass to the gotosocial deployment | [] |
gotosocial.extraVolumes | additional volumes to pass to the gotosocial deployment | [] |
gotosocial.extraVolumeMounts | additional volume mounts to pass to the gotosocial deployment | [] |
gotosocial.config.applicationName | Application name to use internally. | gotosocial |
gotosocial.config.host | Hostname that this server will be reachable at. | "" |
gotosocial.config.accountDomain | Domain to use when federating profiles. | "" |
gotosocial.config.protocol | Protocol over which the server is reachable from the outside world. | https |
gotosocial.config.bindAddress | Address to bind the GoToSocial server to. | 0.0.0.0 |
gotosocial.config.trustedProxies | Array 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.maxOpenConnsMultiplier | Number to multiply by CPU count to set permitted total of open database connections (in-use and idle). | 8 |
gotosocial.config.db.cache.memoryTarget | cache.memory-target sets a target limit that the application will try to keep it's caches within. | 100MiB |
gotosocial.config.storage.backend | Type of storage backend to use. | local |
gotosocial.config.storage.localBasePath | Directory to use as a base path for storing files. | /gotosocial/storage |
gotosocial.config.storage.s3.enabled | Enables s3 support in Config | false |
gotosocial.config.storage.s3.endpoint | API endpoint of the S3 compatible service. | "" |
gotosocial.config.storage.s3.proxy | Set 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.useSSL | Use SSL for S3 connections. | true |
gotosocial.config.storage.s3.accessKey | Access key part of the S3 credentials. | "" |
gotosocial.config.storage.s3.secretKey | Secret key part of the S3 credentials. | "" |
gotosocial.config.storage.s3.existingSecret | If 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.bucket | Name of the storage bucket. | "" |
gotosocial.config.oidc.enabled | Enable authentication with external OIDC provider. | false |
gotosocial.config.oidc.idpName | Name of the oidc idp (identity provider). This will be shown to users when they log in. | "" |
gotosocial.config.oidc.skipVerification | Skip 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.
- Pick a serverConnect Hetzner, OVHcloud or AWS. The builder starts on Hetzner, the cheapest sample rate.
- Place the chartgotosocial is pinned at v2.1.5 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