mirror of
https://github.com/vastsa/FileCodeBox.git
synced 2026-11-20 13:29:56 +08:00
- deps: pin uvloop 0.23.0 (non-Windows marker) and httptools 0.9.0; uvicorn's --loop/--http auto picks both up. Lockfile regenerated with constraints so only these two packages are added (no transitive version drift). - Dockerfile: expose TIMEOUT_KEEP_ALIVE (default 5, passed to uvicorn) and MALLOC_TRIM_THRESHOLD_=65536 so glibc returns freed heap to the OS after large transfers. Defaults keep previous behaviour. - ci: allow `; marker` pins in the lockfile drift check, otherwise uvloop would be silently skipped and never verified. - docs: document both environment variables (zh/en). - tests: pin the Dockerfile/requirements/lockfile runtime contract.
3.0 KiB
3.0 KiB
Getting Started
Introduction
FileCodeBox is a simple and efficient file sharing tool that supports temporary file transfer, sharing, and management. This guide will help you quickly deploy and use FileCodeBox.
Features
- 🚀 Quick Deployment: Support Docker one-click deployment
- 🔒 Secure & Reliable: File access requires extraction code
- ⏱️ Time Control: Support setting file expiration time
- 📊 Download Limit: Can limit file download times
- 🖼️ File Preview: Support preview of images, videos, audio, and other formats
- 📱 Responsive Design: Perfect adaptation for mobile and desktop
Deployment Methods
Docker Deployment (Recommended)
docker run -d --restart unless-stopped \
-p 12345:12345 \
-v fcb-data:/app/data \
-e APP_ENV=production \
-e LOG_LEVEL=warning \
--log-opt max-size=10m \
--log-opt max-file=3 \
--name filecodebox \
lanol/filecodebox:latest
The named volume persists configuration and uploaded files across container upgrades.
| Variable | Default | Description |
|---|---|---|
HOST |
0.0.0.0 |
Service listening address |
PORT |
12345 |
Service port |
WORKERS |
1 |
Worker count; keep one worker for SQLite deployments |
APP_ENV |
production (Docker) |
Runtime environment; production disables HTTP access logs by default |
LOG_LEVEL |
warning (Docker) |
debug, info, warning, or error |
ACCESS_LOG |
false (production) |
Enable HTTP access logs; set to true when debugging requests |
TIMEOUT_KEEP_ALIVE |
5 |
HTTP Keep-Alive idle timeout in seconds; raise it behind a reverse proxy to reduce reconnects |
MALLOC_TRIM_THRESHOLD_ |
65536 |
glibc heap trim threshold in bytes; lowers resident memory after large transfers (glibc images only) |
Production deployments output only warning, error, and other key events by default. Docker retains at most three 10 MB log files.
Manual Deployment
- Clone the repository
git clone https://github.com/vastsa/FileCodeBox.git
- Install dependencies
cd FileCodeBox
pip install -r requirements.txt
- Start the service
python main.py
Usage
-
Access the System Open browser and visit
http://localhost:12345 -
Upload Files
- Click upload button or drag files to upload area
- Set file expiration time and download limit
- Get share link and extraction code
-
Download Files
- Visit share link
- Enter extraction code
- Download file
-
Admin Panel
- Open
http://localhost:12345on first run and complete setup - Visit
http://localhost:12345/#/admin - Enter the admin password set during setup
- Enter admin panel
- View system information, files, activity records, and configuration
- Open
Next Steps
- Storage Configuration - Learn how to configure different storage methods
- Security Settings - Learn how to enhance system security
- API Documentation - Learn how to integrate through API