JuliusBrussee/caveman · error

objectstore: S3_ENDPOINT is required in production

Error message

objectstore: S3_ENDPOINT is required in production

What it means

Error "objectstore: S3_ENDPOINT is required in production" thrown in JuliusBrussee/caveman.

Source

Thrown at shared/platform/objectstore/objectstore.go:147

	AccessKey string
	SecretKey string
	Region    string
	UseSSL    bool
}

// FromEnv builds a Store from the S3_* environment variables. It returns
// (nil, nil) when S3_ENDPOINT is unset outside production. Production requires
// object storage because retention, replay, and artifact offload must not
// silently disable themselves after launch.
//
// Credential vars accept both the repo's names (S3_ACCESS_KEY/S3_SECRET_KEY)
// and the AWS-conventional names (S3_ACCESS_KEY_ID/S3_SECRET_ACCESS_KEY). TLS is
// inferred from the endpoint scheme (https) unless S3_USE_SSL forces it.
func FromEnv() (Store, error) {
	endpoint := env.String("S3_ENDPOINT", "")
	if endpoint == "" {
		if env.IsProduction() {
			return nil, errors.New("objectstore: S3_ENDPOINT is required in production")
		}
		return nil, nil
	}
	production := env.IsProduction()
	bucketFallback := "caveman-local"
	if production {
		bucketFallback = ""
	}
	access := env.String("S3_ACCESS_KEY", env.String("S3_ACCESS_KEY_ID", ""))
	secret := env.String("S3_SECRET_KEY", env.String("S3_SECRET_ACCESS_KEY", ""))
	useSSL := strings.HasPrefix(endpoint, "https://") || env.Bool("S3_USE_SSL", false)
	cfg := Config{
		Endpoint:  endpoint,
		Bucket:    env.String("S3_BUCKET", bucketFallback),
		AccessKey: access,
		SecretKey: secret,
		Region:    env.String("S3_REGION", "us-east-1"),
		UseSSL:    useSSL,

View on GitHub (pinned to 27d5a3981a)

Solutions

  1. Set S3_ENDPOINT in production.

When it happens

Trigger: Thrown at shared/platform/objectstore/objectstore.go:147 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of JuliusBrussee/caveman@27d5a3981a (2026-08-15). Data as JSON: /api/errors/6687a68d8372383e. Report an issue: GitHub.