2025-02-12 11:29:22 +08:00
# 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
2026-07-12 00:08:34 +08:00
### Docker Deployment (Recommended)
2025-02-12 11:29:22 +08:00
```bash
2026-07-12 00:08:34 +08:00
docker run -d --restart unless-stopped \
-p 12345:12345 \
-v fcb-data:/app/data \
2026-09-01 23:56:08 +08:00
-e APP_ENV = production \
-e LOG_LEVEL = warning \
--log-opt max-size= 10m \
--log-opt max-file= 3 \
2026-07-12 00:08:34 +08:00
--name filecodebox \
lanol/filecodebox:latest
2025-02-12 11:29:22 +08:00
```
2026-07-12 00:08:34 +08:00
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 |
2026-09-01 23:56:08 +08:00
| `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 |
2026-10-23 10:53:01 +00:00
| `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) |
2026-09-01 23:56:08 +08:00
Production deployments output only warning, error, and other key events by default. Docker retains at most three 10 MB log files.
2026-07-12 00:08:34 +08:00
2025-02-12 11:29:22 +08:00
### Manual Deployment
2025-02-12 15:12:22 +08:00
1. Clone the repository
2025-02-12 11:29:22 +08:00
```bash
git clone https://github.com/vastsa/FileCodeBox.git
```
2. Install dependencies
```bash
2025-02-12 15:12:22 +08:00
cd FileCodeBox
2025-02-12 11:29:22 +08:00
pip install -r requirements.txt
```
2025-02-12 15:12:22 +08:00
3. Start the service
2025-02-12 11:29:22 +08:00
```bash
python main.py
```
## Usage
1. Access the System
Open browser and visit `http://localhost:12345`
2. Upload Files
- Click upload button or drag files to upload area
- Set file expiration time and download limit
- Get share link and extraction code
3. Download Files
- Visit share link
- Enter extraction code
- Download file
4. Admin Panel
2026-06-16 00:49:43 +08:00
- Open `http://localhost:12345` on first run and complete setup
2025-02-12 15:12:22 +08:00
- Visit `http://localhost:12345/#/admin`
2026-06-16 00:49:43 +08:00
- Enter the admin password set during setup
2025-02-12 11:29:22 +08:00
- Enter admin panel
2026-07-12 00:08:34 +08:00
- View system information, files, activity records, and configuration
2025-02-12 11:29:22 +08:00
## Next Steps
- [Storage Configuration ](/en/guide/storage ) - Learn how to configure different storage methods
- [Security Settings ](/en/guide/security ) - Learn how to enhance system security
2026-06-16 00:49:43 +08:00
- [API Documentation ](/en/api/ ) - Learn how to integrate through API