Laravel Go has been released, and its File Storage ships an S3 disk implemented in the framework itself, without the AWS SDK. The S3 disk supports request signing, multipart uploads and presigned URLs. To try presigned URLs or multipart uploads locally you need an S3-compatible server, and the usual answer, MinIO, went into maintenance mode and its repository has been archived since Apr 2026.
I built S2, a small S3-compatible server written in Go, so I pointed Laravel Go at it. This post shows the setup, and the evidence that it works: laravel/go-framework's own S3 integration tests, run unmodified against S2 Server.
For local development, S2 Server's main draw is its size: the mojatter/s2-server image is about 4 MB (compressed, linux/amd64, as of 2026-12-05; for comparison Garage is about 28 MB, VersityGW 38 MB, RustFS 139 MB, SeaweedFS 297 MB and LocalStack 356 MB). The difference adds up when CI pulls the image on every run. It is MIT-licensed, and objects are stored as plain files on disk.
Start S2 Server
One service in docker-compose.yml. The S3 API listens on :9000 and the web console on :9001, the same ports as MinIO.
services: s2: image: mojatter/s2-server:0.40.1 ports: - "9000:9000" # S3 API - "9001:9001" # Web console environment: S2_SERVER_USER: myuser S2_SERVER_PASSWORD: mypassword S2_SERVER_BUCKETS: assets S2_SERVER_DOMAINS: localhost volumes: - s2-data:/var/lib/s2 volumes: s2-data: docker compose up -d S2_SERVER_DOMAINS turns on virtual-hosted style (more below); path-style requests keep working with it set.
Configure your Laravel Go app
Set the File Storage variables in your app's .env:
FILESYSTEM_DISK=s3 AWS_ACCESS_KEY_ID=myuser AWS_SECRET_ACCESS_KEY=mypassword AWS_DEFAULT_REGION=us-east-1 AWS_BUCKET=assets AWS_ENDPOINT=http://127.0.0.1:9000 AWS_USE_PATH_STYLE_ENDPOINT=true Note that the starter's .env.example has no AWS_ENDPOINT or AWS_URL lines (as of 2026-12-05). go-framework reads both, so add them yourself.
Watch out: presigned URLs use the endpoint host
If your app also runs inside compose with AWS_ENDPOINT=http://s2:9000, the URLs from TemporaryURL and TemporaryUploadURL are signed for host s2, which a browser cannot reach. AWS_URL only changes public URLs; it does not change the host of presigned URLs. If you hand presigned URLs to a browser, use an endpoint the browser can reach too, for example by running the app on the host.
Virtual-hosted style (Laravel Go's default)
Laravel Go defaults to AWS_USE_PATH_STYLE_ENDPOINT=false, which puts the bucket in the host name (assets.localhost:9000). S2 Server handles this when it knows its domain, which the compose file above already sets with S2_SERVER_DOMAINS: localhost. Support arrived in v0.40.0; use v0.40.1 or later. In .env, switch off path style and point the endpoint at localhost:
AWS_ENDPOINT=http://localhost:9000 AWS_USE_PATH_STYLE_ENDPOINT=false On macOS, *.localhost resolves to loopback with no extra setup. On Linux, depending on your resolver, you may need this line in /etc/hosts:
127.0.0.1 assets.localhost /etc/hosts has no wildcards, so you need one line per bucket. To run the virtual-hosted test below, also add 127.0.0.1 laravel.localhost.
For everyday local development, path style (AWS_USE_PATH_STYLE_ENDPOINT=true) avoids host-name resolution entirely; use virtual-hosted style when you want to exercise Laravel Go's default.
Does it actually work?
go-framework's S3 integration tests (path style)
go-framework's CI runs its S3 integration tests against MinIO. I ran the same tests, unmodified, against the S2 Server started above. The tests read the credentials from the URL, so myuser / mypassword work as well as CI's minio / password. The tests create the laravel bucket themselves.
# go-framework's go.mod requires Go 1.27 git clone -b 0.x https://github.com/laravel/go-framework.git cd go-framework LARAVEL_TEST_S3_URL=http://myuser:mypassword@127.0.0.1:9000/laravel \ go test ./storage/ -v PASS ok go.laravel.com/storage 0.918s - Top-level tests: 21 pass, 0 fail, 1 skip. The skip is the Laravel Cloud test, which needs Cloud credentials and skips against MinIO too.
- Covered: reads and writes, 17 MiB streaming (multipart), copy and move, presigned GET and PUT (lifetimes over 7 days are rejected client-side).
| Item | Value |
|---|---|
| Date | 2026-12-05 |
| S2 Server | mojatter/s2-server:0.40.1 |
| go-framework | 0.x, commit a2dc513db9fcd7bb95bd33e20d10d541d5208804 |
Virtual-hosted style
go-framework's test helper always uses path style, so for virtual-hosted style I wrote a small test that uses the same storage package with PathStyle: false:
- S2 Server: the compose service above, which already sets
S2_SERVER_DOMAINS: localhost - Client:
myuser/mypassword, regionus-east-1, bucketlaravel, endpointhttp://localhost:9000, loaded throughconfig.FromEnv. Requests go tolaravel.localhost:9000 - Name resolution: macOS's
*.localhost; no hosts entries, no proxy
--- PASS: TestS2VirtualHostedStyle (0.17s) --- PASS: TestS2VirtualHostedStyle/CreateBucket (0.01s) --- PASS: TestS2VirtualHostedStyle/PutGetNoSlashKey (0.00s) --- PASS: TestS2VirtualHostedStyle/ZeroBytePutNoSlashKey (0.00s) --- PASS: TestS2VirtualHostedStyle/PutGetSlashKey (0.00s) --- PASS: TestS2VirtualHostedStyle/List (0.00s) --- PASS: TestS2VirtualHostedStyle/CopyMoveDelete (0.01s) --- PASS: TestS2VirtualHostedStyle/PresignedGetAndPut (0.01s) --- PASS: TestS2VirtualHostedStyle/StreamingLargeFile17MiB (0.13s) PASS ok go.laravel.com/storage 0.592s Keys without a slash (hello.txt) and zero-byte objects land in the laravel bucket as objects, not as stray buckets.
Limitations
- S2 Server is v0.x and single-node. Versioning, server-side encryption, lifecycle rules and replication are not implemented.
- Minor releases may change the Go API and occasionally the on-disk layout. Pin the image tag as above and check docs/upgrading.md before upgrading.
- This setup is plain HTTP for local development. Do not expose it.
- The virtual-hosted check is my own test on top of go-framework's
storagepackage, not the upstream suite, and it relies on macOS resolving*.localhost.
Wrapping up
For Laravel Go's S3 disk, one S2 Server service in compose replaces MinIO for local development. go-framework's S3 integration tests pass against it unmodified in path style, and Laravel Go's default virtual-hosted style works with S2_SERVER_DOMAINS (v0.40.1 or later recommended).
- S2: https://github.com/mojatter/s2
- Coming from MinIO: Migrating from MinIO
- Japanese version of this post: Zenn
