py-file-server
Lightweight HTTP file server with a modern web UI. Python 3.10+, no third-party dependencies.
Disclaimer. Provided AS IS, without warranty of any kind, express or implied. Use entirely at your own risk. This tool exposes a folder on your machine over the network: anyone who can reach the port can list and download its files, and an authenticated admin can upload, rename and delete them. The author accepts no liability for data loss, corruption, unauthorised access or disclosure, business interruption, or consequential damages. You are responsible for checking which folder you expose, setting a strong
ADMIN_PASSWORD, limiting the server to a network you trust, keeping tested backups, and being authorised to share the files. Not certified for regulated, forensic, safety-critical or high-assurance use. See DISCLAIMER.md; LICENSE is the governing text and prevails where the two differ.
Install
pip install py-file-server
Run
set ADMIN_PASSWORD=yourpassword
py-file-server
pfs is installed as a shorter alias for the same command:
pfs --dir D:\MyFiles
Open http://localhost:8113
Options
py-file-server --port 9000 --dir D:\MyFiles
| Option | Default | Description |
|---|---|---|
--port |
8113 |
TCP port |
--dir |
./share |
Root folder exposed in the browser |
Environment
| Variable | Default | Description |
|---|---|---|
ADMIN_PASSWORD |
admin123 |
Admin login password. Set this before exposing the server; the default is published here and the server warns at startup while it is in use. |
Permissions
Anonymous visitors can browse the listing and download files. Uploading, creating a folder, renaming, deleting a file and deleting a folder all require an admin session, and every one of those requests must also carry the session's CSRF token. The upload and New Folder controls are rendered only for a logged-in admin.
Uploads are capped by max_upload_mb in config.json (default 100 MB). A
request whose declared body exceeds that cap is refused with 413 before the
body is read.
Logging
Access lines and events go to both the console and share.log, a rotating file
capped at 5 MB with 5 backups. Clients that drop a connection (a browser
opening a speculative socket, or a cancelled download) are recorded at debug
level rather than raising a traceback.
Upload settings live in config.json inside the shared folder. The file is created automatically on first run if missing (default: 100 MB max upload, .sh blocked).
Metadata
Release files for py-file-server 1.1.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| py_file_server-1.1.2.tar.gz | 20.4 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| py_file_server-1.1.2-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 41.5 kB
Release files / py_file_server-1.1.2.tar.gz
| Download URL | py_file_server-1.1.2.tar.gz |
|---|---|
| Size | 20.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
5bae16acaefaac2cb1e7a9fafaaca5f089405ebedb5df743c7f8d84eab10c165
|
|
BLAKE2b-256 checksum How to use checksums |
b15f27410504bbd08d507decb3bc9883cb9b754f1ab6c51bc4e067f7d459d01c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.5
|
Release files / py_file_server-1.1.2-py3-none-any.whl
| Download URL | py_file_server-1.1.2-py3-none-any.whl |
|---|---|
| Size | 21.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
65faf423e11c75bcfb5c3add70c91b47a969ee4d100f0059213d4d5c30de29ee
|
|
BLAKE2b-256 checksum How to use checksums |
aeddb891f2102a9ef2669835016b9ae4ce8e19c398723673024d21e9ee01e7a2
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.5
|
Security for py-file-server 1.1.2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.