Skip to main content

Overview

copyparty makes it easy to share files with others, whether for simple downloads or collaborative uploads. This guide covers setting up basic file sharing with customizable permissions.

Quick Start

The simplest file sharing server shares your current directory with everyone:
python copyparty-sfx.py
This gives everyone read/write access to the current folder at http://your-ip:3923/.

Basic File Sharing Scenarios

1
Share a folder (read-only)
2
Make a folder available for download without allowing uploads:
3
python copyparty-sfx.py -v /mnt/share:/files:r
4
  • /mnt/share - Local folder on your server
  • /files - URL path (access at http://your-ip:3923/files)
  • r - Read-only permission for everyone
  • 5
    Share with password protection
    6
    Create a user account and restrict access:
    7
    python copyparty-sfx.py -a alice:secret123 -v /mnt/share:/files:r,alice
    
    8
  • -a alice:secret123 - Creates user alice with password secret123
  • r,alice - Only user alice can read/download
  • 9
    Allow uploads from anyone
    10
    Let anyone upload files to a folder:
    11
    python copyparty-sfx.py -v /mnt/uploads:/drop:w
    
    12
  • w - Write-only permission (upload but cannot see files)
  • Users can upload but cannot browse or download
  • 13
    Mixed permissions
    14
    Combine different access levels for different users:
    15
    python copyparty-sfx.py -a bob:pass1 -a carol:pass2 \
      -v /mnt/files:/files:r:rw,bob:A,carol
    
    16
  • Everyone can read (first r)
  • User bob can read and write (rw,bob)
  • User carol has full admin access (A,carol)
  • Configuration File Approach

    For complex setups, use a configuration file instead of command-line arguments:
    [accounts]
      bob: pass1
      carol: pass2
    
    [/files]
      /mnt/files
      accs:
        r: *       # everyone can read
        rw: bob    # bob can read-write
        A: carol   # carol has admin access
    
    [/drop]
      /mnt/uploads
      accs:
        w: *       # anyone can upload
        rw: carol  # carol can manage uploads
    

    Enabling File Indexing

    For better performance and features like duplicate detection:
    python copyparty-sfx.py -e2dsa -v /mnt/share:/files:r
    
    • -e2dsa - Scan and index all files on startup
    • Enables search, prevents duplicate uploads
    • Creates .hist/up2k.db database in each volume
    You can include passwords directly in URLs:
    http://your-server:3923/files?pw=secret123
    
    If --usernames is enabled, use username:password:
    http://your-server:3923/files?pw=alice:secret123
    

    Creating Temporary Shares

    Enable the shares feature to let users create temporary links:
    python copyparty-sfx.py --shr /share -a alice:pass -v /mnt/files::rw,alice
    
    Users can then:
    1. Navigate to a file or folder
    2. Click the “share” button (bottom-right)
    3. Set expiration time and optional password
    4. Share the generated link
    Shares appear at http://your-server:3923/share/...

    Making It Accessible Online

    Quick way to make your server accessible over the internet:
    # Install cloudflared, then:
    cloudflared tunnel --url http://127.0.0.1:3923
    
    Add to copyparty:
    python copyparty-sfx.py --xff-hdr cf-connecting-ip -v /mnt/share:/files:r
    

    Permission Reference

    PermissionDescription
    rRead: browse folders, download files
    wWrite: upload files
    mMove: move files FROM this folder
    dDelete: delete files/folders
    gGet: download files only (no browsing)
    GUpget: like g but uploaders see their filekeys
    aAdmin: see upload times, IPs, reload config
    AAll: shortcut for rwmda

    Tips and Best Practices

    Don’t give d (delete) permission unless necessary. Use rw instead of A for regular users.
    Add the admin permission to see who uploaded what:
    python copyparty-sfx.py -a admin:secret -v /mnt/files::r:A,admin
    
    Restrict file sizes and total volume:
    [/uploads]
      /mnt/uploads
      accs:
        w: *
      flags:
        sz: 1k-100m    # files between 1KB and 100MB
        vmaxb: 10g     # total volume max 10GB
        df: 5g         # keep 5GB free disk space
    
    Let users delete their own uploads within a time window:
    python copyparty-sfx.py -e2d --unpost 43200 -v /mnt/uploads::w
    
    Users can undo uploads within 12 hours (43200 seconds).

    Next Steps

    Build docs developers (and LLMs) love