840

LumbungFS is a premium, developer-focused, self-hosted object storage and file-serving platform. It is designed to act as an intelligent gateway for your files, offering dynamic, on-the-fly file compression and encryption, granular routing rules, origin validation, and a beautiful integrated admin dashboard.
Run the container using the official image on Docker Hub:
docker run -d \
--name lumbung-fs \
-p 8080:8080 \
-v $(pwd)/bucket:/app/bucket \
-e WEB_DASHBOARD_ORIGIN="http://localhost:5173" \
-e USERNAME="admin" \
-e PASSWORD="your-secure-password" \
jefriherditriyanto/lumbung-fs:latest
Create a docker-compose.yml file for simple orchestrations:
version: "3.8"
services:
lumbung-fs:
image: jefriherditriyanto/lumbung-fs:latest
container_name: lumbung-fs
ports:
- "8080:8080"
volumes:
- ./bucket:/app/bucket
environment:
- WEB_DASHBOARD_ORIGIN=http://localhost:5173
- USERNAME=admin
- PASSWORD=your-secure-password
restart: unless-stopped
| Variable | Required | Default | Description |
|---|---|---|---|
WEB_DASHBOARD_ORIGIN | Yes | — | The exact URL of the dashboard frontend (e.g. http://localhost:5173). Standard API requests are strictly blocked if they do not originate from this domain. |
USERNAME | No | admin | Custom admin username. Replaces the default admin credentials. |
PASSWORD | No | 123456 | Custom admin password. Replaces default admin credentials. |
LumbungFS supports a secure two-step presigned token upload flow. This allows backend servers to pre-authorize uploads and lets client applications upload files directly to storage without exposing the primary API key.
Send a POST request to the /upload/prepare endpoint using the origin's API Key. Specify the target path in the JSON request body:
curl --location 'https://cdn.yourdomain.com/upload/prepare' \
--header 'X-API-Key: lf_019ef210485c704c90b1ae5a95e56d5c' \
--header 'Content-Type: application/json' \
--data '{"path": "test"}'
Response:
{
"expires_at": "2026-06-24T00:11:14.466463605Z",
"path": "test",
"presigned_url": "https://cdn.yourdomain.com/upload?token=019ef6f6-9042-76ab-88be-5daae16057d7",
"token": "019ef6f6-9042-76ab-88be-5daae16057d7"
}
You can upload the file in one of two ways using the token generated in Step 1:
Perform a multipart POST request to the /upload endpoint with the token as a query parameter and the file attached:
curl --location 'https://cdn.yourdomain.com/upload?token=019ef6f6-9042-76ab-88be-5daae16057d7' \
--form 'file=@"/Users/jefripunza/Documents/LumbungFS.png"'
Response:
{
"filename": "019ef6f6-99d8-7e34-a279-5cc1d3dd9731.png",
"message": "File uploaded successfully",
"path": "cdn_yourdomain_com/test/019ef6f6-99d8-7e34-a279-5cc1d3dd9731.png",
"size": 69868,
"url": "https://cdn.yourdomain.com/file/test/019ef6f6-99d8-7e34-a279-5cc1d3dd9731.png"
}
If you open the presigned_url directly in your web browser (e.g., https://cdn.yourdomain.com/upload?token=019ef6f6-9042-76ab-88be-5daae16057d7), it will serve a beautiful, responsive, self-contained HTML uploader page. Users can drag and drop or select a file to upload directly from their browser.
The container exposes two primary directories for persistent storage:
/app/bucket: Stores all raw and encrypted assets sorted by registered origins snake_case domain names.Make sure to mount these directories to local volumes to avoid data loss on container recreation.
LumbungFS is released under the MIT License. Developed and maintained by Jefri Herdi Triyanto.
Content type
Image
Digest
sha256:cc059e0ee…
Size
42.3 MB
Last updated
3 months ago
docker pull jefriherditriyanto/lumbung-fs