Simple, lightweight file server with live monitoring, resumable downloads, rotating logs, a local IP blacklist, and optional Cloudflare Tunnel for easy sharing.
Current version: v1.2.2
- Zero-config startup
- Clean HTML index listing with direct links to files
- Resumable/partial downloads (HTTP Range support)
- Live console monitor: per-download speed, global upload speed, total uploaded, and recent log tail
- Rotating access logs (size-based with backups)
- Simple IP blacklist with localhost-only admin endpoints
- GET
/admin/blacklist?action=add&ip=1.2.3.4(oraction=remove) from 127.0.0.1 only - GET
/admin/logsto downloadaccess.logfrom 127.0.0.1 only
- GET
- YAML configuration file (
server_config.yml) - Built-in helper to start a Cloudflare Tunnel and print the public HTTPS URL
- Python 3.8+
- Cloudflare Tunnel (cloudflared) installed and on PATH
Run setup.bat to automatically install cloudflared and Python dependencies.
For users who don't want to install Python, Download the compiled program from Releases
pip install -r requirements.txt- Run the script from anywhere.
- Navigate to your documents folder
\Documents\63xkyFileServer\filesand place your files here. (or see path in console logs) - Go to the console and open the cloudflare URL & let anyone download your files at uncapped speeds.
python fileserver.pyOn Windows you can also double-click run_server.bat.
When the server starts, the console monitor will appear and, if cloudflared is available, a public tunnel URL (https://...) will be logged.
By default the server listens on 127.0.0.1 and chooses a free port. Open the printed URL or visit http://127.0.0.1:<port>/ locally. Use Cloudflare Tunnel to share externally.
Place a server_config.yml next to fileserver.py to customize settings. All fields are optional; sensible defaults are used if missing.
Example:
# Pick a specific port (set to null or remove to auto-pick a free one)
port: null
# Bind address
listen_host: 127.0.0.1
# Where to read files from
files_dir: files
# Logging
log_file: access.log
max_log_size: 5242880 # 5 MB
backup_count: 3
# Blacklist storage
blacklist_file: blacklist.txt
# Monitor behavior
monitor_interval: 1 # seconds
log_tail_lines: 10
# Cloudflare tunnel name (optional label)
tunnel_name: fileshareNotes:
- The server writes rotating logs to
access.logand shows the tail in the console monitor. - Admin endpoints are restricted to localhost for safety.
- To serve over your LAN, set
listen_host: 0.0.0.0and ensure your firewall allows inbound traffic.
- GET
http://127.0.0.1:<port>/admin/blacklist?action=add&ip=1.2.3.4- Use
action=removeto unblock an IP.
- Use
- GET
http://127.0.0.1:<port>/admin/logsto download the log file.
- Cloudflared not found / tunnel doesn’t start: install
cloudflaredand ensure it’s on PATH, then try again. - 403 on admin routes: they are only accessible from 127.0.0.1/::1.
- Can’t reach the server externally: the default bind is localhost. Use Cloudflare Tunnel or change
listen_hostto0.0.0.0and expose the chosen port.