This guide documents the complete setup process for running a WebDAV server in a Sprite VM, allowing file access via HTTP from macOS or other WebDAV clients.
- Server: WsgiDAV (Python-based WebDAV server)
- Web Server: Cheroot (bundled with WsgiDAV)
- Port: 8080 (configured as Sprite HTTP service)
- Served Directory:
/home/sprite(entire home directory) - Authentication: HTTP Basic Auth (username:
sprite, password:sprite)
pip3 install --user WsgiDAV cherootThis installs:
WsgiDAV- WebDAV server implementationcheroot- Pure-Python HTTP server- Dependencies:
defusedxml,Jinja2,json5,PyYAML,MarkupSafe
The wsgidav binary is installed to ~/.local/bin/wsgidav
sudo apt-get update
sudo apt-get install -y jqNote: sprite-env requires jq for JSON parsing. Skip this if already installed.
Create ~/.wsgidav.yaml with the following content:
host: 0.0.0.0
port: 8080
server: cheroot
# Authentication - enable basic auth
http_authenticator:
domain_controller: wsgidav.dc.simple_dc.SimpleDomainController
accept_basic: true
accept_digest: false
default_to_digest: false
simple_dc:
user_mapping:
"/":
"sprite":
password: "sprite"
description: "Sprite user"
roles: []
# Serve home directory
provider_mapping:
"/": /home/sprite
# Verbose logging
verbose: 1
# Enable directory browsing
dir_browser:
enabled: true
response_trailer: ""Configuration Notes:
host: 0.0.0.0- Listen on all interfacesport: 8080- Must match the--http-portin service creationserver: cheroot- Use Cheroot web serverprovider_mapping- Maps URL path/to filesystem path/home/spritesimple_dc.user_mapping- Basic authentication credentialsdir_browser.enabled: true- Allows browsing directories via web browserverbose: 1- Enable logging for troubleshooting
sprite-env services create webdav \
--cmd /home/sprite/.local/bin/wsgidav \
--args "--config=/home/sprite/.wsgidav.yaml" \
--http-port 8080 \
--dir /home/sprite \
--duration 10sCommand Explanation:
webdav- Service name--cmd- Full path to wsgidav executable--args- Command line arguments (config file path)--http-port 8080- Routes Sprite proxy to this port; enables auto-start--dir /home/sprite- Working directory--duration 10s- Stream logs for 10 seconds after creation
Check service status:
sprite-env services listExpected output shows "status":"running" for the webdav service.
Test locally:
curl -u sprite:sprite http://localhost:8080/Test WebDAV PROPFIND (list files):
curl -u sprite:sprite -X PROPFIND http://localhost:8080/ -H "Depth: 1"View logs:
cat /.sprite/logs/services/webdav.log- Get your Sprite URL from the Sprite dashboard/CLI
- Format:
https://your-sprite-id.sprites.dev
- Format:
- Open Finder
- Press
⌘Kor Go → Connect to Server - Enter your Sprite URL:
https://your-sprite-id.sprites.dev - Username:
sprite - Password:
sprite - Click Connect
The home directory will mount as a network drive.
Cyberduck (Free, Open Source)
- Download: https://cyberduck.io
- Add bookmark with your Sprite URL
- Protocol: WebDAV (HTTPS)
Mountain Duck ($39, Mounts as Disk)
- Download: https://mountainduck.io
- Mounts WebDAV as a native disk in Finder
- By Cyberduck developers
Transmit ($45, Professional)
- Download: https://panic.com/transmit
Command Line (curl)
curl -u sprite:sprite https://your-sprite-id.sprites.dev/sprite-env services list
sprite-env services get webdavsprite-env services signal webdav TERM# Stop service
sprite-env services signal webdav TERM
# Service will auto-restart on next HTTP request
# Or manually recreate:
sprite-env services create webdav \
--cmd /home/sprite/.local/bin/wsgidav \
--args "--config=/home/sprite/.wsgidav.yaml" \
--http-port 8080 \
--dir /home/sprite \
--duration 10ssprite-env services delete webdav# View all logs
cat /.sprite/logs/services/webdav.log
# Follow logs in real-time
tail -f /.sprite/logs/services/webdav.log- Edit
~/.wsgidav.yaml - Update the password field:
simple_dc: user_mapping: "/": "sprite": password: "your-new-password"
- Restart the service:
sprite-env services signal webdav TERM
- Edit
~/.wsgidav.yaml - Update the provider_mapping:
provider_mapping: "/": /path/to/your/directory
- Optionally update the service working directory:
sprite-env services delete webdav sprite-env services create webdav \ --cmd /home/sprite/.local/bin/wsgidav \ --args "--config=/home/sprite/.wsgidav.yaml" \ --http-port 8080 \ --dir /path/to/your/directory
Edit ~/.wsgidav.yaml:
simple_dc:
user_mapping:
"/":
"sprite":
password: "password1"
description: "Primary user"
roles: []
"user2":
password: "password2"
description: "Second user"
roles: []Edit ~/.wsgidav.yaml and remove the http_authenticator section entirely.
Warning: Only do this if you're certain the Sprite URL remains private or you've configured proper access controls externally.
- Edit
~/.wsgidav.yaml- updateport: 8080to your desired port - Recreate the service with the new
--http-portvalue:sprite-env services delete webdav sprite-env services create webdav \ --cmd /home/sprite/.local/bin/wsgidav \ --args "--config=/home/sprite/.wsgidav.yaml" \ --http-port YOUR_NEW_PORT \ --dir /home/sprite
Note: Only one service can have an http_port configured in Sprite.
Check logs:
cat /.sprite/logs/services/webdav.logVerify wsgidav is installed:
ls -la ~/.local/bin/wsgidavTest configuration:
~/.local/bin/wsgidav --config=~/.wsgidav.yaml --help-
Verify service is running:
sprite-env services list
-
Test local connectivity:
curl -u sprite:sprite http://localhost:8080/
-
Verify your Sprite URL is correct (get from Sprite dashboard/CLI)
-
Check network policy allows your client domain:
cat /.sprite/policy/network.json
- Verify credentials in
~/.wsgidav.yaml - Ensure you restarted the service after changing password
- Check logs for authentication errors:
tail -f /.sprite/logs/services/webdav.log
WsgiDAV runs as the sprite user. Ensure served directories have proper permissions:
ls -la /home/spriteFix permissions if needed:
chmod 755 /home/sprite
chmod 644 /home/sprite/file.txt # for files
chmod 755 /home/sprite/directory # for directoriesSprite services automatically restart when the VM boots, so your WebDAV server will be available after VM restarts.
Save the current state including WebDAV configuration:
sprite-env checkpoints create "WebDAV server configured and running"Restore from checkpoint:
sprite-env checkpoints restore v5 # Replace v5 with your checkpoint IDWarning: Restoring a checkpoint drops the entire session and restarts the VM.
- Change Default Password: The default password
spriteshould be changed immediately - Sprite URL Authentication: By default, Sprite URLs require authentication, providing an additional security layer
- HTTPS: Sprite proxy provides HTTPS, encrypting traffic between your client and the VM
- Limited Exposure: Only expose the directories you actually need via
provider_mapping - Public Access: If you make your Sprite URL public via the Sprite API, ensure strong passwords
- Read-Only Access: To prevent modifications, WsgiDAV supports read-only mode (not configured in this setup)
After setup, your VM will have:
/home/sprite/
├── .wsgidav.yaml # WebDAV configuration
├── .local/
│ └── bin/
│ └── wsgidav # WebDAV executable
└── .local/lib/python3.13/site-packages/
├── WsgiDAV/ # WebDAV library
└── cheroot/ # Web server library
/.sprite/
├── logs/
│ └── services/
│ └── webdav.log # Service logs
└── checkpoints/ # Checkpoints for backup/restore
- WsgiDAV Documentation: https://wsgidav.readthedocs.io/
- Sprite Documentation:
/.sprite/docs/ - WebDAV Protocol: RFC 4918
# Start service (first time)
sprite-env services create webdav --cmd ~/.local/bin/wsgidav --args "--config=~/.wsgidav.yaml" --http-port 8080 --dir /home/sprite
# Check status
sprite-env services list
# View logs
cat /.sprite/logs/services/webdav.log
# Restart service
sprite-env services signal webdav TERM
# Delete service
sprite-env services delete webdav
# Create checkpoint
sprite-env checkpoints create "Description"This setup provides a fully functional WebDAV server that:
- ✓ Runs as a Sprite service with auto-start on HTTP requests
- ✓ Serves your home directory with full read/write access
- ✓ Uses HTTP Basic authentication for security
- ✓ Automatically restarts on VM boot
- ✓ Provides HTTPS access via Sprite's proxy
- ✓ Works with all standard WebDAV clients
The server will be accessible at your Sprite URL and can be managed entirely through the sprite-env CLI.