SeaweedFS Evaluation — Evaluation-Only Storage Service
Purpose
SeaweedFS is deployed here as an evaluation-only storage service alongside MinIO. It exists to validate SeaweedFS as a possible replacement candidate without changing existing MinIO-backed workloads or the repository’s migration posture. The evaluation deployment provides an all-in-one SeaweedFS stack on the IO primary host so the repository can test endpoint shape, proxy integration, and service behaviour in a realistic environment while keeping the current MinIO setup intact.
Entry Point
- Main entry file:
modules/nixos/server/storage/seaweedfs/default.nix - Supporting file:
modules/nixos/server/storage/default.nix - Component files:
modules/nixos/server/storage/seaweedfs/{master,volume,filer,admin,worker,proxy,security,s3,tmpfiles,lib,options}.nix
Architecture / Services / Scope
- Evaluation only: this deployment does not replace MinIO and does not perform any migration.
- IO primary only: the module is gated by
config.server.ioPrimaryHost == config.networking.hostName. - All-in-one topology: the evaluation enables the SeaweedFS master, volume, filer, S3 endpoint, admin UI, and worker components on the coordinator host.
- Proxy surface: endpoints are exposed through the existing
server.proxy.virtualHostsintegration instead of host-local Caddy configuration. Current surface includes the master UI, filer, S3-compatible, volume, and admin endpoints under theseaweedfs.${data.site.domain}subtree. The master is served onmaster.seaweedfs.${data.site.domain}withseaweedfs.${data.site.domain}kept as an alias. Client-facing TLS terminates at Caddy; gRPC-backed component endpoints additionally get the backend transport settings required for SeaweedFS communication. - Master HTTP API stays on loopback: the master HTTP server is enabled because the admin UI reads volume
PublicUrlfrom the master’s/dir/status. Without it the admin falls back to the registeredip:portof every volume server. The API binds127.0.0.1; the publicmaster.seaweedfs.${data.site.domain}vhost requires Kanidm, and internal components use gRPC. - Operator auth: admin and filer require Kanidm, and the master UI and volume UI are gated by path.
All four share the
seaweedfsKanidm context, which is restricted tosysadmin@auth.racci.devand uses one shared portal with theseaweedfs.${data.site.domain}cookie domain, so a login on any of them covers the rest. The S3 endpoint uses S3 SigV4/IAM rather than Kanidm and exposes a*.s3.seaweedfs.${data.site.domain}alias for virtual-hosted-style requests. The worker is not exposed through Caddy. - gRPC client restriction:
security.tomlsetsallowed_commonNamesper gRPC service. These allowlists apply to direct gRPC peers; Caddy re-originates gRPC connections using each component’s own certificate. - Option surface: the module keeps the upstream
services.seaweedfs.*namespace. This repository now vendors the module locally and extends it with repo-specific options, includingservices.seaweedfs.volume.publicUrlandextraArgson all component services.
S3 identities
Identities and their IAM policies are declared under services.seaweedfs.filer.s3:
services.seaweedfs.filer.s3 = {
policies.attic = {
Version = "2012-10-17";
Statement = [
{
Effect = "Allow";
Action = [ "s3:ListBucket" "s3:GetBucketLocation" ];
Resource = "arn:aws:s3:::attic";
}
{
Effect = "Allow";
Action = [ "s3:GetObject" "s3:PutObject" "s3:DeleteObject" ];
Resource = "arn:aws:s3:::attic/*";
}
];
};
identities.attic.policies = [ "attic" ];
};
services.seaweedfs.filer.s3.config is the freeform S3 configuration document.
The identities and policies options are rendered into it, and any other key passes through unchanged.
Identity and policy lists are concatenated, and a name declared both ways is rejected.
Policy attribute names are the policy names identities reference, and the identity name is the S3 user name.
An identity reads S3/<NAME>_ACCESS_KEY and S3/<NAME>_SECRET_KEY from SOPS and passes them to the filer as
S3_<NAME>_ACCESS_KEY and S3_<NAME>_SECRET_KEY through a rendered environment file.
accessKeySecret, accessKeyEnv, and the secretKey equivalents override those names,
while accessKey and secretKey take a literal value instead of a reference.
Buckets
Buckets are created by a seaweedfs-s3-init oneshot, keyed by bucket name:
services.seaweedfs.filer.s3.buckets.attic = {
owner = "attic";
versioning = "Enabled"; # optional
quotaMB = 51200; # optional
};
The owner is recorded on the bucket, which is what lets that identity reach it;
a bucket with no owner is only reachable by admin identities.
withLock = true enables S3 Object Lock, which also enables versioning and blocks suspending it.
versioning sets the versioning status, and quotaMB records a bucket quota.
Quota values are recorded only.
Turning an exceeded quota into a read-only bucket is a separate s3.bucket.quota.enforce pass, which this module does not schedule.
Everything else a bucket can carry, such as lifecycle rules, tags, CORS, encryption, ACLs, and bucket policies, lives in S3 API state rather than in filer directory metadata managed here. Those stay with the S3 client or the admin UI, and are not reconciled at boot.
The unit runs after the master and filer, feeds every bucket command in one shell session, and treats already exists as success, so it is safe on every boot.
Secrets
SeaweedFS SOPS entries are separate from MinIO secrets and are used for:
- mTLS between Caddy and SeaweedFS components
- JWT-based inter-component authentication inside SeaweedFS
These entries live under the SEAWEEDFS secret tree on the IO primary host and include both JWT material
and TLS certificates/keys for the SeaweedFS component set.
TLS trust chain
SeaweedFS TLS material uses the shared offline Fleet mTLS Root CA and a dedicated SeaweedFS Intermediate CA:
Fleet mTLS Root CA
└── SeaweedFS Intermediate CA
└── master, volume, filer, admin, client, worker leaves
SEAWEEDFS/TLS/CA is a PEM trust bundle that every component trusts.
It predates the Fleet rollout, so it carries the original flat SeaweedFS CA alongside the Fleet mTLS Root CA.
--force-ca reissues it as the Fleet root plus the SeaweedFS intermediate.
TLS material is stored as binary SOPS files under hosts/server/nixio/seaweedfs-tls/: CA, <SERVICE>_CRT, and <SERVICE>_KEY.
Each SEAWEEDFS/TLS/<SERVICE>_CRT value is a chain ordered leaf first, then the SeaweedFS intermediate.
Leaves use both serverAuth and clientAuth because the same component certificate is used as a gRPC server and client certificate.
The root and intermediate private keys are kept offline.
The CA hierarchy, key custody, issuance, and rotation are documented in Internal mTLS CA.
Component SANs must match the Caddy tls_server_name values: master.seaweedfs.${data.site.domain} for the master,
and <service>.seaweedfs.${data.site.domain} for volume, filer, and admin.
The master leaf also carries seaweedfs.${data.site.domain}, which stays a vhost alias for the pre-rename hostname.
data.site.domain is the configured proxy domain.
Provisioning certificates
Leaves are issued by provision-seaweedfs-certs, which reads the Fleet root and the SeaweedFS intermediate from a KeePassXC vault:
provision-seaweedfs-certs --vault pki.kdbx --vault-password-file vault-pass
It writes the CA bundle (root plus intermediate) and one <SERVICE>_CRT/<SERVICE>_KEY pair per component,
each chain ordered leaf first then intermediate, and encrypts all of them as binary SOPS files.
Components default to master, volume, filer, admin, client, and worker.
Pass component names to limit a run and --force to rotate them, so --force master reissues only the master leaf.
That is the rotation that adds the master.seaweedfs.${data.site.domain} SAN.
A leaf rotation never rewrites CA; it changes only when --force-ca is passed.
Use --dry-run to print the planned SAN sets without writing anything.
Operational Notes / Assumptions
- Volume data plane stays open: only
/ui/*and/statuson the volume vhost require authentication. Chunk reads by file ID and thepublicUrlpath used by the filer remain unauthenticated, which is why the volume cannot sit fully behind Kanidm. - The evaluation deployment is separate from
server.storage.swfsMount. The storage abstraction can useweed mountfor SeaweedFS-backed workload mounts without changing the evaluation topology described here. services.seaweedfs.volume.publicUrlshould match the external proxy hostname so volume servers advertise reachable URLs. The admin UI links each volume server at//<publicUrl>/ui/index.html, so it must be a host without a scheme.- The admin and worker components use the
SEAWEEDFS/SECURITY/ADMINsecurity template, which carries both the master signing keys and the filer signing key. The admin UI’s Users and Groups pages call the filer IAM gRPC API, which only accepts admin Bearer tokens signed byjwt.filer_signing.key. The same key also gates the admin’s own worker and plugin gRPC servers, so the worker holds it too and signs its calls. - This deployment is intended to shake out integration details first; repository-local abstractions can be added later if SeaweedFS proves to be a good fit.