copyparty README

The project's README from github.com/9001/copyparty. As one markdown file: README.md.

💾🎉 copyparty

turn almost any device into a file server with resumable uploads/downloads using any web browser

👉 Get started! or visit the read-only demo server 👀 running on a nuc in my basement

📷 screenshots: browser // upload // unpost // thumbnails // search // fsearch // zip-DL // md-viewer

🎬 videos: upload // cli-upload // race-the-beam // 👉 feature-showcase (youtube)

built in Norway 🇳🇴 with contributions from not-norway

readme toc

quickstart

just run copyparty-sfx.py -- that's it! 🎉

ℹ️ the sfx is a self-extractor which unpacks an embedded tar.gz into $TEMP -- if this looks too scary, you can use the zipapp which has slightly worse performance

enable thumbnails (images/audio/video), media indexing, and audio transcoding by installing some recommended deps:

running copyparty without arguments (for example doubleclicking it on Windows) will give everyone read/write access to the current folder; you may want accounts and volumes

or see some usage examples for inspiration, or the complete windows example

some recommended options:

mirrors

other places to download copyparty from (non-github links):

DO NOT download from sourceforge

at home

make it accessible over the internet by starting a cloudflare quicktunnel like so:

first download cloudflared and then start the tunnel with cloudflared tunnel --url http://127.0.0.1:3923

as the tunnel starts, it will show a URL which you can share to let anyone browse your stash or upload files to you

but if you have a domain, then you probably want to skip the random autogenerated URL and instead make a permanent cloudflare tunnel

since people will be connecting through cloudflare, run copyparty with --xff-hdr cf-connecting-ip to detect client IPs correctly

on servers

you may also want these, especially on servers:

because the following environment variables are commonly used in service-scripts, they are understood by copyparty:

and remember to open the ports you want; here's a complete example including every feature copyparty has to offer:

firewall-cmd --permanent --add-port={80,443,3921,3922,3923,3945,3990}/tcp  # --zone=libvirt
firewall-cmd --permanent --add-port=12000-12099/tcp  # --zone=libvirt
firewall-cmd --permanent --add-port={69,1900,3969,5353}/udp  # --zone=libvirt
firewall-cmd --reload

(69:tftp, 1900:ssdp, 3921:ftp, 3922:sftp, 3923:http/https, 3945:smb, 3969:tftp, 3990:ftps, 5353:mdns, 12000:passive-ftp)

features

also see comparison to similar software

PS: something missing? post any crazy ideas you've got as a feature request or discussion 🤙

testimonials

small collection of user feedback

good enough, surprisingly correct, certified good software, just works, why, wow this is better than nextcloud

motivations

project goals / philosophy

becoming rich is specifically not a motivation, but if you wanna donate then see my github profile regarding donations for my FOSS stuff in general (also THANKS!)

notes

general notes:

browser-specific:

server-os-specific:

server notes:

bugs

roughly sorted by chance of encounter

if you have a new exciting bug to share, see reporting bugs

not my bugs

same order here too

breaking changes

upgrade notes

FAQ

"frequently" asked questions

accounts and volumes

per-folder, per-user permissions - if your setup is getting complex, consider making a config file instead of using arguments

a quick summary can be seen using --help-accounts

configuring accounts/volumes with arguments:

permissions:

examples:

if you want to grant access to all users who are logged in, the group acct will always contain all known users, so for example -v /mnt/music:music:r,@acct

anyone trying to bruteforce a password gets banned according to --ban-pw (assuming real-ip is configured correctly); default is 24h ban for 9 failed attempts in 1 hour

and if you want to use config files instead of commandline args (good!) then here's the same examples as a configfile; save it as foobar.conf and use it like this: python copyparty-sfx.py -c foobar.conf

config file example:

[accounts]
  u1: p1  # create account "u1" with password "p1"
  u2: p2  #  (note that comments must have
  u3: p3  #   two spaces before the # sign)

[groups]
  g1: u1, u2  # create a group

[/]     # this URL will be mapped to...
  /srv  # ...this folder on the server filesystem
  accs:
    r: *  # read-only for everyone, no account necessary

[/music]       # create another volume at this URL,
  /mnt/music   # which is mapped to this folder
  accs:
    r: u1, u2  # only these accounts can read,
    r: @g1     # (exactly the same, just with a group instead)
    r: @acct   # (alternatively, ALL users who are logged in)
    rw: u3     # and only u3 can read-write

[/inc]
  /mnt/incoming
  accs:
    w: u1   # u1 can upload but not see/download any files,
    rm: u2  # u2 can browse + move files out of this volume

[/i]
  /mnt/ss
  accs:
    rw: u1  # u1 can read-write,
    g: *    # everyone can access files if they know the URL
  flags:
    fk: 4   # each file URL will have a 4-character password

shadowing

hiding specific subfolders by mounting another volume on top of them

WARNING: shadowing is NOT bulletproof when the underlying filesystem is casefolding (case-insensitive), in other words DON'T rely on this when copyparty is running on Windows and/or MacOS. This is also unsafe when combined with certain filesystems on Linux, especially FAT32/exFAT. Pay attention to the volume-listing in the startup log; casechk:n indicates probably-OK, but if it says casechk:y then DO NOT trust shadowing to fully prevent access to a file/subfolder.

for example -v /mnt::r -v /var/empty:web/certs: (note: no permissions) mounts the server folder /mnt as the webroot, but another volume is mounted at /web/certs -- so visitors can only see the contents of /mnt and /mnt/web (at URLs / and /web), but not /mnt/web/certs because URL /web/certs is mapped to /var/empty

to fully unmap it from the filesystem, specify //NULL instead of a real path such as /var/empty, so for example -v /mnt::r -v //NULL:web/certs: ensures /web/certs will never be accessible by anyone

the example config file right above this section may explain this better; the first volume / is mapped to /srv which means http://127.0.0.1:3923/music would try to read /srv/music on the server filesystem, but since there's another volume at /music mapped to /mnt/music then it'll go to /mnt/music instead

so, to shadow a file/folder, define a volume but leave out the accs: section

ℹ️ this also works for single files, because files can also be volumes

config file example for unmapping folders by shadowing:

[/drives]
  /mnt   # url "/drives" goes to "/mnt"
  accs:
    r: *  # everyone can read

[/drives/foo/bar]
  //NULL  # blocks access to "/mnt/foo/bar"

dotfiles

unix-style hidden files/folders by starting the name with a dot

anyone can access these if they know the name, but they normally don't appear in directory listings

a client can request to see dotfiles in directory listings if global option -ed is specified, or the volume has volflag dots, or the user has permission .

for shares, the dots volflag is ignored

