2026-07-11 22:48:52 +08:00
2026-07-11 22:48:52 +08:00
2026-07-11 21:49:04 +08:00
2026-07-11 21:49:04 +08:00
2026-07-11 21:49:04 +08:00
2022-12-11 11:07:38 +08:00
2026-07-11 21:49:04 +08:00
2026-07-11 22:48:52 +08:00
2026-07-11 22:48:52 +08:00
2023-11-15 23:23:53 +08:00
2026-07-11 13:55:08 +00:00

FileCodeBox

FileCodeBox

A self-hosted file locker that works out of the box

Share files and text anonymously. No account required—just enter a passcode.

Live Demo · Documentation · Quick Start · 简体中文

Release Docker Pulls License Stars

docker run -d --restart unless-stopped -p 12345:12345 -v ./data:/app/data --name filecodebox lanol/filecodebox:2.5.0 # x-release-please-version
Open http://localhost:12345, complete first-run setup, and start sharing.

FileCodeBox dark retrieval screen

Why FileCodeBox

Effortless sharing

No account system. Upload content, get a passcode, and let the recipient download the file or read the text.

Self-hosting first

Run everything in one Docker container. Your data and configuration stay on infrastructure you control.

Built for real workloads

Batch, chunked, and presigned uploads with expiration policies, capacity limits, an admin console, and multiple storage backends.

Highlights

Sharing Administration & security Storage & delivery
Unified file and text sharing Secure first-run setup Local filesystem
Drag, paste, and batch upload Admin sessions and access control S3-compatible storage
Random or custom passcodes Upload and passcode rate limits OneDrive and WebDAV
Time, count, or permanent expiry Automatic cleanup and quotas OpenDAL integrations
Chunked upload and resume File and storage health views Multi-architecture Docker images
Responsive UI and dark mode Chinese and English admin UI Reverse-proxy friendly

Product Preview

FileCodeBox file sharing FileCodeBox admin dashboard
A focused flow for sending files and text A dashboard built around file health and storage policy
See more screens
File management System settings
Admin login Mobile file management

Mobile retrieval   Mobile sharing   Mobile admin

The active theme lives in FileCodeBoxFronted. Image builds automatically use the latest commit from its default branch.

Quick Start

Docker Compose

services:
  filecodebox:
    image: lanol/filecodebox:2.5.0 # x-release-please-version
    container_name: filecodebox
    restart: unless-stopped
    ports:
      - "12345:12345"
    volumes:
      - ./data:/app/data
docker compose up -d

Pin a version in production for reliable rollbacks. latest tracks the newest stable release; edge-* identifies development images from master.

Run from source

git clone https://github.com/vastsa/FileCodeBox.git
cd FileCodeBox
pip install -r requirements.txt
python main.py

The default URL is http://localhost:12345. Follow the first-run flow to create the administrator password.

Reverse proxy

Nginx example
location / {
    proxy_pass http://127.0.0.1:12345;
    proxy_set_header Host $host;
    proxy_set_header X-Real-IP $remote_addr;
    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
    proxy_set_header X-Forwarded-Proto $scheme;
    client_max_body_size 100m;
}

How It Works

Action Flow
Share files Select or drop files → choose expiry → receive a passcode
Share text Enter text → choose expiry → receive a passcode
Retrieve content Enter a passcode → read text or download files
Manage the service Open /#/admin → inspect files, metrics, and settings

Uploads also work from the command line:

curl -X POST "http://localhost:12345/share/file/" \
  -F "file=@/path/to/file.txt" \
  -F "expire_value=1" \
  -F "expire_style=day"

For complete API, chunk upload, and storage configuration details, see:

Architecture

Browser / CLI
      │
      ▼
FastAPI · Uvicorn
      │
      ├── SQLite · Tortoise ORM
      ├── Local / S3 / OneDrive / WebDAV / OpenDAL
      └── Vue 3 · Vite frontend
Layer Technology
API FastAPI · Pydantic · Uvicorn
Data SQLite · Tortoise ORM
Async I/O aiofiles · aiohttp · aioboto3
Frontend Vue 3 · TypeScript · Vite · Tailwind CSS
Delivery Docker · GitHub Actions · VitePress

Development

# Backend
pip install -r requirements.txt
python main.py

# Tests
python -m pytest tests

The frontend is maintained in FileCodeBoxFronted:

pnpm install
pnpm dev

FAQ

How do I back up or migrate the service?

Stop the service and back up the entire data directory. It contains the database, runtime configuration, and locally stored files.

How do I change the upload size?

Update the upload limit in the admin console. If you use Nginx, a CDN, or another gateway, update its request body limit as well.

Which storage backends are supported?

Local, S3, OneDrive, WebDAV, and OpenDAL are built in. See the storage guide for configuration details.

Contributing

Issues, feature ideas, and pull requests are welcome. Use clear Conventional Commits when contributing code:

fix: resolve file download issue
feat: add a storage adapter

License

FileCodeBox is released under LGPL-3.0. Use it in accordance with applicable laws and retain the project URL and copyright notice.

If FileCodeBox helps you, consider leaving a Star.

Made by vastsa

S
Description
文件快递柜-匿名口令分享文本,文件,像拿快递一样取文件(FileCodeBox - File Express Cabinet - Anonymous Passcode Sharing Text, Files, Like Taking Express Delivery for Files)
Readme
34 MiB
0 Stars 1 Watchers 0 Forks
Languages
Python 99.4%
Dockerfile 0.6%