File sharing server with WebDAV support
Project description
Xwing
A self-contained file sharing server with WebDAV support. Works out of the box or integrates with LDAPGate for corporate LDAP/AD authentication.
Features
- WebDAV server — mount as a drive on Windows, macOS, and Linux using native WebDAV clients
- Resumable uploads — chunked uploads with session recovery; supports large files (up to 10 GB)
- Browser-based file browser — drag-and-drop upload, directory creation, zip download, file delete
- In-browser text editor — CodeMirror-powered editor for text files (configurable via
_EDITABLE_EXTS); files over 2 MB are not editable - WebDAV COPY / MOVE — server-side file and directory copy/move via
Destinationheader - Optional LDAP / AD authentication — via LDAPGate
- Single self-contained wheel — no external CDN dependencies; fonts embedded as base64 WOFF2
Install
pip install xwing
For LDAP/AD authentication:
pip install 'xwing[ldap]'
Usage
xwing serve --root /path/to/serve
Opens the file browser at http://127.0.0.1:8989 and launches your default browser.
Options:
--root PATH Root directory to serve. [required]
--host TEXT Bind host. [default: 127.0.0.1]
--port INTEGER Bind port. [default: 8989]
--no-open Don't open the browser automatically.
--max-upload-gb NUM Max upload size in GB. [default: 10]
--require-auth Require X-Forwarded-User header (403 if missing).
--user-header TEXT Header to read username from. [default: X-Forwarded-User]
--reload Auto-reload on code changes (dev only).
--ldap-config PATH Path to LDAPGate YAML config to enable LDAP authentication.
WebDAV Mount Examples
Linux (DAVfs2):
sudo mount.davfs http://localhost:8989 /mnt/xwing -o username=<user>
macOS:
open http://localhost:8989
# Or mount: Finder → Go → Connect to Server → http://localhost:8989
Windows (native WebDAV):
net use Z: \\localhost@8989\DavWWWRoot /persistent:yes
Resumable Upload (Chunked)
For large files, use the chunked upload API:
# 1. Init session
curl -X POST http://localhost:8989/_upload/init \
-H "Content-Type: application/json" \
-d '{"filename": "big.iso", "total_chunks": 100, "dir": "/"}'
# 2. Upload each chunk
curl -X PUT http://localhost:8989/_upload/<session_id>/<chunk_index> \
--data-binary @chunk.part
# 3. Complete
curl -X POST http://localhost:8989/_upload/<session_id>/complete
LDAP / Active Directory Authentication
Xwing supports two modes for LDAP/AD auth:
Mode 1 — Standalone proxy: Run LDAPGate as a reverse proxy in front of xwing. Authenticated requests get an X-Forwarded-User header that xwing reads.
Browser → LDAPGate → xwing
ldapgate serve --config ldapgate.yaml
xwing serve --root /data --require-auth
Mode 2 — Built-in middleware: Inject LDAPGate directly into xwing as FastAPI middleware:
pip install 'xwing[ldap]'
xwing serve --root /data --ldap-config /path/to/ldapgate.yaml
See the LDAPGate README for config file documentation.
Development
Requires uv.
git clone https://github.com/anudeepd/xwing
cd xwing
uv sync
uv run xwing serve --root .
License
MIT
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file xwing-0.1.0.tar.gz.
File metadata
- Download URL: xwing-0.1.0.tar.gz
- Upload date:
- Size: 479.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.10.12 {"installer":{"name":"uv","version":"0.10.12","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"CachyOS Linux","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
12b344bf1b8d25eb8fffdff836a79ca200d62382886453dbe02d5ee5dd51b90c
|
|
| MD5 |
d1ceb1c3bb1280ba3a36c9711c738573
|
|
| BLAKE2b-256 |
3fe23bb21de467109fe69a3aa1308d8516338d85bab63b0ffbe5a1a507589289
|
File details
Details for the file xwing-0.1.0-py3-none-any.whl.
File metadata
- Download URL: xwing-0.1.0-py3-none-any.whl
- Upload date:
- Size: 474.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.10.12 {"installer":{"name":"uv","version":"0.10.12","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"CachyOS Linux","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8437756a43dbbfa6b5e559ad8c18675beae4541fab2aa8fa717f53bfd5713907
|
|
| MD5 |
ae32211d014069026dfe14e86f3b55d1
|
|
| BLAKE2b-256 |
a0e0b361a471b8fb6623683fc7199b5d61d7c5f79c708b0d4677eeba7793e41c
|