Authentication Methods
Authentication is attempted in the following order:- URL Parameter (
?pw=) - HTTP Header (
PW:) - Basic Auth (
Authorization: Basic) - Cookies (
cppwdorcppws)
URL Parameter Authentication
Include password in the URL:With Username
If server has--usernames enabled:
Authentication credentials. Format:
password- Password only (default)username:password- If--usernamesis enabled
Security Notes
Configuration
Server can rename or disable URL parameter authentication:HTTP Header Authentication
Use thePW header for authentication:
With Username
Authentication credentials in
password or username:password formatCustom Header Name
Server can rename or disable the PW header:Basic Authentication
Standard HTTP Basic Auth:Format:
Basic base64(username:password)Disable Basic Auth
Cookie Authentication
After successful login via web interface, cookies are set:- HTTP:
cppwd=hashed-password - HTTPS:
cppws=hashed-password
Format:
cppwd=hashfor HTTP connectionscppws=hashfor HTTPS connections
Cookie values are hashed passwords, not plaintext. Obtain them from browser after login.
Account Configuration
Define accounts in server config:Command Line
Config File
Permissions
Accounts can have different permissions per volume:| Permission | Code | Description |
|---|---|---|
| Read | r | Browse folders, download files |
| Write | w | Upload files |
| Move | m | Move files from this folder |
| Delete | d | Delete files and folders |
| Get | g | Download files only (no browsing) |
| UpGet | G | Upload + receive filekeys |
| HTML | h | Serve index.html in folders |
| Admin | a | See upload metadata, reload config |
| Dots | . | See dotfiles in listings |
| All | A | Equivalent to rwmda. |
Example: Volume Permissions
Authentication Examples
Upload with Password
Download with Basic Auth
Search with Header Auth
List Files with URL Auth
Security Features
Failed Login Bans
Default ban policy (configurable with--ban-pw):
- 9 failed attempts within 1 hour
- Results in 24 hour ban
Password Hashing
Passwords can be hashed in config files:Hashed passwords use Argon2 or bcrypt. See Password Hashing for details.
IP-Based Authentication
Auto-login from specific IP ranges:Restrict Users to IP Ranges
Limit user access by IP:Authentication Headers in Responses
When authentication fails:Logout
Logout (clear cookies):Set to
x to logout and clear authentication cookiesMulti-Account Groups
Create groups of users:Built-in Groups
@acct- All logged-in users*- Everyone (including anonymous)
Exclude from Group
Identity Providers
Replace password auth with OAuth/OIDC:Best Practices
Troubleshooting
Authentication Not Working
-
Check if auth method is enabled:
- URL param: Not disabled with
--pw-urlp=A - Header: Not disabled with
--pw-hdr=A - Basic: Not disabled with
--no-bauth
- URL param: Not disabled with
-
Verify username format:
- Without
--usernames: Use?pw=password - With
--usernames: Use?pw=username:password
- Without
-
Check account permissions:
- User has appropriate permission (
r,w, etc.) - Path is within allowed volumes
- User has appropriate permission (
Failed Login Bans
If you’re banned:Advanced Configuration
User-Changeable Passwords
Allow users to change their own passwords:Header-Based Authentication
Authenticate via reverse proxy headers:Reference
- Authentication is evaluated per-request
- No sessions (except cookies from web UI)
- Permissions are per-volume
- First matching auth method is used
- Failed auth triggers ban counter