Skip to main content

Overview

FusionAuth is a modern, self-hosted identity and access management platform that provides user authentication, authorization, and secure single sign-on. It supports OAuth2, OpenID Connect, and SAML. This template deploys FusionAuth with a PostgreSQL database that is automatically configured and connected — no manual database setup required.

What Gets Created

  • FusionAuth Workload — The main identity platform with configurable CPU and memory.
  • PostgreSQL Workload — The backing database, automatically connected to FusionAuth on startup.
  • Volume Set — Persistent storage for PostgreSQL data, with optional autoscaling.
  • Backup Cron Job (optional) — A scheduled job that dumps the PostgreSQL database to an S3 or GCS bucket when postgres.backup.enabled is true.
  • Secrets — An opaque PostgreSQL credentials secret, and a startup script secret that waits for database readiness before launching FusionAuth.
  • Identity & Policy — An identity bound to the workloads with reveal access to the PostgreSQL credentials and startup script secrets. When backup is enabled, the identity also provides the backup cron job with access to the configured object storage bucket.
This template does not create a GVC. You must deploy it into an existing GVC.

Prerequisites

Prerequisites are only required if you plan to enable PostgreSQL backups (postgres.backup.enabled: true). Skip this section if backups are not needed.

AWS S3

  1. Create an S3 bucket. Set postgres.backup.aws.bucket and postgres.backup.aws.region in your values file.
  2. If you do not have a Control Plane Cloud Account set up, follow the Create a Cloud Account guide. Set postgres.backup.aws.cloudAccountName to the name of your Cloud Account.
  3. Create an IAM policy with the following JSON, replacing YOUR_BUCKET_NAME:
  1. Set postgres.backup.aws.policyName to the name of the policy created in step 3.

GCS

  1. Create a GCS bucket. Set postgres.backup.gcp.bucket in your values file.
  2. If you do not have a Control Plane Cloud Account set up, follow the Create a Cloud Account guide. Set postgres.backup.gcp.cloudAccountName to the name of your Cloud Account.
  3. Add the Storage Admin role to the GCP service account associated with the Cloud Account.

Installation

To install, follow the instructions for your preferred method:

UI

Browse, install, and manage templates visually

CLI

Manage templates from your terminal

Terraform

Declare templates in your Terraform configurations
Pulumi Icon Streamline Icon: https://streamlinehq.com

Pulumi

Declare templates in your Pulumi programs

Configuration

The default values.yaml for this template:

FusionAuth Resources

  • resources.cpu / resources.memory — CPU and memory allocated to the FusionAuth workload.

Firewall

  • firewall.external.inboundAllowCIDR — CIDR ranges allowed to reach FusionAuth from the internet (default: 0.0.0.0/0).
  • firewall.external.outboundAllowCIDR — CIDR ranges FusionAuth is allowed to reach externally. Empty by default. Set to 0.0.0.0/0 (or a specific CIDR) if FusionAuth needs to communicate with an external Identity Provider such as Google OAuth.
  • firewall.internal.type — Controls which internal workloads can reach FusionAuth (same-gvc, same-org, or workload-list).

PostgreSQL

  • postgres.config.username / postgres.config.password — Database credentials. Change before deploying to production.
  • postgres.config.database — Name of the database created on startup.
These values are only applied on first startup when the data directory is empty. Updating them after the initial deployment will have no effect on the running database. To change credentials or the database name on an existing instance, use PostgreSQL’s native commands (e.g. ALTER USER, ALTER DATABASE).
  • postgres.resources — Min/max CPU and memory bounds for the PostgreSQL workload.
  • postgres.internalAccess.type — Controls which workloads can reach PostgreSQL. Set to none to isolate replicas from each other, or use same-gvc, same-org, or workload-list.

PostgreSQL Storage

  • postgres.volumeset.capacity — Initial volume size in GiB (minimum 10).
  • postgres.volumeset.autoscaling.enabled — Automatically expand the volume as it fills. When enabled:
    • maxCapacity — Maximum volume size in GiB.
    • minFreePercentage — Trigger a scale-up when free space drops below this percentage.
    • scalingFactor — Multiply the current capacity by this factor when scaling up.

PostgreSQL Backup

Set postgres.backup.enabled: true to enable scheduled database dumps to object storage. The backup image tag corresponds to the PostgreSQL version (18.1.0 for Postgres 18, 17.1.0 for Postgres 17). Set postgres.backup.provider to aws or gcp and fill in the corresponding section. The prefix field controls the folder path within the bucket where backups are stored.

Restoring a Backup

To restore from a backup, run the following from a client with access to the bucket: AWS S3
GCS

Post-Deployment Setup

After deployment, open the FusionAuth admin panel to complete setup:
  1. Use the setup wizard to create your application.
  2. Configure your application with the origin, redirect, and logout URLs for your code.
  3. Set the tenant issuer to match your deployment URL (e.g., my-fusionauth-app.io).
  4. If using an external Identity Provider, configure it in the admin panel and ensure firewall.external.outboundAllowCIDR allows traffic to the IdP.

External References

FusionAuth Documentation

Official FusionAuth documentation

OAuth2 & OpenID Connect

FusionAuth OAuth2 and OpenID Connect guide

Cloud Accounts

Create a Control Plane Cloud Account for backup storage access

Backup Image Source

Source code for the PostgreSQL backup container image

FusionAuth Template

View the source files, default values, and chart definition