floci

by QuenchWorks

Helm chartv0.2.34App 2.5.0MITVerified publisher

Floci, the self-hosted, LocalStack-compatible local AWS emulator (Quarkus). This chart ships ONLY the in-process services (S3, DynamoDB, SQS, SNS, IAM) that run nonroot without a Docker socket; the Docker-backed services (Lambda, RDS, ECS, EKS, ...) are out of scope. Hardened by QuenchWorks as a minimal, nonroot, CVE-gated image, cosign-signed and pinned by digest.

About this chart

Quenchworks Floci

Hardened Floci, a self-hosted, LocalStack-compatible local AWS emulator built on Quarkus, on a minimal, nonroot, CVE-gated image pinned by digest and cosign-signed (keyless / Sigstore).

Install

helm install floci oci://ghcr.io/quenchworks/charts/floci

Floci runs nonroot (uid 1001) on a read-only root filesystem. It is configured entirely through environment variables; no config file is needed. Point any AWS SDK or CLI at the Service endpoint on port 4566 (LocalStack-compatible):

kubectl port-forward svc/floci 4566:4566
curl http://127.0.0.1:4566/_floci/health
aws --endpoint-url http://127.0.0.1:4566 s3 mb s3://demo

Verify the image

cosign verify ghcr.io/quenchworks/images/floci \
  --certificate-identity-regexp 'https://github.com/quenchworks/.+' \
  --certificate-oidc-issuer https://token.actions.githubusercontent.com

Each build also ships an SPDX SBOM and SLSA provenance attestation. Verify them with gh attestation verify oci://ghcr.io/quenchworks/images/floci --owner quenchworks.

Values

ValueDefaultNotes
image.repositoryghcr.io/quenchworks/images/floci
image.tag1.5.33Reference only; the pod pulls by digest.
image.digest(CI-maintained)Signed multi-arch index (hardened image). Pinned by digest, never a tag.
image.pullPolicyIfNotPresentAlways, IfNotPresent, or Never.
replicaCount1Keep at 1 with in-process storage.
floci.modehardenedhardened (nonroot) or full (root + host docker.sock).
floci.full.acknowledgeRiskfalseMust be true for mode=full or the chart refuses to render.
floci.full.image.repositoryghcr.io/quenchworks/images/floci-fullOnly used when mode=full.
floci.full.image.digest(pinned)Signed multi-arch floci-full index.
floci.port4566Edge/API + health port.
floci.defaultRegionus-east-1FLOCI_DEFAULT_REGION.
floci.defaultAccountId"000000000000"FLOCI_DEFAULT_ACCOUNT_ID.
floci.localstackParityfalseLOCALSTACK_PARITY.
floci.storage.modememoryFLOCI_STORAGE_MODE (memory, persistent, hybrid, wal).
floci.storage.path/dataFLOCI_STORAGE_PERSISTENT_PATH (PVC mount).
persistence.enabledfalseMount a PVC at floci.storage.path.
persistence.size8Gi
persistence.storageClass""Default class if unset.
persistence.accessModes["ReadWriteOnce"]PVC access modes.
resources.requestscpu 250m / mem 512Mi
resources.limitscpu 1 / mem 1Gi
service.typeClusterIPClusterIP, NodePort, or LoadBalancer.
service.port4566
tls.enabledfalsethe edge port serves HTTPS only (Quarkus PEM pair at /tls), no plain listener
tls.existingSecret""a kubernetes.io/tls Secret to use (1st choice)
tls.certManager.enabledfalserequest a cert-manager Certificate from tls.certManager.issuerRef (2nd choice)
tls.selfSigned.validityDays365otherwise Helm generates a CA + certificate, kept across upgrades
autoscaling.enabledfalseKeep off with in-process storage (each replica keeps its own state).
extraEnvVars[]Extra FLOCI_* env (e.g. per-service config).
serviceAccount.createtrueToken automount is off.
rbac.createfalseMinimal Role/RoleBinding.
networkPolicy.enabledtrueIngress restricted to the namespace by default.
networkPolicy.allowExternalfalseSet true to allow ingress from any source.
podDisruptionBudget.enabledfalse
ingress.enabledfalseCreate an Ingress for this chart. HTTP only.
ingress.className""IngressClass to claim it. Empty leaves it unset, so the cluster default applies.
ingress.annotations{}Controller annotations (rewrite targets, body size, cert-manager issuer, ...).
ingress.servicePortnullBackend port. Unset resolves service.port, then service.ports.http / .https.
ingress.hosts[]e.g. [{host: app.example.com}]. A host with no paths gets a single / Prefix path.
ingress.tls[]Standard Ingress TLS list, e.g. [{hosts: [app.example.com], secretName: app-tls}].

Plus the shared quench-common knobs (scheduling, probes, sidecars, init containers, extra env/volumes, security contexts, update strategy).

Architecture

