No description
- Go 96.8%
- Just 3.2%
| .github/workflows | Create release.yml | |
| vedro | update copyright | |
| justfile | replace make with just (+amend) | |
| LICENSE | update readme and license | |
| README.md | update readme and license | |
vedro
vedro is a simple, self-contained S3-like object storage written in Go. Built for local use — no cloud dependencies, no databases required.
⚠️ Not recommended for large-scale production, but works great for:
- Local artifact storage
- Simple CI/CD pipelines
- Debugging and local development
- Temporary S3 stubs
Features
- S3-compatible interface (ListBucket, GetObject)
- ETag, Last-Modified, and If-Modified-Since support
- S3-standard XML responses
- Lightweight HTTP server
- Path traversal protection
- Logging and panic recovery middleware
Configuration
Defaults are defined in config/config.go and can be overridden via CLI flags at runtime:
| Flag | Default | Description |
|---|---|---|
-addr |
:8080 |
Server listen address |
-root |
/var/vedra |
Root directory containing buckets |
-log |
true |
Enable request logging to stdout |
-recover |
true |
Enable panic recovery middleware |
-v |
— | Print version and exit |
-c |
— | Print current configuration |
Example:
./vedrod -addr :9000 -root /data/buckets -log=false
Usage
1. Build
go build -o vedrod .
2. Prepare directory structure
/var/vedra/
├── bucket1/
│ ├── file1.txt
│ └── image.png
└── bucket2/
└── report.pdf
3. Run
./vedrod
Example requests
List bucket objects (S3 ListBucket)
GET http://localhost:8080/bucket1
Response (XML):
<ListBucketResult>
<Name>bucket1</Name>
<Contents>
<Key>file1.txt</Key>
<LastModified>2025年04月18日T17:42:18Z</LastModified>
<Size>123</Size>
<ETag>...</ETag>
</Contents>
</ListBucketResult>
Download an object (S3 GetObject)
GET http://localhost:8080/bucket1/file1.txt
Notes
- Does not support Multipart Upload, ACL, PUT/DELETE, presigned URLs, etc.
- Assumes all data is available locally on disk.
- MIME types are detected automatically via
http.DetectContentType. - No caching — reads directly from disk on every request.