dotfiles do not appear in search results unless one of the above is true, and the global option / volflag dotsrch is set

even if user has permission to see dotfiles, they are default-hidden unless --see-dots is set, and/or user has enabled the dotfiles option in the settings tab

config file example, where the same permission to see dotfiles is given in two different ways just for reference:

[/foo]
  /srv/foo
  accs:
    r.: ed   # user "ed" has read-access + dot-access in this volume;
             # dotfiles are visible in listings, but not in searches
  flags:
    dotsrch  # dotfiles will now appear in search results too
    dots     # another way to let everyone see dotfiles in this vol

the browser

accessing a copyparty server using a web-browser

copyparty-browser-fs8

tabs

the main tabs in the ui

hotkeys

the browser has the following hotkeys (always qwerty)

navpane

switching between breadcrumbs or navpane

click the 🌲 or pressing the B hotkey to toggle between breadcrumbs path (default), or a navpane (tree-browser sidebar thing)

thumbnails

press g or 田 to toggle grid-view instead of the file listing and t toggles icons / thumbnails

copyparty-thumbs-fs8

it does static images with Pillow / pyvips / FFmpeg, and uses FFmpeg for video files, so you may want to --no-thumb or maybe just --no-vthumb depending on how dangerous your users are

audio files are converted into spectrograms using FFmpeg unless you --no-athumb (and some FFmpeg builds may need --th-ff-swr)

images with the following names (see --th-covers) become the thumbnail of the folder they're in: folder.png, folder.jpg, cover.png, cover.jpg

enabling multiselect lets you click files to select them, and then shift-click another file for range-select

to show /icons/exe.png and /icons/elf.gif as the thumbnail for all .exe and .elf files respectively, do this: --ext-th=exe=/icons/exe.png --ext-th=elf=/icons/elf.gif

note:

config file example:

[global]
  no-thumb   # disable ALL thumbnails and audio transcoding
  no-vthumb  # only disable video thumbnails

[/music]
  /mnt/nas/music
  accs:
    r: *     # everyone can read
  flags:
    dthumb   # disable ALL thumbnails and audio transcoding
    dvthumb  # only disable video thumbnails
    ext-th:  exe=/ico/exe.png  # /ico/exe.png is the thumbnail of *.exe
    ext-th:  elf=/ico/elf.gif  # ...and /ico/elf.gif is used for *.elf
    th-covers:  folder.png,folder.jpg,cover.png,cover.jpg  # the default

zip downloads

download folders (or file selections) as zip or tar files

select which type of archive you want in the [⚙️] config tab:

name url-suffix description
tar ?tar plain gnutar, works great with curl | tar -xv
pax ?tar=pax pax-format tar, futureproof, not as fast
tgz ?tar=gz gzip compressed gnu-tar (slow), for curl | tar -xvz
txz ?tar=xz gnu-tar with xz / lzma compression (v.slow)
zip ?zip works everywhere, glitchy filenames on win7 and older
zip_dos ?zip=dos traditional cp437 (no unicode) to fix glitchy filenames
zip_crc ?zip=crc cp437 with crc32 computed early for truly ancient software

you can also zip a selection of files or folders by clicking them in the browser, that brings up a selection editor and zip button in the bottom right

copyparty-zipsel-fs8

cool trick: download a folder by appending url-params ?tar&opus or ?tar&mp3 to transcode all audio files (except aac|m4a|mp3|ogg|opus|wma) to opus/mp3 before they're added to the archive

uploading

drag files/folders into the web-browser to upload

dragdrop is the recommended way, but you may also:

when uploading files through dragdrop or CTRL-V, this initiates an upload using up2k; there are two browser-based uploaders available:

NB: you can undo/delete your own uploads with [🧯] unpost (and this is also where you abort unfinished uploads, but you have to refresh the page first)

up2k has several advantages:

it is perfectly safe to restart / upgrade copyparty while someone is uploading to it!
all known up2k clients will resume just fine 💪

see up2k for details on how it works, or watch a demo video

copyparty-upload-fs8

protip: you can avoid scaring away users with contrib/plugins/minimal-up2k.js which makes it look much simpler

protip: if you enable favicon in the [⚙️] settings tab (by typing something into the textbox), the icon in the browser tab will indicate upload progress -- also, the [🔔] and/or [🔊] switches enable visible and/or audible notifications on upload completion

the up2k UI is the epitome of polished intuitive experiences:

and then there's the tabs below it,

