🔗1. Installation & Environment
# Install CLI (places binary in PATH)
curl -sL [https://filen.io/cli.sh](https://filen.io/cli.sh) | bash
# Verify installation
filen --version
filen --help
# Version management
filen install latest
filen install canary
filen install <version>
# Override data directory ($XDG_CONFIG_HOME/filen-cli or ~/.config/filen-cli by default)
filen --data-dir /path/to/dir <cmd>
FILEN_CLI_DATA_DIR=/path/to/dir filen <cmd>
🔗2. Authentication
# Interactive login
filen
# CLI flags authentication
filen --email <email> --password <password> --two-factor-code <2fa>
# Environment variable authentication
FILEN_EMAIL=<email> FILEN_PASSWORD=<pwd> FILEN_2FA_CODE=<2fa> filen
# Account management
filen whoami # Show authenticated account
filen logout # Remove saved credentials
filen export-auth-config # Export unencrypted auth config (avoids rate limits in clustered setups)
filen export-api-key # Export API key for Filen Rclone integration
# Listing and inspection
filen ls # List root directory
filen ls /Documents # List specific remote path
filen ls --long /Documents # List with detailed metadata (size, modified date)
filen stat /remote/file.txt # Show metadata for a file or directory
filen statfs # Show cloud drive storage information
# Reading file contents
filen cat /remote/file.txt # Print entire file contents
filen head /remote/file.txt -n 20 # Print first 20 lines
filen tail /remote/file.txt -n 20 # Print last 20 lines
# Drive navigation
filen recents # View recently used files and directories
filen favorites # View all favourited items
🔗4. Transfer Operations
# Uploading
filen upload localfile.txt /remote/path/ # Upload file to remote directory
filen upload report.pdf /Documents/Q1-Report.pdf # Upload and rename remote file
filen upload *.log /Logs/ # Upload multiple files via glob pattern
filen write /remote/notes.txt "some content here" # Write plain text directly to remote file
# Downloading
filen download /remote/file.txt ./localfile.txt # Download single remote file
filen download /Backups/project ./local-project # Download entire remote directory
filen download /Documents/notes.md . # Download to current working directory
🔗5. File Management & Notes
# Directory and file manipulation
filen mkdir /remote/newdir # Create remote directory
filen rm /remote/file.txt # Move file or directory to trash
filen rm /remote/file.txt --no-trash # Permanently delete (bypasses trash)
filen mv /remote/old-name.txt /remote/new-name.txt # Move or rename file/directory
filen cp /remote/source.txt /remote/backup.txt # Copy file or directory
# Item states and local editing
filen favorite /remote/path # Favourite an item
filen unfavorite /remote/path # Unfavourite an item
filen open /remote/file.txt # Open remote file locally
filen edit /remote/file.txt # Edit locally (re-uploads on save and close)
filen export-notes ~/filen-notes # Export all notes to local directory
🔗6. Synchronisation
🔗Modes & Abbreviations
| Mode | Abbreviation | Behaviour |
twoWay | tw | Changes on either side propagate to the other |
localToCloud | ltc | Local changes pushed to cloud; cloud-only files untouched |
localBackup | lb | Local to cloud; remote deletions not propagated |
cloudToLocal | ctl | Cloud changes pulled to local; local-only files untouched |
cloudBackup | cb | Cloud to local; local deletions not propagated |
# CLI execution
filen sync /local/path:/cloud/path # Basic pair (defaults to two-way)
filen sync /local1:twoWay:/cloud1 /local2:ltc:/cloud2 # Explicit modes and multiple pairs
filen sync /local/path:/cloud/path --continuous # Continuous loop synchronisation
filen sync /local/path:/cloud/path --disable-local-trash # Disable local trash during sync
# Configured sync pairs (~/.config/filen-cli/syncPairs.json)
filen sync # Run all configured pairs from default JSON
filen sync docs # Run specific configured pair by alias
filen sync /path/to/custom-pairs.json # Run pairs from custom JSON configuration
🔗Sync Pairs Configuration (~/.config/filen-cli/syncPairs.json)
[
{
"local": "/home/user/Documents",
"remote": "/Backups/Documents",
"syncMode": "localToCloud",
"alias": "docs",
"disableLocalTrash": false,
"excludeDotFiles": true,
"ignore": ["*.tmp", "node_modules/"]
}
]
🔗7. Mounting & Servers
# Network Drive Mount (Requires FUSE3: pacman -S fuse3 / apt install fuse3)
filen mount # Mount at default path (/tmp/filen on Linux)
filen mount /mnt/filen # Mount at custom path
fusermount3 -u /mnt/filen # Unmount filesystem (Linux)
# WebDAV Server (Single-User Mode)
filen webdav --w-user <u?> --w-password <p?> # Default server (0.0.0.0:80/443)
filen webdav --w-user <u?> --w-password <p?> --w-https # HTTPS with self-signed certificate
filen webdav --w-user <u?> --w-password <p?> --w-threads 0 # Enable clustering (0 = one thread per core)
filen webdav --w-user <u?> --w-password <p?> --w-auth-scheme basic # Auth scheme: basic or digest
# WebDAV Server (Proxy Mode - Multi-User)
filen webdav-proxy --w-port 1900 # Users authenticate with own credentials
# Password format: password=secret&twoFactorAuthentication=<OTP_OR_RECOVERY_CODE>
# S3-Compatible Server (Set client s3ForcePathStyle=true and region="filen")
filen s3 --s3-access-key-id <id> --s3-secret-access-key <key> # Start S3 server (0.0.0.0:80/443)
filen s3 --s3-access-key-id <id> --s3-secret-access-key <key> --s3-https # HTTPS S3 server
filen s3 --s3-access-key-id <id> --s3-secret-access-key <key> --s3-threads 0 # Clustered S3 server
🔗8. Trash & Public Links
# Trash management
filen trash # List all trash items
filen trash restore # Restore a specific trash item
filen trash delete # Permanently delete a specific trash item
filen trash empty # Permanently delete all trash items
# Public links
filen links # List all public links
filen links /remote/path # Create, view, edit, or delete a link for a path
🔗9. Updates & Execution Flags
# Update behaviour flags
filen --force-update <cmd> # Force check (bypasses 10-minute cache)
filen --skip-update <cmd> # Skip update check entirely
filen --auto-update <cmd> # Update binary without confirmation prompt
# Canary channel
filen canary # Toggle canary release channel
🔗10. Automation & Scripting
🔗Daily Backup Script
#!/bin/bash
set -e
TIMESTAMP=$(date +%Y-%m-%d)
LOCAL_PATH="$HOME/Documents"
REMOTE_PATH="/Backups/Documents/$TIMESTAMP"
echo "Starting Filen backup: $TIMESTAMP"
filen sync "$LOCAL_PATH:localToCloud:$REMOTE_PATH"
echo "Backup complete."
🔗Systemd Continuous Sync Service (~/.config/systemd/user/filen-sync.service)
[Unit]
Description=Filen Cloud Sync
After=network-online.target
[Service]
Type=simple
ExecStart=/usr/bin/env filen sync %h/Documents:localToCloud:/Backups/Documents --continuous
Restart=on-failure
RestartSec=30
[Install]
WantedBy=default.target
🔗Systemd Timer (~/.config/systemd/user/filen-sync.timer)
[Unit]
Description=Run Filen Sync every 6 hours
[Timer]
OnBootSec=5min
OnUnitActiveSec=6h
Persistent=true
[Install]
WantedBy=timers.target
# Enable and start systemd automation
systemctl --user daemon-reload
systemctl --user enable --now filen-sync.timer
systemctl --user status filen-sync.timer