Skip to main content

X-wing

X-wing

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 by default)
  • Browser-based file browser — drag-and-drop upload, directory creation, zip download, file delete
  • In-browser text editor — CodeMirror-powered editor for common text and code file types
  • WebDAV COPY / MOVE — server-side file and directory copy/move via Destination header
  • Per-user access control — YAML config grants each user independent read, write, and delete permissions; reloaded at runtime without restart
  • 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]
--open / --no-open         Open browser on startup. [default: open]
--max-upload-gb FLOAT      Max upload size in GB. [default: 10]
--max-chunk-mb INTEGER     Max size per chunk in MB. [default: 100]
--max-chunks INTEGER       Max chunks per upload session. [default: 10000]
--session-ttl-minutes INT  Upload session expiry in minutes. [default: 60]
--require-auth             Require authentication header (403 if missing).
--users-config FILE        Path to YAML file with per-user permissions.
--user-header TEXT         Header to read username from. [default: X-Forwarded-User]
--trusted-auth-proxy TEXT  Trusted proxy IP/CIDR allowed to supply --user-header.
--reload                   Auto-reload on code changes (dev only).
--ldap-config FILE         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

Windows' built-in WebDAV client is limited by the WebClient service policy. By default, BasicAuthLevel is 1, which allows Basic authentication only for HTTPS WebDAV sites. With X-wing behind HTTPS and LDAPGate enabled, Windows Explorer can use the normal username/password prompt because LDAPGate provides the Basic auth challenge Windows expects.

Without LDAPGate, Windows Explorer can still connect only as anonymous. That works for read-only access, or for writes only if your users.yaml grants write permission to "*". X-wing does not provide its own username/password Basic auth prompt in no-LDAP mode.

Setting BasicAuthLevel to 2 enables Basic authentication over HTTP too, but that requires administrator access to HKLM\SYSTEM\CurrentControlSet\Services\WebClient\Parameters and sends credentials in clear text. For Windows users, prefer HTTPS with LDAPGate or a WebDAV-capable client such as WinSCP.

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

Chunk size and session limits are configurable via --max-chunk-mb, --max-chunks, and --session-ttl-minutes.

Access Control

Without --users-config, local/no-auth mode is read-only. When a users config is present, unlisted users are denied unless you configure the "*" fallback.

xwing serve --root /data --users-config users.yaml

users.yaml — compact format:

users:
  alice: rwd     # read + write + delete
  bob: rw        # read + write, no delete
  charlie: r     # read only
  "*": r         # fallback for any unlisted user (omit to deny unlisted users)

users.yaml — verbose format:

users:
  alice:
    read: true
    write: true
    delete: true

Verbose field defaults when omitted: read: true, write: false, delete: false. Values must be true or false.

Permission levels:

Flag Grants
r Browse directories, download files (GET, HEAD, PROPFIND)
w Upload files, create directories, copy (PUT, MKCOL, COPY)
d Delete and move files (DELETE, MOVE)

The config file is reloaded automatically when it changes on disk — no restart needed.

Admin console

Configure admin identities separately from users.yaml:

xwing serve --root /data \
  --users-config users.yaml \
  --ldap-config ldapgate.yaml \
  --admin-user alice \
  --admin-user ops

Admin access requires an authenticated LDAPGate session (embedded middleware or a trusted LDAPGate reverse proxy) and a username listed with --admin-user or XWING_ADMIN_USERS. User permission files cannot grant administrator access.

For standalone LDAPGate reverse-proxy mode, use the same --trusted-auth-proxy boundary instead of --ldap-config:

xwing serve --root /data --require-auth \
  --users-config users.yaml \
  --trusted-auth-proxy 127.0.0.1 \
  --admin-user alice

Admin configuration is not editable from the console. LDAP authentication remains configured in ldapgate.yaml; the Users screen synchronizes each explicit user entry to both users.yaml permissions and ldap.allowed_users. Restart X-wing after adding or removing LDAP users.

Console provides:

  • Per-user read/write/delete access management.
  • LDAP user allowlist synchronization when embedded LDAPGate is enabled.
  • Audit activity with user/date filters, status, paths, timing, current active-user counts, and retention purge.
  • Storage and usage summary.
  • Persistent recoverable trash with restore and permanent deletion controls.

LDAP / Active Directory Authentication