note that since up2k has to read each file twice, [🎈] bup can theoretically be up to 2x faster in some extreme cases (files bigger than your ram, combined with an internet connection faster than the read-speed of your HDD, or if you're uploading from a cuo2duo)

if you are resuming a massive upload and want to skip hashing the files which already finished, you can enable turbo in the [⚙️] config tab, but please read the tooltip on that button

if the server is behind a proxy which imposes a request-size limit, you can configure up2k to sneak below the limit with server-option --u2sz

if you want to replace existing files on the server with new uploads by default, run with --u2ow 2 (only works if users have the delete-permission, and can still be disabled with 🛡️ in the UI)

dropping files into the browser also lets you see if they exist on the server

copyparty-fsearch-fs8

when you drag/drop files into the browser, you will see two dropzones: Upload and Search

on a phone? toggle the [🔎] switch green before tapping the big yellow Search button to select your files

the files will be hashed on the client-side, and each hash is sent to the server, which checks if that file exists somewhere

files go into [ok] if they exist (and you get a link to where it is), otherwise they land in [ng]

if you have a "wark" (file-identifier/checksum) then you can also search for that in the [🔎] tab by putting w = kFpDiztbZc8Z1Lzi in the raw field

unpost

undo/delete accidental uploads using the [🧯] tab in the UI

copyparty-unpost-fs8

you can unpost even if you don't have regular move/delete access, however only for files uploaded within the past --unpost seconds (default 12 hours) and the server must be running with -e2d

config file example:

[global]
  e2d            # enable up2k database (remember uploads)
  unpost: 43200  # 12 hours (default)

self-destruct

uploads can be given a lifetime, after which they expire / self-destruct

the feature must be enabled per-volume with the lifetime upload rule which sets the upper limit for how long a file gets to stay on the server

clients can specify a shorter expiration time using the up2k ui -- the relevant options become visible upon navigating into a folder with lifetimes enabled -- or by using the life upload modifier

specifying a custom expiration time client-side will affect the timespan in which unposts are permitted, so keep an eye on the estimates in the up2k ui

race the beam

download files while they're still uploading (demo video) -- it's almost like peer-to-peer

requires the file to be uploaded using up2k (which is the default drag-and-drop uploader), alternatively the command-line program

incoming files

the control-panel shows the ETA for all incoming files , but only for files being uploaded into volumes where you have read-access

copyparty-cpanel-upload-eta-or8

file manager

cut/paste, rename, and delete files/folders (if you have permission)

file selection: click somewhere on the line (not the link itself), then:

you can copy/move files across browser tabs (cut/copy in one tab, paste in another)

shares

share a file or folder by creating a temporary link

when enabled in the server settings (--shr), click the bottom-right share button to share the folder you're currently in, or alternatively:

this feature was made with identity providers in mind -- configure your reverseproxy to skip the IdP's access-control for a given URL prefix and use that to safely share specific files/folders sans the usual auth checks

when creating a share, the creator can choose any of the following options:

semi-intentional limitations:

specify --shr /foobar to enable this feature; a toplevel virtual folder named foobar is then created, and that's where all the shares will be served from

users can delete their own shares in the controlpanel, and a list of privileged users (--shr-adm) are allowed to see and/or delet any share on the server

the volflag --shr-who lets you control who can create a share from that volume, either no (nobody), a (people with admin permission), or auth (people who are logged in)

after a share has expired, it remains visible in the controlpanel for --shr-rt minutes (default is 1 day), and the owner can revive it by extending the expiration time there

security note: using this feature does not mean that you can skip the accounts and volumes section -- you still need to restrict access to volumes that you do not intend to share with unauthenticated users! it is not sufficient to use rules in the reverseproxy to restrict access to just the /share folder.

batch rename

select some files and press F2 to bring up the rename UI

batch-rename-fs8

quick explanation of the buttons,

advanced mode: rename files based on rules to decide the new names, based on the original name (regex), or based on the tags collected from the file (artist/title/...), or a mix of both

in advanced mode,

available functions:

two counters are available; .n.s is the nth file in the selection, and .n.d the nth file in the folder, for example rename-output file(.n.d).(ext) gives file5.bin, and beach-$lpad((.n.s),3,0).(ext) is beach-017.jpg and the initial value of each counter can be set in the textboxes underneath the preset dropdown

so,

say you have a file named meganeko - Eclipse - 07 Sirius A.mp3 (absolutely fantastic album btw) and the tags are: Album:Eclipse, Artist:meganeko, Title:Sirius A, tn:7

you could use just regex to rename it:

or you could use just tags:

or a mix of both:

the metadata keys you can use in the format field are the ones in the file-browser table header (whatever is collected with -mte and -mtp)

rss feeds

monitor a folder with your RSS reader , optionally recursive

must be enabled per-volume with volflag rss or globally with --rss

the feed includes itunes metadata for use with podcast readers such as AntennaPod

a feed example: https://cd.ocv.me/a/d2/d22/?rss&fext=mp3

url parameters:

opds feeds

browse and download files from your e-book reader

enabled with the opds volflag or --opds global option

add ?opds to the end of the url you would like to browse, then input that in your opds client. for example: https://copyparty.example/books/?opds.

to log in with a password, enter it into either of the username or password fields in your client.

note: some clients (e.g. Moon+ Reader) will not send the password when downloading cover images, which will cause your ip to be banned by copyparty. to work around this, you can grant the g permission to unauthenticated requests and enable filekeys to prevent guessing filenames. for example: -vbooks:books:r,ed:g:c,fk,opds

by default, not all file types will be listed in opds feeds. to change this, add the extension to --opds-exts (volflag: opds_exts), or empty the list to list everything

recent uploads

list all recent uploads by clicking "show recent uploads" in the controlpanel

will show uploader IP and upload-time if the visitor has the admin permission

note that the 🧯 unpost feature is better suited for viewing your own recent uploads, as it includes the option to undo/delete them

config file example:

[global]
  ups-when    # everyone can see upload times
  ups-who: 1  # but only admins can see the list,
              # so ups-when doesn't take effect

media player

plays almost every audio format there is (if the server has FFmpeg installed for on-demand transcoding)

the following audio formats are usually always playable, even without FFmpeg: aac|flac|m4a|mp3|ogg|opus|wav

some highlights:

click the play link next to an audio file, or copy the link target to share it (optionally with a timestamp to start playing from, like that example does)

open the [🎺] media-player-settings tab to configure it,

playlists

create and play m3u8 playlists -- see example text and player

click a file with the extension m3u or m3u8 (for example mixtape.m3u or touhou.m3u8 ) and you get two choices: Play / Edit

playlists can include songs across folders anywhere on the server, but filekeys/dirkeys are NOT supported, so the listener must have read-access or get-access to the files

creating a playlist

with a standalone mediaplayer or copyparty

you can use foobar2000, deadbeef, just about any standalone player should work -- but you might need to edit the filepaths in the playlist so they fit with the server-URLs

alternatively, you can create the playlist using copyparty itself:

audio equalizer

and dynamic range compressor

can also boost the volume in general, or increase/decrease stereo width (like crossfeed just worse)

has the convenient side-effect of reducing the pause between songs, so gapless albums play better with the eq enabled (just make it flat)

not available on iPhones / iPads because AudioContext currently breaks background audio playback on iOS (15.7.8)

fix unreliable playback on android

due to phone / app settings, android phones may randomly stop playing music when the power saver kicks in, especially at the end of an album -- you can fix it by disabling power saving in the app settings of the browser you use for music streaming (preferably a dedicated one)

textfile viewer

with realtime streaming of logfiles and such (demo) , and terminal colors work too

click -txt- next to a textfile to open the viewer, which has the following toolbar buttons:

markdown viewer

and there are two editors

copyparty-md-read-fs8

there is a built-in extension for inline clickable thumbnails;

other notes,

markdown vars

dynamic docs with serverside variable expansion to replace stuff like {{self.ip}} with the client's IP, or {{srv.htime}} with the current time on the server

see ./srv/expand/ for usage and examples

other tricks

searching

search by size, date, path/name, mp3-tags, ...

copyparty-search-fs8

when started with -e2dsa copyparty will scan/index all your files. This avoids duplicates on upload, and also makes the volumes searchable through the web-ui:

path/name queries are space-separated, AND'ed together, and words are negated with a - prefix, so for example:

the raw field allows for more complex stuff such as ( tags like *nhato* or tags like *taishi* ) and ( not tags like *nhato* or not tags like *taishi* ) which finds all songs by either nhato or taishi, excluding collabs (terrible example, why would you do that)

for the above example to work, add the commandline argument -e2ts to also scan/index tags from music files, which brings us over to:

server config

using arguments or config files, or a mix of both:

NB: as humongous as this readme is, there is also a lot of undocumented features. Run copyparty with --help (or click that link) to see all available global options; all of those can be used in the [global] section of config files, and everything listed in --help-flags can be used in volumes as volflags (per-volume configuration).

version-checker

sleep better at night by telling copyparty to periodically check whether your version has a known vulnerability

this feature can be enabled by setting the global-option --vc-url to one of the following URLs; choose what severity level you want to be notified for:

note that https://api.copyparty.eu/advisories may (for example) skip some advisories rated High but include some Low; that's because an easily-reachable Low in a default-enabled feature is more severe than a High which is a theoretical bug in a contrived use of a fringe feature, but the CVE calculator would still classify that as High

if you want to use the github advisory feed but only care about advisories rated medium/moderate or higher, then global-option --vc-sev medium does that, but see previous paragraph

to see what happens when a bad version is detected, try --vc-url https://api.copyparty.eu/advisories-test

also consider the following options:

config file example:

[global]
  vc-url: https://api.copyparty.eu/advisories
  vc-age: 3  # how many hours to wait between each check
  vc-exit    # emergency-exit if current version is vulnerable
  vc-sev: medium  # only care about severity 'Medium'/'Moderate' or higher (github-only; don't use this with api.copyparty.eu)

logging

serverlog is sent to stdout by default (but logging to a file is also possible)

"stdout" usually means either the terminal, or journalctl, or whatever is collecting logs from your docker containers, so that depends on your setup

config file example:

[global]
  log-date: %Y-%m-%d  # show dates on stdout too
  lo: /var/log/cpp/%Y-%m-%d.txt  # logfile path
  flo: 2  # just text (no colors) in logfile
  q       # disable stdout; use logfile only

zeroconf

announce enabled services on the LAN (pic) -- -z enables both mdns and ssdp

config file example:

[global]
  z      # enable all zeroconf features (mdns, ssdp)
  zm     # only enables mdns (does nothing since we already have z)
  z-on: 192.168.0.0/16, 10.1.2.0/24  # restrict to certain subnets

mdns

LAN domain-name and feature announcer

uses multicast dns to give copyparty a domain which any machine on the LAN can use to access it

all enabled services (webdav, ftp, smb) will appear in mDNS-aware file managers (KDE, gnome, macOS, ...)

the domain will be partybox.local if the machine's hostname is partybox unless --name specifies something else

and the web-UI will be available at http://partybox.local:3923/

ssdp

windows-explorer announcer

uses ssdp to make copyparty appear in the windows file explorer on all machines on the LAN

doubleclicking the icon opens the "connect" page which explains how to mount copyparty as a local filesystem

if copyparty does not appear in windows explorer, use --zsv to see why:

qr-code

print a qr-code (screenshot) for quick access, great between phones on android hotspots which keep changing the subnet

it uses the server hostname if mdns is enabled, otherwise it'll use your external ip (default route) unless --qri specifies a specific ip-prefix or domain

ftp server

an FTP server can be started using --ftp 3921, and/or --ftps for explicit TLS (ftpes)

some recommended FTP / FTPS clients; wark = example password:

config file example, which restricts FTP to only use ports 3921 and 12000-12099 so all of those ports must be opened in your firewall:

[global]
  ftp: 3921
  ftp-pr: 12000-12099

sftp server

goes roughly 700 MiB/s (slower than webdav and ftp)

this is not ftps (which copyparty also supports); ftps is ftp-tls (think http/https), while sftp is ssh-based and (preferably) uses ssh-keys for authentication

the sftp-server requires the optional dependency paramiko;

enable sftpd with --sftp 3922 to listen on port 3922;

see the sftp section in --help for the other options

webdav server

with read-write support, supports winXP and later, macos, nautilus/gvfs ... a great way to access copyparty straight from the file explorer in your OS

click the connect button in the control-panel to see connection instructions for windows, linux, macos

general usage:

on macos, connect from finder:

to be able to edit existing files, the client must have the Delete-permission, and some webdav clients will also require the daw volflag or global-option (not necessary if the client sends the x-oc-mtime header). Without daw, those clients will fail to modify existing files and instead create new copies with names like notes.txt-1771978661.726032-3i9GPghL.txt. NOTE: Enabling daw will also make all PUT-uploads overwrite existing files if the user has delete-access, so use with caution. Another alternative is the dav-port option

note: if you have enabled IdP authentication then that may cause issues for some/most webdav clients; see the webdav section in the IdP docs

connecting to webdav from windows

using the GUI (winXP or later):

the webdav client that's built into windows has the following list of bugs; you can avoid all of these by connecting with rclone instead:

tftp server

a TFTP server (read/write) can be started using --tftp 3969 (you probably want ftp instead unless you are actually communicating with hardware from the 90s (in which case we should definitely hang some time))

that makes this the first RTX DECT Base that has been updated using copyparty 🎉

most clients expect to find TFTP on port 69, but on linux and macos you need to be root to listen on that. Alternatively, listen on 3969 and use NAT on the server to forward 69 to that port;

some recommended TFTP clients:

smb server

unsafe, slow, not recommended for wan, enable with --smb for read-only or --smbw for read-write

click the connect button in the control-panel to see connection instructions for windows, linux, macos

dependencies: python3 -m pip install --user -U impacket==0.13.0

some BIG WARNINGS specific to SMB/CIFS, in decreasing importance:

and some minor issues,

known client bugs:

the smb protocol listens on TCP port 445, which is a privileged port on linux and macos, which would require running copyparty as root. However, this can be avoided by listening on another port using --smb-port 3945 and then using NAT on the server to forward the traffic from 445 to there;

authenticate with one of the following:

wopi server

edit office documents in the web-ui

needs a wopi client to work, and the only supported wopi client is a selfhosted collabora online server; eventually onlyoffice will probably also be supported: issue #1574

no further documentation or examples yet, issue #1575

browser ux

tweaking the ui

see ./docs/rice for more, including:

opengraph

discord and social-media embeds

can be enabled globally with --og or per-volume with volflag og

note that this disables hotlinking because the opengraph spec demands it; to sneak past this intentional limitation, you can enable opengraph selectively by user-agent, for example --og-ua '(Discord|Twitter|Slack)bot' (or volflag og_ua)

you can also hotlink files regardless by appending ?raw to the url

WARNING: if you plan to use WebDAV, then --og-ua / og_ua must be configured

if you want to entirely replace the copyparty response with your own jinja2 template, give the template filepath to --og-tpl or volflag og_tpl (all members of HttpCli are available through the this object)

file deduplication

enable symlink-based upload deduplication globally with --dedup or per-volume with volflag dedup

by default, when someone tries to upload a file that already exists on the server, the upload will be politely declined, and the server will copy the existing file over to where the upload would have gone

if you enable deduplication with --dedup then it'll create a symlink instead of a full copy, thus reducing disk space usage

warning: when enabling dedup, you should also:

it will not be safe to rename/delete files if you only enable dedup and none of the above; if you enable indexing then it is not necessary to also do hardlinks (but you may still want to)

by default, deduplication is done based on symlinks (symbolic links); these are tiny files which are pointers to the nearest full copy of the file

you can choose to use hardlinks instead of softlinks, globally with --hardlink-only or volflag hardlinkonly, and you can choose to use reflinks with --reflink or volflag reflink

advantages of using reflinks (CoW, copy-on-write):

advantages of using hardlinks:

advantages of using symlinks (default):

warning: if you edit the contents of a deduplicated file, then you will also edit all other copies of that file! This is especially surprising with hardlinks, because they look like regular files, but that same file exists in multiple locations

global-option --xlink / volflag xlink additionally enables deduplication across volumes, but this is probably buggy and not recommended

config file example:

[global]
  e2dsa  # scan and index filesystem on startup
  dedup  # symlink-based deduplication for all volumes

[/media]
  /mnt/nas/media
  flags:
    hardlinkonly  # this vol does hardlinks instead of symlinks

file indexing

enable music search, upload-undo, and better dedup

file indexing relies on two database tables, the up2k filetree (-e2d) and the metadata tags (-e2t), stored in .hist/up2k.db. Configuration can be done through arguments, volflags, or a mix of both.

through arguments:

the same arguments can be set as volflags, in addition to d2d, d2ds, d2t, d2ts, d2v for disabling:

note:

config file example (these options are recommended btw):

[global]
  e2dsa  # scan and index all files in all volumes on startup
  e2ts   # check newly-discovered or uploaded files for media tags

exclude-patterns

to save some time, you can provide a regex pattern for filepaths to only index by filename/path/size/last-modified (and not the hash of the file contents) by setting --no-hash '\.iso$' or the volflag :c,nohash=\.iso$, this has the following consequences:

similarly, you can fully ignore files/folders using --no-idx [...] and :c,noidx=\.iso$

NOTE: no-idx and/or no-hash prevents deduplication of those files

if you set --no-hash [...] globally, you can enable hashing for specific volumes using flag :c,nohash=

to exclude certain filepaths from search-results, use --srch-excl or volflag srch_excl instead of --no-idx, for example --srch-excl 'password|logs/[0-9]'

config file example:

[/games]
  /mnt/nas/games
  flags:
    noidx: \.iso$  # skip indexing iso-files
    srch_excl: password|logs/[0-9]  # filter search results

filesystem guards

avoid traversing into other filesystems using --xdev / volflag :c,xdev, skipping any symlinks or bind-mounts to another HDD for example

and/or you can --xvol / :c,xvol to ignore all symlinks leaving the volume's top directory, but still allow bind-mounts pointing elsewhere

these options will reduce performance; unlikely worst-case estimates are 27% reduction for directory listings, 35% for download-as-tar

as of copyparty v1.7.0 these options also prevent file access at runtime -- in previous versions it was just hints for the indexer

WARNING: the xvol and xdev options should NOT be relied on for security; these are originally and primarily intended for the e2ds indexer. Certain underlying filesystems (especially FUSE-based and casefolding ones) will be problematic, and symlinks inherently have various TOCTOUs, and there's probably also bugs in copyparty where xvol/xdev is not fully enforced for certain APIs. The developer does not care about these options and they do not receive much testing.

periodic rescan

filesystem monitoring; if copyparty is not the only software doing stuff on your filesystem, you may want to enable periodic rescans to keep the index up to date

argument --re-maxage 60 will rescan all volumes every 60 sec, same as volflag :c,scan=60 to specify it per-volume

uploads are disabled while a rescan is happening, so rescans will be delayed by --db-act (default 10 sec) when there is write-activity going on (uploads, renames, ...)

note: folder-thumbnails are selected during filesystem indexing, so periodic rescans can be used to keep them accurate as images are uploaded/deleted (or manually do a rescan with the reload button in the controlpanel)

config file example:

[global]
  re-maxage: 3600

[/pics]
  /mnt/nas/pics
  flags:
    scan: 900

u2sz

configure upload-chunking; the default 64,96 is optimal for nearly every scenario, however:

the global-option --u2sz is two numbers, target,max MiB of each chunk to send, aiming for target MiB and allowing up-to-and-including max MiB depending on filesize, and if you only specify one number then it sets that for both

cloudflare max is 96 MiB, but if you have a reverseproxy (or CDN/WAF/whatever) which is more restrictive, then try some of the following:

the setting can also be changed in the web-UI; the textbox next to date-chk in the settings tab

upload rules

set upload rules using volflags, some examples:

you can also set transaction limits which apply per-IP and per-volume, but these assume -j 1 (default) otherwise the limits will be messed up, for example -j 4 would allow anywhere between 1x and 4x the limits you set depending on which processing node the client gets routed to

notes:

config file example:

[/inc]
  /mnt/nas/uploads
  accs:
    w: *    # anyone can upload here
    rw: ed  # only user "ed" can read-write
  flags:
    e2ds       # filesystem indexing is required for many of these:
    sz: 1k-3m  # accept upload only if filesize in this range
    df: 4g     # free disk space cannot go lower than this
    vmaxb: 1g  # volume can never exceed 1 GiB
    vmaxn: 4k  # ...or 4000 files, whichever comes first
    nosub      # must upload to toplevel folder
    lifetime: 300   # uploads are deleted after 5min
    maxn: 250,3600  # each IP can upload 250 files in 1 hour
    maxb: 1g,300    # each IP can upload 1 GiB over 5 minutes

compress uploads

files can be autocompressed on upload, either on user-request (if config allows) or forced by server-config

things to note,

some examples,

chmod and chown

per-volume filesystem-permissions and ownership

by default:

this can be configured per-volume:

notes:

other flags

descript.ion

add a description to each file in a folder by adding them to a textfile named descript.ion

see https://copyparty.eu/beta/ for an example -- here's a basic descript.ion file:

bookmark.mp3 Taishi feat. Rita - Bookmark Memories
slowstep.mp3 Taishi feat. 向日葵 - Slow Step -F.L.C.A-
prsnlzr.mp3 Taishi feat. みとせのりこ - Personalizer
cosmos.mp3 Taishi feat. Rita - Into the cosmos

dothidden

cosmetically hide specific files in a folder by adding them to a textfile named .hidden

this option is default-disabled; enable the volflag and/or global-option dothidden

this is cosmetic only! the files are still easily accessible in many ways, for example with download-as-zip/tar, so do not rely on this for security.

also see the --unlist option which is somewhat similar -- unlist applies to the whole volume instead of just one folder; however, while dothidden also affects sftp and ftp, the unlist option is http/https-only

thumbnail pregen

if you want to pre-generate everything on startup (usually a bad idea);

by default, thumbnails are created on-the-fly when a client needs it, and then cached on the server for --th-maxage seconds (default is one week), so most thumbnails only need to be created once, and are then eventually deleted from the cache to preserver disk space

but if you need every thumbnail instantly available when a folder is viewed, then first increase the thumbnail expiration time to something really big, and then set global-option th-pregen and volflag th_pregen to a comma-separated list of thumbnail formats to automatically generate on server startup;

the full list of all possible formats is: j,jf,jf3,j3,w,wf,wf3,w3,x,xf,xf3,x3,opus,mp3,flac,wav and I'll explain what those mean soon

anyways, obviously you do not want to pregenerate flac/wav because they're HUGE, and everything else also gets pretty big because it all adds up;

so a thousand pictures converted to every possible regular-size image format (j,jf,w,wf,x,xf) takes 96 MiB, and every possible 3x-size (jf3,j3,wf3,w3,xf3,x3) takes 562 MiB, alternatively 658 MiB in total for all, so that's why the default is to not pregenerate on startup, but instead do on-demand with a cache

database location

in-volume (.hist/up2k.db, default) or somewhere else

copyparty creates a subfolder named .hist inside each volume where it stores the database, thumbnails, and some other stuff

this can instead be kept in a single place using the --hist argument, or the hist= volflag, or a mix of both:

by default, the per-volume up2k.db sqlite3-database for -e2d and -e2t is stored next to the thumbnails according to the --hist option, but the global-option --dbpath and/or volflag dbpath can be used to put the database somewhere else

if your storage backend is unreliable (NFS or bad HDDs), you can specify one or more "landmarks" to look for before doing anything database-related. A landmark is a file which is always expected to exist inside the volume. This avoids spurious filesystem rescans in the event of an outage. One line per landmark (see example below)

note:

config file example:

[global]
  hist: ~/.cache/copyparty  # put db/thumbs/etc. here by default

[/pics]
  /mnt/nas/pics
  flags:
    hist: -  # restore the default (/mnt/nas/pics/.hist/)
    hist: /mnt/nas/cache/pics/  # can be absolute path
    landmark: me.jpg  # /mnt/nas/pics/me.jpg must be readable to enable db
    landmark: info/a.txt^=ok  # and this textfile must start with "ok"

metadata from audio files

set -e2t to index tags on upload

-mte decides which tags to index and display in the browser (and also the display order), this can be changed per-volume:

if you add/remove a tag from mte you will need to run with -e2tsr once to rebuild the database, otherwise only new files will be affected

but instead of using -mte, -mth is a better way to hide tags in the browser: these tags will not be displayed by default, but they still get indexed and become searchable, and users can choose to unhide them in the [⚙️] config pane

-mtm can be used to add or redefine a metadata mapping, say you have media files with foo and bar tags and you want them to display as qux in the browser (preferring foo if both are present), then do -mtm qux=foo,bar and now you can -mte artist,title,qux

tags that start with a . such as .bpm and .dur(ation) indicate numeric value

see the beautiful mess of a dictionary in mtag.py for the default mappings (should cover mp3,opus,flac,m4a,wav,aif,)

--no-mutagen disables Mutagen and uses FFprobe instead, which...

--mtag-to sets the tag-scan timeout; very high default (60 sec) to cater for zfs and other randomly-freezing filesystems. Lower values like 10 are usually safe, allowing for faster processing of tricky files

metadata from xattrs

unix extended file attributes (Linux-only) can be indexed into the db and made searchable;

however note that the tags must also be enabled with -mte so here are some complete examples:

as for actually adding the xattr user.foo to a file in the first place,

file parser plugins

provide custom parsers to index additional tags, also see ./bin/mtag/README.md

copyparty can invoke external programs to collect additional metadata for files using mtp (either as argument or volflag), there is a default timeout of 60sec, and only files which contain audio get analyzed by default (see ay/an/ad below)

but wait, there's more! -mtp can be used for non-audio files as well using the a flag: ay only do audio files (default), an only do non-audio files, or ad do all files (d as in dontcare)

if something doesn't work, try --mtag-v for verbose error messages

config file example; note that mtp is an additive option so all of the mtp options will take effect:

[/music]
  /mnt/nas/music
  flags:
    mtp: .bpm=~/bin/audio-bpm.py  # assign ".bpm" (numeric) with script
    mtp: key=f,t5,~/bin/audio-key.py  # force/overwrite, 5sec timeout
    mtp: ext=an,~/bin/file-ext.py  # will only run on non-audio files
    mtp: arch,built,ver,orig=an,eexe,edll,~/bin/exe.py  # only exe/dll

event hooks

trigger a program on uploads, renames etc (examples)

you can set hooks before and/or after an event happens, and currently you can hook uploads, moves/renames, and deletes

there's a bunch of flags and stuff, see --help-hooks

if you want to write your own hooks, see devnotes

zeromq

event-hooks can send zeromq messages instead of running programs

to send a 0mq message every time a file is uploaded,

the PUSH and REQ examples have t3 (timeout after 3 seconds) because they block if there's no clients to talk to

see zmq-recv.py if you need something to receive the messages with

config file example; note that the hooks are additive options, so all of the xau options will take effect:

[global]
  xau: zmq:pub:tcp://*:5556`  # send a PUB to any/all connected SUB clients
  xau: t3,zmq:push:tcp://*:5557`  # send PUSH to exactly one connected PULL cli
  xau: t3,j,zmq:req:tcp://localhost:5555`  # send REQ to the connected REP cli

upload events

the older, more powerful approach (examples):

-v /mnt/inc:inc:w:c,e2d,e2t,mte=+x1:c,mtp=x1=ad,kn,/usr/bin/notify-send

that was the commandline example; here's the config file example:

[/inc]
  /mnt/inc
  accs:
    w: *
  flags:
    e2d, e2t  # enable indexing of uploaded files and their tags
    mte: +x1
    mtp: x1=ad,kn,/usr/bin/notify-send

so filesystem location /mnt/inc shared at /inc, write-only for everyone, appending x1 to the list of tags to index (mte), and using /usr/bin/notify-send to "provide" tag x1 for any filetype (ad) with kill-on-timeout disabled (kn)

that'll run the command notify-send with the path to the uploaded file as the first and only argument (so on linux it'll show a notification on-screen)