Floci holds all in-process state in memory by default (FLOCI_STORAGE_MODE=memory), so the chart deploys a stateless Deployment with no volume. State is lost on restart, which is fine for ephemeral dev/test. Liveness and readiness both hit GET /_floci/health on the edge port (4566); it returns HTTP 200 with JSON {"services":{...}} once the in-process services are ready.

Hardened scope: in-process services (55 of 65)

Floci emulates 65 AWS services. 55 of them run entirely inside the single nonroot Java process with no external dependencies, and this chart supports all 55, including:

S3, DynamoDB, SQS, SNS, SES, IAM, STS, KMS, Secrets Manager, SSM Parameter Store, API Gateway, Cognito, Kinesis, CloudFormation, Step Functions, EventBridge (plus Pipes and Scheduler), CloudWatch, CloudTrail, Config, Route53, CloudFront, Cloud Map, ACM, Glue, Athena, Data Firehose, ELBv2, Auto Scaling, AWS Batch, WAF v2, AppConfig, AppSync, Bedrock Runtime, CodeDeploy, CodePipeline, AWS Backup, and Transfer Family.

The other 10 services spin up real containers and require the host Docker socket (/var/run/docker.sock) plus root: Lambda, RDS, ElastiCache, MSK, ECS, EKS, OpenSearch, ECR, DocumentDB, Neptune. That is incompatible with this hardened image (nonroot uid 1001, no Docker socket, read-only root filesystem), so they are out of scope for this chart. Do not mount the Docker socket into the pod. If you need the Docker-backed services, run Floci on a Docker host outside Kubernetes or use full mode below.

LocalStack API parity is disabled (LOCALSTACK_PARITY=false); clients still target Floci's own LocalStack-wire-compatible endpoint on port 4566 for the in-process services above.

Storage and persistence

To keep state across restarts on a single replica, enable the PVC and switch the storage mode:

floci.storage.modeBehaviour
memoryAll state in RAM, lost on restart (default; no volume).
persistentFlush every write to disk.
hybridAsync flush (~5s) to disk.
walWrite-ahead log for durability.

Any mode other than memory requires persistence.enabled: true, since the root filesystem is read-only and a writable volume must be mounted at floci.storage.path. This is best-effort single-replica durability, not a scale-out mechanism: each replica keeps its own disjoint state behind the Service, so keep replicaCount: 1 (and autoscaling.enabled: false) whenever you rely on Floci's own storage.

Full mode (opt-in, not hardened)

The chart has a second, deliberately non-hardened mode for when you need the 10 Docker-backed services. floci.mode=full swaps the hardened image for the separate floci-full image and reconfigures the pod so those services work:

  • Runs the pod as root (runAsNonRoot: false, runAsUser: 0).
  • Disables the read-only root filesystem (readOnlyRootFilesystem: false).
  • Bind-mounts the host Docker socket /var/run/docker.sock into the pod (a hostPath volume) so Floci can drive the Docker daemon directly.
  • Sets LOCALSTACK_PARITY=true.

This enables all 65 services: everything in hardened mode plus the 10 Docker-backed ones (Lambda, RDS, ElastiCache, MSK, ECS, EKS, OpenSearch, ECR, DocumentDB, Neptune).

Security warning

Full mode is not hardened. It runs as root and mounts the host Docker socket, a node-root / container-escape surface: any code in the pod can control the node's Docker daemon and effectively owns the node. Do not use full mode on shared or multi-tenant clusters. It is an opt-in developer/CI convenience only.

Because of that, full mode requires an explicit acknowledgement or the chart refuses to render:

helm install floci oci://ghcr.io/quenchworks/charts/floci \
  --set floci.mode=full \
  --set floci.full.acknowledgeRisk=true

Omitting floci.full.acknowledgeRisk=true (its default is false) makes helm template/helm install fail with a message explaining the risk. To go back to the safe default, set floci.mode=hardened (or drop the overrides).

Configuration examples

Single-replica persistent storage:

persistence:
  enabled: true
  size: 8Gi
floci:
  storage:
    mode: persistent # or hybrid / wal
    path: /data

Pin a region and pass per-service config through env:

floci:
  defaultRegion: eu-west-1
extraEnvVars:
  - name: FLOCI_SERVICES_S3_PORT
    value: "4566"

Uninstall

helm uninstall floci

A PVC provisioned when persistence.enabled=true is retained by Kubernetes on uninstall; delete it explicitly if you want the data gone:

kubectl delete pvc -l app.kubernetes.io/instance=floci

Notes

The default memory mode is ephemeral; keep replicaCount: 1 whenever you rely on Floci's own storage. Full mode is an opt-in, non-hardened developer/CI convenience only. The chart depends on the quench-common library chart, pulled from oci://ghcr.io/quenchworks/charts/quench-common. In the default hardened mode the container runs nonroot on a read-only root filesystem with all capabilities dropped, and the image is pinned by digest.

Deploy floci with OpenTenant

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