From github.com/scottlaird: This replaces github.com/jszwec/s3fs/v2 with kelindar/s3. This will have slightly different performance characteristics, but should implement range requests properly. This means that using caddy.fs.s3 to stream large video files won't result in (mostly) full-file reads for each chunk read by the client.
Find a file
2025-11-01 19:27:05 -07:00
.dagger build: update dev env 2025-09-26 19:58:27 +02:00
.github Merge pull request #536 from sagikazarmark/dependabot/github_actions/actions/dependency-review-action-4.7.3 2025-09-26 20:14:30 +02:00
.editorconfig chore: dev and build env updates 2025-09-26 19:46:19 +02:00
.envrc chore: dev and build env updates 2025-09-26 19:46:19 +02:00
.gitignore chore: dev and build env updates 2025-09-26 19:46:19 +02:00
.golangci.yaml ci: add linter config 2025-04-15 21:03:08 +02:00
Caddyfile feat: update all dependencies 2024-06-01 22:57:21 +02:00
dagger.json build: update dev env 2025-09-26 19:58:27 +02:00
devenv.lock chore: dev and build env updates 2025-09-26 19:46:19 +02:00
devenv.nix chore: dev and build env updates 2025-09-26 19:46:19 +02:00
devenv.yaml chore: dev and build env updates 2025-09-26 19:46:19 +02:00
docker-compose.yaml chore: dev and build env updates 2025-09-26 19:46:19 +02:00
go.mod Update module name 2025-11-01 19:27:05 -07:00
go.sum Try using kelindar/s3 instead of jszwec/s3fs/v3 2025-10-31 20:29:52 -07:00
justfile ci: daggerize project 2025-04-15 20:58:02 +02:00
LICENSE initial commit 2022-10-01 16:15:23 +02:00
module.go Try using kelindar/s3 instead of jszwec/s3fs/v3 2025-10-31 20:29:52 -07:00
module.go~ Try using kelindar/s3 instead of jszwec/s3fs/v3 2025-10-31 20:29:52 -07:00
README.md chore: update caddy 2025-04-24 00:18:59 +02:00

Caddy FS module for AWS S3

GitHub Workflow Status Caddy Version GitHub go.mod Go version OpenSSF Scorecard

Installation

Build Caddy using xcaddy:

xcaddy build --with github.com/sagikazarmark/caddy-fs-s3

Usage

{
	filesystem my-s3-fs s3 {
		bucket mybucket
		region us-east-1

		# endpoint <endpoint>
		# profile <profile>
		# use_path_style
	}
}

example.com {
    file_server {
        fs my-s3-fs
    }
}

Note

For a full parameter reference, check out the module documentation page.

Authentication

The module uses the AWS SDK default credential chain to find valid credentials.

The easiest way to try the module is setting static credentials either in your AWS credentials file or as environment variables:

export AWS_ACCESS_KEY_ID=...
export AWS_SECRET_ACCESS_KEY=...

Caddy will pick up the credentials automatically.

Development

For an optimal developer experience, it is recommended to install Nix and direnv.

Run Caddy with the following command:

just run up --ports 8080:80

When all coding and testing is done, please run the test suite:

just check

License

The project is licensed under the MIT License.