X-wing 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 only from trusted proxy IPs.

Browser → LDAPGate → xwing
ldapgate serve --config ldapgate.yaml
xwing serve --root /data --require-auth --users-config users.yaml --trusted-auth-proxy 127.0.0.1

Mode 2 — Built-in middleware: Inject LDAPGate directly into xwing as FastAPI middleware:

pip install 'xwing[ldap]'
xwing serve --root /data --ldap-config ldapgate.yaml --users-config users.yaml

Use ldapgate.yaml in this repository as the starting template for X-wing. See the LDAPGate README for config file documentation.

Audit log

LDAP-enabled and --require-auth deployments retain authenticated activity in ~/.local/share/xwing/audit.db by default. The log records the user, method, path, status, and timing. Text and JSON request input is retained up to 16 KiB; large or binary upload bodies are metadata-only. Set XWING_AUDIT_DB (or pass --audit-db) to choose another location.

xwing audit --user alice
xwing audit purge --older-than 90

Development

Requires uv.

git clone https://github.com/anudeepd/xwing
cd xwing
uv sync
uv run xwing serve --root .

Frontend source lives in xwing/frontend/src; shipped browser assets are the bundled files under xwing/static/assets. Rebuild them after frontend changes:

cd scripts
npm install
npm run build:app

License

MIT

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

xwing-0.3.41.tar.gz (984.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

xwing-0.3.41-py3-none-any.whl (968.9 kB view details)

Uploaded Python 3

File details

Details for the file xwing-0.3.41.tar.gz.

File metadata

  • Download URL: xwing-0.3.41.tar.gz
  • Upload date:
  • Size: 984.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.23 {"installer":{"name":"uv","version":"0.11.23","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Fedora Linux","version":"44","id":"","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for xwing-0.3.41.tar.gz
Algorithm Hash digest
SHA256 3e3f10ebb353472976bb9923d398eaaa1eac4977d67a6e665af0c33edaba952f
MD5 3caf5266187837c4fdb9d646fd0495df
BLAKE2b-256 78b66feb90075d03335fff7847b90d7b2b7b764a463eafc80d4166af8df84dc7

See more details on using hashes here.

File details

Details for the file xwing-0.3.41-py3-none-any.whl.

File metadata

  • Download URL: xwing-0.3.41-py3-none-any.whl
  • Upload date:
  • Size: 968.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.23 {"installer":{"name":"uv","version":"0.11.23","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Fedora Linux","version":"44","id":"","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for xwing-0.3.41-py3-none-any.whl
Algorithm Hash digest
SHA256 ceb45cf7a1eaf03b3aaaa6b335f0577bc02f3a6088dae44e0702da269e425795
MD5 3cc3d6d7b9eeda80a92f501b1626ccf0
BLAKE2b-256 ef0a2d5c96d1b22648ecdbb268372e43b5bc39ee04031e930bcda6d3b864d502

See more details on using hashes here.

Release history Release notifications | RSS feed

0.3.48

2 files

0.3.47

2 files

0.3.46

2 files

0.3.45

2 files

0.3.44

2 files

0.3.43

2 files

0.3.42

2 files

This release

0.3.41 This release

2 files

0.3.40

2 files

0.3.39

2 files

0.3.38

2 files

0.3.37

2 files

0.3.36

2 files

0.3.35

2 files

0.3.34

2 files

0.3.33

2 files

0.3.32

2 files

0.3.31

2 files

0.3.30

2 files

0.3.29

2 files

0.3.28

2 files

0.3.27

2 files

0.3.26

2 files

0.3.25

2 files

0.3.24

2 files

0.3.23

2 files

0.3.22

2 files

0.3.21

2 files

0.3.20

2 files

0.3.19

2 files

0.3.18

2 files

0.3.17

2 files

0.3.16

2 files

0.3.15

2 files

0.3.14

2 files

0.3.13

2 files

0.3.12

2 files

0.3.11

2 files

0.3.10

2 files

0.3.9

2 files

0.3.8

2 files

0.3.7

2 files

0.3.6

2 files

0.3.5

2 files

0.3.4

2 files

0.3.3

2 files

0.3.2

2 files

0.3.1

2 files

0.3.0

2 files

0.2.1

2 files

0.2.0

2 files

0.1.0

2 files

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page