Quickstart
Run with Docker
This starts two services:
- api – PutFS on a unix socket (internal, not exposed)
- nginx – reverse proxy on port 8000 (exposed)
The storage root defaults to ./data and is configured via the PUTFS_ROOT environment variable.
Set up auth key
Create a keys file at ./keys/keys.conf:
map "$http_x_api_key:$http_x_api_secret" $key_ok {
default 0;
"putfs_demo:demo" 1;
}
map "$http_x_api_key:$request_method:$uri" $auth_ok {
default 0;
"~^putfs_demo:[^:]+:/.+" 1;
}
Then reload nginx: docker compose exec nginx nginx -s reload
See Auth for key scoping by path and method.
Usage
The examples below show the same operations across the three supported clients. The CLI and Python clients pick up PUTFS_ENDPOINT_URL, PUTFS_API_KEY, and PUTFS_API_SECRET from the environment:
export PUTFS_ENDPOINT_URL=http://localhost:8000
export PUTFS_API_KEY=putfs_demo
export PUTFS_API_SECRET=demo
Upload
Download
List
Delete
For the full HTTP spec, see HTTP. For the CLI and Python clients, see CLI and Python.
How requests flow
Nginx serves files directly from the data volume for reads. Writes, deletes, and listing go through the PutFS API upstream.
client -> nginx
|-- GET static file -> serve from /data (fast path)
`-- PUT/DELETE/LIST -> proxy to PutFS API
Install from PyPI
If you prefer running without Docker:
Then run with granian:
See granian tuning.