note that this is way more complicated than the new event hooks but this approach has the following advantages:

note that it will occupy the parsing threads, so fork anything expensive (or set kn to have copyparty fork it for you) -- otoh if you want to intentionally queue/singlethread you can combine it with --mtag-mt 1

for reference, if you were to do this using event hooks instead, it would be like this: -e2d --xau notify-send,hello,--

handlers

redefine behavior with plugins (examples)

replace 404 and 403 errors with something completely different (that's it for now)

as for client-side stuff, there is plugins for modifying UI/UX

ip auth

autologin based on IP range (CIDR) , using the global-option --ipu

for example, if everyone with an IP that starts with 192.168.123 should automatically log in as the user spartacus, then you can either specify --ipu=192.168.123.0/24=spartacus as a commandline option, same as this config file example:

[global]
  ipu: 192.168.123.0/24=spartacus

repeat the option to map additional subnets

be careful with this one! if you have a reverseproxy, then you definitely want to make sure you have real-ip configured correctly, and it's probably a good idea to nullmap the reverseproxy's IP just in case; so if your reverseproxy is sending requests from 172.24.27.9 then that would be --ipu=172.24.27.9/32=

restrict to ip

limit a user to certain IP ranges (CIDR) , using the global-option --ipr

for example, if the user spartacus should get rejected if they're not connecting from an IP that starts with 192.168.123 or 172.16, then you can either specify --ipr=192.168.123.0/24,172.16.0.0/16=spartacus as a commandline option, same as this config file example:

[global]
  ipr: 192.168.123.0/24,172.16.0.0/16=spartacus

repeat the option to map additional users

identity providers

replace copyparty passwords with oauth and such

you can disable the built-in password-based login system, and instead replace it with a separate piece of software (an identity provider) which will then handle authenticating / authorizing of users; this makes it possible to login with passkeys / fido2 / webauthn / yubikey / ldap / active directory / oauth / many other single-sign-on contraptions

some popular identity providers are Authelia (config-file based) and authentik (GUI-based, more complex)

there is a docker-compose example which is hopefully a good starting point (alternatively see ./docs/idp.md if you're the DIY type)

a more complete example of the copyparty configuration options look like this

but if you just want to let users change their own passwords, then you probably want user-changeable passwords instead

generic header auth

other ways to auth by header

if you have a middleware which adds a header with a user identifier, for example tailscale's Tailscale-User-Login: [email protected] then you can automatically auth as alice by defining that mapping with --idp-hm-usr '^Tailscale-User-Login^[email protected]^alice' or the following config file example:

[global]
  idp-hm-usr: ^Tailscale-User-Login^[email protected]^alice

repeat the whole idp-hm-usr option to add more mappings

user-changeable passwords

if permitted, users can change their own passwords in the control-panel

using the cloud as storage

connecting to an aws s3 bucket and similar

there is no built-in support for this, but you can use FUSE-software such as rclone / geesefs / JuiceFS to first mount your cloud storage as a local disk, and then let copyparty use (a folder in) that disk as a volume

if copyparty is unable to access the local folder that rclone/geesefs/JuiceFS provides (for example if it looks invisible) then you may need to run rclone with --allow-other and/or enable user_allow_other in /etc/fuse.conf

you will probably get decent speeds with the default config, however most likely restricted to using one TCP connection per file, so the upload-client won't be able to send multiple chunks in parallel

before v1.13.5 it was recommended to use the volflag sparse to force-allow multiple chunks in parallel; this would improve the upload-speed from 1.5 MiB/s to over 80 MiB/s at the risk of provoking latent bugs in S3 or JuiceFS. But v1.13.5 added chunk-stitching, so this is now probably much less important. On the contrary, nosparse may now increase performance in some cases. Please try all three options (default, sparse, nosparse) as the optimal choice depends on your network conditions and software stack (both the FUSE-driver and cloud-server)

someone has also tested geesefs in combination with gocryptfs with surprisingly good results, getting 60 MiB/s upload speeds on a gbit line, but JuiceFS won with 80 MiB/s using its built-in encryption

you may improve performance by specifying larger values for --iobuf / --s-rd-sz / --s-wr-sz

if you've experimented with this and made interesting observations, please share your findings so we can add a section with specific recommendations :-)

hiding from google

tell search engines you don't wanna be indexed, either using the good old robots.txt or through copyparty settings:

also, --force-js disables the plain HTML folder listing, making things harder to parse for some search engines -- note that crawlers which understand javascript (such as google) will not be affected

themes

you can change the default theme with --theme 2, and add your own themes by modifying browser.css or providing your own css to --css-browser, then telling copyparty they exist by increasing --themes

0. classic dark 2. flat pm-monokai 4. vice
1. classic light 3. flat light 5. hotdog stand

the classname of the HTML tag is set according to the selected theme, which is used to set colors as css variables ++

see the top of ./copyparty/web/browser.css where the color variables are set, and there's layout-specific stuff near the bottom

if you want to change the fonts, see ./docs/rice/

complete examples

listen on port 80 and 443

become a real webserver which people can access by just going to your IP or domain without specifying a port

if you're on windows or macos, then you just need to add the commandline argument -p 80,443 and you're done! nice

if you're on Linux, you have the following 4 options:

reverse-proxy

running copyparty next to other websites hosted on an existing webserver such as nginx, caddy, or apache

you can either:

when running behind a reverse-proxy (this includes services like cloudflare), it is important to configure real-ip correctly, as many features rely on knowing the client's IP. The best/safest approach is to configure your reverse-proxy so it gives copyparty a header which only contains the client's true/real IP-address, and then setting --xff-hdr theHeaderName --rproxy 1 but alternatively, if you want/need to let copyparty handle this, look out for red and yellow log messages which explain how to do that. Basically, the log will say this:

set --xff-hdr to the name of the http-header to read the IP from (usually x-forwarded-for, but cloudflare uses cf-connecting-ip), and then --xff-src to the IP of the reverse-proxy so copyparty will trust the xff-hdr. You will also need to configure --rproxy to 1 if the header only contains one IP (the correct one) or to a negative value if it contains multiple; -1 being the rightmost and most trusted IP (the nearest proxy, so usually not the correct one), -2 being the second-closest hop, and so on

Note that --rp-loc in particular will not work at all unless you configure the above correctly

some reverse proxies (such as Caddy) can automatically obtain a valid https/tls certificate for you, and some support HTTP/2 and QUIC which could be a nice speed boost, depending on a lot of factors

for improved security (and a 10% performance boost) consider listening on a unix-socket with -i unix:770:www:/dev/shm/party.sock (permission 770 means only members of group www can access it)

example webserver / reverse-proxy configs:

real-ip

teaching copyparty how to see client IPs when running behind a reverse-proxy, or a WAF, or another protection service such as cloudflare

if you (and maybe everybody else) keep getting a message that says thank you for playing, then you've gotten banned for malicious traffic. This ban applies to the IP address that copyparty thinks identifies the shady client -- so, depending on your setup, you might have to tell copyparty where to find the correct IP

for most common setups, there should be a helpful message in the server-log explaining what to do, but see docs/xff.md if you want to learn more, including a quick hack to just make it work (which is not recommended, but hey...)

reverse-proxy performance

most reverse-proxies support connecting to copyparty either using uds/unix-sockets (/dev/shm/party.sock, faster/recommended) or using tcp (127.0.0.1)

with copyparty listening on a uds / unix-socket / unix-domain-socket and the reverse-proxy connecting to that:

index.html upload download software
28'900 req/s 6'900 MiB/s 7'400 MiB/s no-proxy
18'750 req/s 3'500 MiB/s 2'370 MiB/s haproxy
9'900 req/s 3'750 MiB/s 2'200 MiB/s caddy
18'700 req/s 2'200 MiB/s 1'570 MiB/s nginx
9'700 req/s 1'750 MiB/s 1'830 MiB/s apache
9'900 req/s 1'300 MiB/s 1'470 MiB/s lighttpd

when connecting the reverse-proxy to 127.0.0.1 instead (the basic and/or old-fasioned way), speeds are a bit worse:

index.html upload download software
21'200 req/s 5'700 MiB/s 6'700 MiB/s no-proxy
14'500 req/s 1'700 MiB/s 2'170 MiB/s haproxy
11'100 req/s 2'750 MiB/s 2'000 MiB/s traefik
8'400 req/s 2'300 MiB/s 1'950 MiB/s caddy
13'400 req/s 1'100 MiB/s 1'480 MiB/s nginx
8'400 req/s 1'000 MiB/s 1'000 MiB/s apache
6'500 req/s 1'270 MiB/s 1'500 MiB/s lighttpd

in summary, haproxy > caddy > traefik > nginx > apache > lighttpd, and use uds when possible (traefik does not support it yet)

permanent cloudflare tunnel

if you have a domain and want to get your copyparty online real quick, either from your home-PC behind a CGNAT or from a server without an existing reverse-proxy setup, one approach is to create a Cloudflare Tunnel (formerly "Argo Tunnel")

I'd recommend making a Locally-managed tunnel for more control, but if you prefer to make a Remotely-managed tunnel then this is currently how:

NOTE: since people will be connecting through cloudflare, as mentioned in real-ip you should run copyparty with --xff-hdr cf-connecting-ip to detect client IPs correctly

config file example:

[global]
  xff-hdr: cf-connecting-ip

prometheus

metrics/stats can be enabled at URL /.cpr/metrics for grafana / prometheus / etc (openmetrics 1.0.0)

must be enabled with --stats since it reduces startup time a tiny bit, and you probably want -e2dsa too

the endpoint is only accessible by admin accounts, meaning the a in rwmda in the following example commandline: python3 -m copyparty -a ed:wark -v /mnt/nas::rwmda,ed --stats -e2dsa

follow a guide for setting up node_exporter except have it read from copyparty instead; example /etc/prometheus/prometheus.yml below

scrape_configs:
  - job_name: copyparty
    metrics_path: /.cpr/metrics
    basic_auth:
      password: wark
    static_configs:
      - targets: ['192.168.123.1:3923']

currently the following metrics are available,

these are available unless --nos-vst is specified:

and these are available per-volume only:

and these are per-volume and total:

some of the metrics have additional requirements to function correctly,

the following options are available to disable some of the metrics:

note: the following metrics are counted incorrectly if multiprocessing is enabled with -j: cpp_http_conns, cpp_http_reqs, cpp_sus_reqs, cpp_active_bans, cpp_total_bans

other extremely specific features

you'll never find a use for these:

custom mimetypes

change the association of a file extension

using commandline args, you can do something like --mime gif=image/jif and --mime ts=text/x.typescript (can be specified multiple times)

copyparty (9001/copyparty)

Searching Database…

What is this?copyparty is a portable, single-file server that turns almost any device into a full-featured file server, supporting resumable uploads/downloads over HTTP(S), WebDAV, SFTP, FTP(S), TFTP and SMB, with a built-in media player, thumbnails and search.
Is this a web app, a CLI tool, or something else?It's a single self-contained Python program (copyparty-sfx.py or copyparty.exe) run from the command line; it then serves a web UI plus WebDAV/FTP/SFTP/TFTP endpoints with no separate install or daemon setup.
How do I get it running?Download the sfx (copyparty-sfx.py) and run it directly, or install via pip, use copyparty.exe on Windows, grab the Arch/Homebrew/Nix packages, run it in Docker, or use uv tool run copyparty.
Do I need to install anything besides Python?No - it only needs Python 2 or 3 to run; everything else, like Pillow for thumbnails or FFmpeg for media indexing, is optional and only unlocks extra features.
What happens if I just run it with no setup?Running copyparty with no arguments (e.g. double-clicking it on Windows) gives everyone read/write access to the current folder, so you'll want to set up accounts and volumes before exposing it.
What devices and OSes can run this?It runs on Windows (exe or sfx), Linux, macOS, FreeBSD, via Arch/Homebrew/Nix packages, and can be installed on Android through Termux, plus there are iPhone/iPad shortcuts since there's no native iOS app.
Is it safe to expose directly to the internet by default?Not without reading the gotchas - the README calls out things like CSP nonce handling and CORS config you should check before exposing copyparty publicly.
Are all the bundled features MIT-licensed?The core project is MIT-licensed, but the README separates out some optional extras as 'optional gpl stuff', so not every bundled feature carries the same license.
What does the unpost feature do?Unpost lets you undo or delete an accidental upload shortly after it happens, straight from the browser UI.
How fast is copyparty?The README notes defaults are usually fine, with roughly 8 GiB/s download and 1 GiB/s upload speeds expected under normal conditions.
Can it deduplicate files automatically?Yes, enabling file indexing lets copyparty use symlink-based deduplication so re-uploaded files don't take up extra disk space.
Does it do more than just serve files?Yes - it includes a media player that plays nearly every audio format with m3u8 playlist support, a markdown viewer/editor, RSS/OPDS feeds, and a file manager with cut/paste/rename.
What are similar projects?sftpgo, alist, dufs, filestash, rclone, spacedrive, duplicati, kubo
Creator
9001
Size
9.6 MB
Stars
47.5K
Age
7y
Commits · 90 Days