A minimalist, secure, and ephemeral file transfer hub.
For a premium, instant VPS or Linux workstation installation, just copy and execute this single command:
curl -sSfL https://raw.githubusercontent.com/alivedou/FileExpress/v2/fe.sh -o fe.sh && chmod +x fe.sh && ./fe.shIf curl is not installed, try wget:
wget -qO fe.sh https://raw.githubusercontent.com/alivedou/FileExpress/v2/fe.sh && chmod +x fe.sh && ./fe.shThis script will guide you to configure environment, manage and run the application daemon cleanly!
VPS (via GHCR pre-built image):
docker pull ghcr.io/alivedou/fileexpress:latest
docker run -d --name file-express --restart always \
-p 3000:3000 \
-e PORT=3000 \
-v fileexpress_data:/app/local_storage \
ghcr.io/alivedou/fileexpress:latestOr use the all-in-one management script:
curl -sSfL https://raw.githubusercontent.com/alivedou/FileExpress/v2/fe.sh -o fe.sh
chmod +x fe.sh && ./fe.shContainer Platforms (Railway / DCDeploy / Render / Fly.io):
Just connect your GitHub repository — the platform auto-detects the Dockerfile and injects PORT. Zero manual configuration needed. All other variables (storage limits, encryption key, etc.) come with safe defaults.
1. Install Node.js (Version 22 LTS or 24 Current Recommended)
Option A: Via NVM (Recommended)
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.7/install.sh | bash
source ~/.bashrc # or restart your terminal
nvm install 22
nvm use 22Option B: Direct Installation (Ubuntu/Debian)
curl -fsSL https://deb.nodesource.com/setup_22.x | sudo -E bash -
sudo apt-get install -y nodejs2. Clone Repository
git clone https://github.com/alivedou/FileExpress.git
cd FileExpress3. Install Dependencies & Build
npm install
npm run build4. Run Application & Configuration
Make the script executable and run the interactive CLI menu:
chmod +x fe.sh
./fe.shConfiguration (
FEMenu /.envfile): File Express can be customized through the CLI menu or directly by editing the.envfile. Important variables include:
PORT: Custom port for the server (default3000).MAX_STORAGE_HOURS: The maximum allowed duration for private files (default24hours). Change this value to allow longer ephemeral storage.MAX_DOWNLOADS: The maximum allowed extraction count for private files (default100times).MAX_TOTAL_STORAGE_MB: Overall max disk usage to prevent system overload.
5. Uninstall Application
To permanently remove the application, all stored files, and its background processes, use the built-in self-destruct option:
./fe.sh
# Select option: 6. 高级选项 (Advanced Options)
# Select option: 2. 完全干净卸载整个应用 (Clean Uninstall)
# Type CONFIRMAlternatively, you can manually stop the process and delete the directory if needed.
6. Deployment Guide
You can easily deploy File Express in various robust environments:
- Local & WSL: Works perfectly out of the box using
./fe.sh. You can also enter the Advanced Options to install a globalfealias, allowing you to evoke the panel from anywhere securely. - VPS Server (Public Node): Ideal for a 24/7 public file hub. Utilize the "Background Running" option (Option 4) in the
FEmenu to smoothly daemonize the service on your cloud instance. - Cloudflare Tunnel (Zero Trust): Highly recommended for exposing the service without opening firewall ports. Simply install
cloudflaredon your WSL or VPS and tunnel the localhttp://localhost:<PORT>securely to your custom domain.
| Mechanism | Detail |
|---|---|
| IP-based throttle | Max 20 uploads/IP/hour across all 3 upload routes (public, private, batch) |
| Map memory guard | 10,000 entry cap + 5-min stale cleanup + 24h full reset |
| Download dedup | 2s window per IP per file to prevent mobile pre-fetch miscount |
| Mechanism | Detail |
|---|---|
| Disk fuse | Rejects upload with 503 when partition usage exceeds 80% |
| Quota enforcement | Auto-purges expired files when total exceeds 90% of MAX_TOTAL_STORAGE_MB |
| File size bounds | Single file ≤10MB, ZIP ≤50MB (configurable via .env) |
| TTL cache | Disk check & storage stats cached for 30s to prevent repetitive I/O |
| Mechanism | Detail |
|---|---|
| AES-256-GCM | Private files encrypted at rest, decrypted on extraction |
| Burn-after-read | Files physically destroyed when download cap or expiry is reached |
| XSS protection | React auto-escapes all user input |
| Command injection | Zero eval/exec/shell paths for user-supplied content |
| Mechanism | Detail |
|---|---|
| Public mode | .txt only, enforced server-side + frontend accept attribute |
| Private mode | Extension whitelist: images, docs, archives |
Q: Styles are missing or WebSocket errors in production?
A: This usually happens if the application is running in "Development Mode" on a public server.
- Run
npm run buildto generate the production bundle. - Run the application using
./fe.shor ensureNODE_ENV=productionis set. - If styles still fail, the
base: './'relative path (configured in V2.5.0) will handle sub-directory or proxy-path issues.
Q: Google Fonts resetting connection?
A: In regions like Mainland China, Google service access is blocked. File Express V2.5.0 uses the fonts.loli.net mirror by default to ensure stability.