FileStation is a production-ready, ultra-lightweight web server that turns any Linux directory into a beautiful, secure, and modern file management interface. With zero external dependencies (just standard Python 3), you can instantly deploy a premium file server anywhere.
- Single-File Architecture: The entire backend, frontend HTML, CSS, and vanilla JS are packed into a single
server.pyfile. Just drop it and run. - Resumable Chunked Uploads: Upload massive files (5GB+ ISOs/videos). Internet blipped? Just drag the file back in and it resumes instantly from where it left off.
- Folder Drag-and-Drop: Drag entire nested folder trees directly from your desktop into the browser. FileStation recursively reads them and recreates the exact structure on your server.
- Rich Media Previews: Natively streams videos and audio. Renders Markdown (
.md) files beautifully, and provides syntax highlighting for code files (.py,.js,.sh, etc.) directly in the browser. - Built-in HTTPS & Let's Encrypt: Native integration for SSL. It automatically handles HTTPS redirects and serves your Let's Encrypt certificates directly.
- Public vs. Admin Modes: Securely lock down your server with Basic Auth, or enable
--publicmode to let guests download and preview files while blocking all uploads and deletions. No annoying browser password prompts for guests! - Premium Glassmorphic UI: A meticulously designed dark-mode interface with smooth animations, mobile responsiveness, and bulk-action toolbars.
The fastest way to deploy FileStation with systemd management and automatic Let's Encrypt SSL certificates is using the included installer script.
wget https://raw.githubusercontent.com/DDreamer01/FileStation/main/server.py https://raw.githubusercontent.com/DDreamer01/FileStation/main/install.sh && chmod +x install.sh && sudo ./install.shThe interactive installer will ask you:
- Service Name: Create multiple isolated spaces by running the script multiple times!
- Username & Password: Set your admin credentials.
- Directory: The path to serve (e.g.,
/home/username/files). - Ports: Defaults to
80and443. - Domain: Enter your domain name to automatically fetch and configure HTTPS via Let's Encrypt.
If you don't want to run it as a system service, you can run server.py directly. Python 3.7+ is required.
wget https://raw.githubusercontent.com/DDreamer01/FileStation/main/server.pypython3 server.py -d /home/user/files -u admin --password secret| Flag | Description |
|---|---|
-d, --directory |
The root directory to serve (default: current directory). |
-u, --user |
Admin username. |
--password |
Admin password. |
-p, --port |
HTTP port to listen on (default: 80). |
--https-port |
HTTPS port to listen on (default: 443). |
--cert |
Path to SSL certificate chain (fullchain.pem). |
--key |
Path to SSL private key (privkey.pem). |
--force-https |
Redirects all HTTP traffic to HTTPS automatically. |
--public |
Allows unauthenticated users to view and download files (read-only). |
--max-upload |
Max upload size in GB (default: 2.0). |
When in public mode, you can append _login to your domain/ip for logging in.
- Serving Directories: It is highly recommended to serve a dedicated folder (e.g.,
/home/username/public_files) rather than the root/homeor/directory to prevent exposing sensitive system dotfiles. - Path Traversal: FileStation includes strict path resolution to prevent directory traversal attacks. Users cannot access files outside the specified root directory.
- TLS Handshake Timeouts: The server includes a custom secure socket wrapper to prevent malicious port scanners from hanging the server threads indefinitely.
Developed by: †hε drεαmεr
Contributions, issues, and feature requests are welcome! Feel free to check the issues page.
This project is open-source and available under the MIT License.
