Package: copyparty
💾🎉 copypartyturn almost any device into a file server with resumable uploads/downloads usinganyweb browserserver only needs Python (2 or 3), all dependencies optional🔌 protocols:http//webdav//ftp//tftp//smb/cifs📱android app//iPhone shortcuts👉Get started!or visit theread-only demo server👀 running from a basement in finland📷screenshots:browser//upload//unpost//thumbnails//search//fsearch//zip-DL//md-viewerreadme toctopquickstart- just runcopyparty-sfx.py-- that's it! 🎉on servers- you may also want these, especially on serversfeaturestestimonials- small collection of user feedbackmotivations- project goals / philosophynotes- general notesbugs- roughly sorted by chance of encounternot my bugs- same order here toobreaking changes- upgrade notesFAQ- "frequently" asked questionsaccounts and volumes- per-folder, per-user permissionsshadowing- hiding specific subfoldersdotfiles- unix-style hidden files/foldersthe browser- accessing a copyparty server using a web-browsertabs- the main tabs in the uihotkeys- the browser has the following hotkeysnavpane- switching between breadcrumbs or navpanethumbnails- pressgor田to toggle grid-view instead of the file listingzip downloads- download folders (or file selections) asziportarfilesuploading- drag files/folders into the web-browser to uploadfile-search- dropping files into the browser also lets you see if they exist on the serverunpost- undo/delete accidental uploadsself-destruct- uploads can be given a lifetimefile manager- cut/paste, rename, and delete files/folders (if you have permission)batch rename- select some files and pressF2to bring up the rename UImedia player- plays almost every audio format there isaudio equalizer- anddynamic range compressorfix unreliable playback on android- due to phone / app settingsmarkdown viewer- and there aretwoeditorsother trickssearching- search by size, date, path/name, mp3-tags, ...server config- using arguments or config files, or a mix of bothzeroconf- announce enabled services on the LAN (pic)mdns- LAN domain-name and feature announcerssdp- windows-explorer announcerqr-code- print a qr-code(screenshot)for quick accessftp server- an FTP server can be started using--ftp 3921webdav server- with read-write supportconnecting to webdav from windows- using the GUItftp server- a TFTP server (read/write) can be started using--tftp 3969smb server- unsafe, slow, not recommended for wanbrowser ux- tweaking the uifile indexing- enables dedup and music search ++exclude-patterns- to save some timefilesystem guards- avoid traversing into other filesystemsperiodic rescan- filesystem monitoringupload rules- set upload rules using volflagscompress uploads- files can be autocompressed on uploadother flagsdatabase location- in-volume (.hist/up2k.db, default) or somewhere elsemetadata from audio files- set-e2tto index tags on uploadfile parser plugins- provide custom parsers to index additional tagsevent hooks- trigger a program on uploads, renames etc (examples)upload events- the older, more powerful approach (examples)handlers- redefine behavior with plugins (examples)identity providers- replace copyparty passwords with oauth and suchhiding from google- tell search engines you dont wanna be indexedthemescomplete examplesreverse-proxy- running copyparty next to other websitesprometheus- metrics/stats can be enabledpackages- the party might be closer than you thinkarch package- nowavailable on aurmaintained by@icxesfedora package- currentlyNOTavailable oncopr-pypinix package-nix profile install github:9001/copypartynixos modulebrowser support- TLDR: yesclient examples- interact with copyparty using non-browser clientsfolder sync- sync folders to/from copypartymount as drive- a remote copyparty server as a local filesystemandroid app- upload to copyparty with one tapiOS shortcuts- there is no iPhone app, butperformance- defaults are usually fine - expect8 GiB/sdownload,1 GiB/suploadclient-side- when uploading filessecurity- there is adiscord servergotchas- behavior that might be unexpectedcors- cross-site request configfilekeys- prevent filename bruteforcingpassword hashing- you can hash passwordshttps- both HTTP and HTTPS are acceptedrecovering from crashesclient crashesfrefox wsod- firefox 87 can crash during uploadsHTTP API- seedevnotesdependencies- mandatory depsoptional dependencies- install these to enable bonus featuresoptional gpl stuffsfx- the self-contained "binary"copyparty.exe- downloadcopyparty.exe(win8+) orcopyparty32.exe(win7+)install on androidreporting bugs- ideas for context to include in bug reportsdevnotes- for build instructions etc, see./docs/devnotes.mdquickstartjust runcopyparty-sfx.py-- that's it! 🎉or install through pypi:python3 -m pip install --user -U copypartyor if you cannot install python, you can usecopyparty.exeinsteador installon arch╱on NixOS╱through nixor if you are on android,install copyparty in termuxor if you prefer touse docker🐋 you can do that toodocker has all deps built-in, so skip this step:enable thumbnails (images/audio/video), media indexing, and audio transcoding by installing some recommended deps:Alpine:apk add py3-pillow ffmpegDebian:apt install --no-install-recommends python3-pil ffmpegFedora:rpmfusion +dnf install python3-pillow ffmpegFreeBSD:pkg install py39-sqlite3 py39-pillow ffmpegMacOS:port install py-Pillow ffmpegMacOS(alternative):brew install pillow ffmpegWindows:python -m pip install --user -U Pillowinstall python and ffmpeg manually; do not usewingetorMicrosoft Store(it breaks $PATH)copyparty.exe comes withPillowand only needsffmpegseeoptional dependenciesto enable even more featuresrunning copyparty without arguments (for example doubleclicking it on Windows) will give everyone read/write access to the current folder; you may wantaccounts and volumesor seesome usage examplesfor inspiration, or thecomplete windows examplesome recommended options:-e2dsaenables generalfile indexing-e2tsenables audio metadata indexing (needs either FFprobe or Mutagen)-v /mnt/music:/music:r:rw,foo -a foo:barshares/mnt/musicas/music,readable by anyone, and read-write for userfoo, passwordbarreplace:r:rw,foowith:r,footo only make the folder readable byfooand nobody elseseeaccounts and volumes(or--help-accounts) for the syntax and other permissionson serversyou may also want these, especially on servers:contrib/systemd/copyparty.serviceto run copyparty as a systemd service (see guide inside)contrib/systemd/prisonparty.serviceto run it in a chroot (for extra security)contrib/openrc/copypartyto run copyparty on Alpine / Gentoocontrib/rc/copypartyto run copyparty on FreeBSDnixos moduleto run copyparty on NixOS hostscontrib/nginx/copyparty.conftoreverse-proxybehind nginx (for better https)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,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, 3923:http/https, 3945:smb, 3969:tftp, 3990:ftps, 5353:mdns, 12000:passive-ftp)featuresbackend stuff☑ IPv6☑multiprocessing(actual multithreading)☑ volumes (mountpoints)☑accounts☑ftp server☑tftp server☑webdav server☑smb/cifs server☑qr-codefor quick access☑upnp / zeroconf / mdns / ssdp☑event hooks/ script runner☑reverse-proxy supportupload☑ basic: plain multipart, ie6 support☑up2k: js, resumable, multithreadedunaffected by cloudflare's max-upload-size (100 MiB)☑ stash: simple PUT filedropper☑ filename randomizer☑ write-only folders☑unpost: undo/delete accidental uploads☑self-destruct(specified server-side or client-side)☑ symlink/discard duplicates (content-matching)download☑ single files in browser☑folders as zip / tar files☑FUSE client(read-only)browser☑navpane(directory tree sidebar)☑ file manager (cut/paste, delete,batch-rename)☑ audio player (withOS media controlsand opus transcoding)☑ image gallery with webm player☑ textfile browser with syntax hilighting☑thumbnails☑ ...of images using Pillow, pyvips, or FFmpeg☑ ...of videos using FFmpeg☑ ...of audio (spectrograms) using FFmpeg☑ cache eviction (max-age; maybe max-size eventually)☑ SPA (browse while uploading)server indexing☑locate files by contents☑ search by name/path/date/size☑search by ID3-tags etc.client support☑folder sync☑curl-friendlymarkdown☑viewer☑ editor (sure why not)PS: something missing? post any crazy ideas you've got as afeature requestordiscussion🤙testimonialssmall collection of user feedbackgood enough,surprisingly correct,certified good software,just works,why,wow this is better than nextcloudmotivationsproject goals / philosophyinverse linux philosophy -- do all the things, and do anokayjobquick drop-in service to get a lot of features in a pinchsome ofthe alternativesmight be a better fit for yourun anywhere, support everythingas many web-browsers and python versions as possibleevery browser should at least be able to browse, download, upload filesbe a good emergency solution for transferring stuff between ancient boxesminimal dependenciesbut optional dependencies adding bonus-features are okeverything being plaintext makes it possible to proofread for malicious codeno preparations / setup necessary, just run the sfx (which is also plaintext)adaptable, malleable, hackableno build steps; modify the js/python without needing node.js or anything like thatnotesgeneral notes:paper-printing is affected by dark/light-mode! use lightmode for color, darkmode for grayscalebecause no browsers currently implement the media-query to do this properly orzbrowser-specific:iPhone/iPad: use Firefox to download filesAndroid-Chrome: increase "parallel uploads" for higher speed (android bug)Android-Firefox: takes a while to select files (their fix for ☝️)Desktop-Firefox:may use gigabytes of RAM if your files are massiveseems to be OK nowDesktop-Firefox:may stop you from unplugging USB flashdrivesuntil you visitabout:memoryand clickMinimize memory usageserver-os-specific:RHEL8 / Rocky8: you can run copyparty using/usr/libexec/platform-pythonserver notes:pypy is supported but regular cpython is faster if you enable the databasebugsroughly sorted by chance of encountergeneral:--th-ff-jpgmay fix video thumbnails on some FFmpeg versions (macos, some linux)--th-ff-swrmay fix audio thumbnails on some FFmpeg versionsif theup2k.db(filesystem index) is on a samba-share or network disk, you'll get unpredictable behavior if the share is disconnected for a bituse--histor thehistvolflag (-v [...]:c,hist=/tmp/foo) to place the db on a local disk insteadall volumes must exist / be available on startup; up2k (mtp especially) gets funky otherwiseprobably more, pls let me knowpython 3.4 and older (including 2.7):many rare and exciting edge-cases becausepython didn't handle EINTR yetdownloads from copyparty may suddenly fail, but uploadsshouldbe finepython 2.7 on Windows:cannot index non-ascii filenames with-e2dcannot handle filenames with mojibakenot my bugssame order here tooChrome issue 1317069-- if you try to upload a folder which contains symlinks by dragging it into the browser, the symlinked files will not get uploadedChrome issue 1352210-- plaintext http may be faster at filehashing than https (but also extremely CPU-intensive)Firefox issue 1790500-- entire browser can crash after uploading ~4000 small filesAndroid: music playback randomly stops due tobattery usage settingsiPhones: the volume control doesn't work becauseapple doesn't want it toAudioContextwill probably never be a viable workaround as apple introduces new issues faster than they fix current onesiPhones: the preload feature (in the media-player-options tab) can cause a tiny audio glitch 20sec before the end of each song, but disabling it may cause worse iOS bugs to appear insteadjust a hunch, but disabling preloading may cause playback to stop entirely, or possibly mess with bluetooth speakerstried to add a tooltip regarding this but looks like apple broke my tooltipsWindows: folders cannot be accessed if the name ends with.python or windows bugWindows: msys2-python 3.8.6 occasionally throwsRuntimeError: release unlocked lockwhen leaving a scoped mutex in up2kthis is an msys2 bug, the regular windows edition of python is fineVirtualBox: sqlite throwsDisk I/O Errorwhen running in a VM and the up2k database is in a vboxsfuse--histor thehistvolflag (-v [...]:c,hist=/tmp/foo) to place the db inside the vm insteadalso happens on mergerfs, so put the db elsewhereUbuntu: dragging files from certain folders into firefox or chrome is impossibledue to snap security policies -- seesnap connections firefoxfor the allowlist,removable-mediapermits all of/mntand/mediaapparentlybreaking changesupgrade notes1.9.16(2023-11-04):--stats/prometheus:cpp_bansrenamed tocpp_active_bans, and that +cpp_uptimeare gauges1.6.0(2023-01-29):http-api: delete/move is nowPOSTinstead ofGETeverything other thanGETandHEADmust passcors validation1.5.0(2022-12-03):new chunksize formulafor files larger than 128 GiBusers:upgrade to the latestcli uploaderif you use thatdevs:update third-party up2k clients (if those even exist)FAQ"frequently" asked questionsis it possible to block read-access to folders unless you know the exact URL for a particular file inside?yes, using thegpermission, see the examples thereyou can also do this with linux filesystem permissions;chmod 111 musicwill make it possible to access files and folders inside themusicfolder but not list the immediate contents -- also works with other software, not just copypartycan I make copyparty download a file to my server if I give it a URL?yes, usinghooksi want to learn python and/or programming and am considering looking at the copyparty source code in that occasion_|_____|_(_|(_)||(_)|_accounts and volumesper-folder, per-user permissions  - if your setup is getting complex, consider making aconfig fileinstead of using argumentsmuch easier to manage, and you can modify the config at runtime withsystemctl reload copypartyor more conveniently using the[reload cfg]button in the control-panel (if the user hasa/admin in any volume)changes to the[global]config section requires a restart to take effecta quick summary can be seen using--help-accountsconfiguring accounts/volumes with arguments:-a usr:pwdadds accountusrwith passwordpwd-v .::radds current-folder.as the webroot,readable by anyonethe syntax is-v src:dst:perm:perm:...so local-path, url-path, and one or more permissions to setgranting the same permissions to multiple accounts:-v .::r,usr1,usr2:rw,usr3,usr4= usr1/2 read-only, 3/4 read-writepermissions:r(read): browse folder contents, download files, download as zip/tarw(write): upload files, move filesintothis folderm(move): move files/foldersfromthis folderd(delete): delete files/folders.(dots): user can ask to show dotfiles in directory listingsg(get): only download files, cannot see folder contents or zip/tarG(upget): same asgexcept uploaders get to see their ownfilekeys(seefkin examples below)h(html): same asgexcept folders return their index.html, and filekeys are not necessary for index.htmla(admin): can see upload time, uploader IPs, config-reloadA("all"): same asrwmda.(read/write/move/delete/admin/dotfiles)examples:add accounts named u1, u2, u3 with passwords p1, p2, p3:-a u1:p1 -a u2:p2 -a u3:p3make folder/srvthe root of the filesystem, read-only by anyone:-v /srv::rmake folder/mnt/musicavailable at/music, read-only for u1 and u2, read-write for u3:-v /mnt/music:music:r,u1,u2:rw,u3unauthorized users accessing the webroot can see that themusicfolder exists, but cannot open itmake folder/mnt/incomingavailable at/inc, write-only for u1, read-move for u2:-v /mnt/incoming:inc:w,u1:rm,u2unauthorized users accessing the webroot can see that theincfolder exists, but cannot open itu1can open theincfolder, but cannot see the contents, only upload new files to itu2can browse it and move filesfrom/incinto any folder whereu2has write-accessmake folder/mnt/ssavailable at/i, read-write for u1, get-only for everyone else, and enable filekeys:-v /mnt/ss:i:rw,u1:g:c,fk=4c,fk=4sets thefk(filekey) volflag to 4, meaning each file gets a 4-character accesskeyu1can upload files, browse the folder, and see the generated filekeysother users cannot browse the folder, but can access the files if they have the full file URL with the filekeyreplacing thegpermission withwgwould let anonymous users upload files, but not see the required filekey to access itreplacing thegpermission withwGwould let anonymous users upload files, receiving a working direct link in returnanyone trying to bruteforce a password gets banned according to--ban-pw; default is 24h ban for 9 failed attempts in 1 hourshadowinghiding specific subfolders  by mounting another volume on top of themfor example-v /mnt::r -v /var/empty:web/certs:rmounts the server folder/mntas the webroot, but another volume is mounted at/web/certs-- so visitors can only see the contents of/mntand/mnt/web(at URLs/and/web), but not/mnt/web/certsbecause URL/web/certsis mapped to/var/emptydotfilesunix-style hidden files/folders  by starting the name with a dotanyone can access these if they know the name, but they normally don't appear in directory listingsa client can request to see dotfiles in directory listings if global option-edis specified, or the volume has volflagdots, or the user has permission.dotfiles do not appear in search results unless one of the above is true,andthe global option / volflagdotsrchis setthe browseraccessing a copyparty server using a web-browsertabsthe main tabs in the ui[🔎]searchby size, date, path/name, mp3-tags ...[🧯]unpost: undo/delete accidental uploads[🚀]and[🎈]are theuploaders[📂]mkdir: create directories[📝]new-md: create a new markdown document[📟]send-msg: either to server-log or into textfiles if--urlform save[🎺]audio-player config options[⚙️]general client config optionshotkeysthe browser has the following hotkeys  (always qwerty)?show hotkeys helpBtoggle breadcrumbs /navpaneI/Kprev/next folderMparent folder (or unexpand current)Vtoggle folders / textfiles in the navpaneGtoggle list /grid view-- same as田bottom-rightTtoggle thumbnails / iconsESCclose various thingsctrl-Kdelete selected files/foldersctrl-Xcut selected files/foldersctrl-VpasteYdownload selected filesF2renameselected file/folderwhen a file/folder is selected (in not-grid-view):Up/Downmove cursorshift+Up/Downselect and move cursorctrl+Up/Downmove cursor and scroll viewportSpacetoggle file selectionCtrl-Atoggle select allwhen a textfile is open:I/Kprev/next textfileStoggle selection of open fileMclose textfilewhen playing audio:J/Lprev/next songU/Oskip 10sec back/forward0..9jump to 0%..90%Pplay/pause (also starts playing the folder)Ydownload filewhen viewing images / playing videos:J/L, Left/Rightprev/next fileHome/Endfirst/last fileFtoggle fullscreenStoggle selectionRrotate clockwise (shift=ccw)Ydownload fileEscclose viewervideos:U/Oskip 10sec back/forward0..9jump to 0%..90%P/K/Spaceplay/pauseMmuteCcontinue playing next videoVloop entire file[loop range (start)]loop range (end)when the navpane is open:A/Dadjust tree widthin thegrid view:Stoggle multiselectshift+A/Dzoomin the markdown editor:^ssave^hheader^kautoformat table^ujump to next unicode character^etoggle editor / preview^up, ^downjump paragraphsnavpaneswitching between breadcrumbs or navpaneclick the🌲or pressing theBhotkey to toggle between breadcrumbs path (default), or a navpane (tree-browser sidebar thing)[+]and[-](or hotkeysA/D) adjust the size[🎯]jumps to the currently open folder[📃]toggles between showing folders and textfiles[📌]shows the name of all parent folders in a docked panel[a]toggles automatic widening as you go deeper[↵]toggles wordwrap[👀]show full name on hover (if wordwrap is off)thumbnailspressgor田to toggle grid-view instead of the file listing  andttoggles icons / thumbnailscan be made default globally with--gridor per-volume with volflaggridit does static images with Pillow / pyvips / FFmpeg, and uses FFmpeg for video files, so you may want to--no-thumbor maybe just--no-vthumbdepending on how dangerous your users arepyvips is 3x faster than Pillow, Pillow is 3x faster than FFmpegdisable thumbnails for specific volumes with volflagdthumbfor all, ordvthumb/dathumb/dithumbfor video/audio/images onlyaudio files are covnerted 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.jpgand, if you enablefile indexing, it will also try those names as dotfiles (.folder.jpgand so), and then fallback on the first picture in the folder (if it has any pictures at all)in the grid/thumbnail view, if the audio player panel is open, songs will start playing when clickedindicated by the audio files having the ▶ icon instead of 💾enablingmultiselectlets you click files to select them, and then shift-click another file for range-selectmultiselectis mostly intended for phones/tablets, but theseloption in the[⚙️] settingstab is better suited for desktop use, allowing selection by CTRL-clicking and range-selection with SHIFT-click, all without affecting regular clickingzip downloadsdownload folders (or file selections) asziportarfilesselect which type of archive you want in the[⚙️] configtab:nameurl-suffixdescriptiontar?tarplain gnutar, works great withcurl | tar -xvpax?tar=paxpax-format tar, futureproof, not as fasttgz?tar=gzgzip compressed gnu-tar (slow), forcurl | tar -xvztxz?tar=xzgnu-tar with xz / lzma compression (v.slow)zip?zip=utf8works everywhere, glitchy filenames on win7 and olderzip_dos?ziptraditional cp437 (no unicode) to fix glitchy filenameszip_crc?zip=crccp437 with crc32 computed early for truly ancient softwaregzip default level is3(0=fast, 9=best), change with?tar=gz:9xz default level is1(0=fast, 9=best), change with?tar=xz:9bz2 default level is2(1=fast, 9=best), change with?tar=bz2:9hidden files (dotfiles) are excluded unless account is allowed to list themup2k.dbanddir.txtis always excludedbsdtar supports streaming unzipping:curl foo?zip=utf8 | bsdtar -xvgood, because copyparty's zip is faster than tar on small fileszip_crcwill take longer to download since the server has to read each file twicethis is only to support MS-DOS PKZIP v2.04g (october 1993) and olderhow are you accessing copyparty actuallyyou 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 rightcool trick: download a folder by appending url-params?tar&opusto transcode all audio files (except aac|m4a|mp3|ogg|opus|wma) to opus before they're added to the archivesuper useful if you're 5 minutes away from takeoff and realize you don't have any music on your phone but your server only has flac files and downloading those will burn through all your data + there wouldn't be enough time anywaysand url-params&j/&wproduce jpeg/webm thumbnails/spectrograms instead of the original audio/video/imagescan also be used to pregenerate thumbnails; combine with--th-maxage=9999999or--th-clean=0uploadingdrag files/folders into the web-browser to upload  (or use thecommand-line uploader)this initiates an upload usingup2k; there are two uploaders available:[🎈] bup, the basic uploader, supports almost every browser since netscape 4.0[🚀] up2k, the good / fancy oneNB: you can undo/delete your own uploads with[🧯]unpostup2k has several advantages:you can drop folders into the browser (files are added recursively)files are processed in chunks, and each chunk is checksummeduploads autoresume if they are interrupted by network issuesuploads resume if you reboot your browser or pc, just upload the same files againserver detects any corruption; the client reuploads affected chunksthe client doesn't upload anything that already exists on the servermuch higher speeds than ftp/scp/tarpipe on some internet connections (mainly american ones) thanks to parallel connectionsthe last-modified timestamp of the file is preservedit is perfectly safe to restart / upgrade copyparty while someone is uploading to it!all known up2k clients will resume just fine 💪seeup2kfor details on how it works, or watch ademo videoprotip:you can avoid scaring away users withcontrib/plugins/minimal-up2k.jswhich makes it lookmuch simplerprotip:if you enablefaviconin the[⚙️] settingstab (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 completionthe up2k UI is the epitome of polished inutitive experiences:"parallel uploads" specifies how many chunks to upload at the same time[🏃]analysis of other files should continue while one is uploading[🥔]shows a simpler UI for faster uploads from slow devices[🎲]generate random filenames during upload[📅]preserve last-modified timestamps; server times will match yours[🔎]switch between upload andfile-searchmodeignore[🔎]if you add files by dragging them into the browserand then theres the tabs below it,[ok]is the files which completed successfully[ng]is the ones that failed / got rejected (already exists, ...)[done]shows a combined list of[ok]and[ng], chronological order[busy]files which are currently hashing, pending-upload, or uploadingplus up to 3 entries each from[done]and[que]for context[que]is all the files that are still queuednote that since up2k has to read each file twice,[🎈] bupcantheoreticallybe 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 enableturboin the[⚙️] configtab, but please read the tooltip on that buttonfile-searchdropping files into the browser also lets you see if they exist on the serverwhen you drag/drop files into the browser, you will see two dropzones:UploadandSearchon a phone? toggle the[🔎]switch green before tapping the big yellow Search button to select your filesthe files will be hashed on the client-side, and each hash is sent to the server, which checks if that file exists somewherefiles go into[ok]if they exist (and you get a link to where it is), otherwise they land in[ng]the main reason filesearch is combined with the uploader is cause the code was too spaghetti to separate it out somewhere else, this is no longer the case but now i've warmed up to the idea too muchunpostundo/delete accidental uploadsyou can unpost even if you don't have regular move/delete access, however only for files uploaded within the past--unpostseconds (default 12 hours) and the server must be running with-e2dself-destructuploads can be given a lifetime,  afer which they expire / self-destructthe feature must be enabled per-volume with thelifetimeupload rulewhich sets the upper limit for how long a file gets to stay on the serverclients can specify a shorter expiration time using theup2k ui-- the relevant options become visible upon navigating into a folder withlifetimesenabled -- or by using thelifeupload modifierspecifying 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 uifile managercut/paste, rename, and delete files/folders (if you have permission)file selection: click somewhere on the line (not the link itsef), then:spaceto toggleup/downto moveshift-up/downto move-and-selectctrl-shift-up/downto also scrollshift-click another line for range-selectcut: select some files andctrl-xpaste:ctrl-vin another folderrename:F2you can move files across browser tabs (cut in one tab, paste in another)batch renameselect some files and pressF2to bring up the rename UIquick explanation of the buttons,[✅ apply rename]confirms and begins renaming[❌ cancel]aborts and closes the rename window[↺ reset]reverts any filename changes back to the original name[decode]does a URL-decode on the filename, fixing stuff like&amp;and%20[advanced]toggles advanced modeadvanced 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 bothin advanced mode,[case]toggles case-sensitive regexregexis the regex pattern to apply to the original filename; any files which don't match will be skippedformatis the new filename, taking values from regex capturing groups and/or from file tagsvery loosely based on foobar2000 syntaxpresetslets you save rename rules for lateravailable functions:$lpad(text, length, pad_char)$rpad(text, length, pad_char)so,say you have a file namedmeganeko - Eclipse - 07 Sirius A.mp3(absolutely fantastic album btw) and the tags are:Album:Eclipse,Artist:meganeko,Title:Sirius A,tn:7you could use just regex to rename it:regex=(.*) - (.*) - ([0-9]{2}) (.*)format=(3). (1) - (4)output=07. meganeko - Sirius A.mp3or you could use just tags:format=$lpad((tn),2,0). (artist) - (title).(ext)output=7. meganeko - Sirius A.mp3or a mix of both:regex=- ([0-9]{2})format=(1). (artist) - (title).(ext)output=07. meganeko - Sirius A.mp3the metadata keys you can use in the format field are the ones in the file-browser table header (whatever is collected with-mteand-mtp)media playerplays 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|wavsome hilights:OS integration; control playback from your phone's lockscreen (windows//iOS//android)shows the audio waveform in the seekbarnot perfectly gapless but can get really close (see settings + eq below); good enough to enjoy gapless albums as intendedclick theplaylink next to an audio file, or copy the link target toshare it(optionally with a timestamp to start playing from, like that example does)open the[🎺]media-player-settings tab to configure it,"switches":[🔀]shuffles the files inside each folder[preload]starts loading the next track when it's about to end, reduces the silence between songs[full]does a full preload by downloading the entire next file; good for unreliable connections, bad for slow connections[~s]toggles the seekbar waveform display[/np]enables buttons to copy the now-playing info as an irc message[os-ctl]makes it possible to control audio playback from the lockscreen of your device (enablesmediasession)[seek]allows seeking with lockscreen controls (buggy on some devices)[art]shows album art on the lockscreen[🎯]keeps the playing song scrolled into view (good when using the player as a taskbar dock)[⟎]shrinks the playback controls"buttons":[uncache]may fix songs that won't play correctly due to bad files in browser cache"at end of folder":[loop]keeps looping the folder[next]plays into the next folder"transcode":[flac]convertsflacandwavfiles into opus[aac]convertsaacandm4afiles into opus[oth]converts all other known formats into opusaac|ac3|aif|aiff|alac|alaw|amr|ape|au|dfpwm|dts|flac|gsm|it|m4a|mo3|mod|mp2|mp3|mpc|mptm|mt2|mulaw|ogg|okt|opus|ra|s3m|tak|tta|ulaw|wav|wma|wv|xm|xpk"tint" reduces the contrast of the playback baraudio equalizeranddynamic range compressorcan also boost the volume in general, or increase/decrease stereo width (likecrossfeedjust 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 androiddue 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 bydisabling power savingin theapp settingsof the browser you use for music streaming (preferably a dedicated one)markdown viewerand there aretwoeditorsthere is a built-in extension for inline clickable thumbnails;enable it by adding<!-- th -->somewhere in the docadd thumbnails with!th[l](your.jpg)wherelmeans left-align (r= right-align)a single line with---clears the float / inliningin the case of README.md being displayed below a file listing, thumbnails will open in the gallery viewerother notes,the document preview has a max-width which is the same as an A4 paper when printedother tricksyou can link a particular timestamp in an audio file by adding it to the URL, such as&20/&20s/&1m20/&t=1:20after the.../#af-c8960dabenabling the audio equalizer can help make gapless albums fully gapless in some browsers (chrome), so consider leaving it on with all the values at zeroget a plaintext file listing by adding?ls=tto a URL, or a compact colored one with?ls=v(for unix terminals)if you are using media hotkeys to switch songs and are getting tired of seeing the OSD popup which Windows doesn't let you disable, consider./contrib/media-osd-bgone.ps1click the bottom-leftπto open a javascript prompt for debuggingfiles named.prologue.html/.epilogue.htmlwill be rendered before/after directory listings unless--no-loguesfiles namedREADME.md/readme.mdwill be rendered after directory listings unless--no-readme(but.epilogue.htmltakes precedence)README.mdand*logue.htmlcan contain placeholder values which are replaced server-side before embedding into directory listings; see--help-expsearchingsearch by size, date, path/name, mp3-tags, ...when started with-e2dsacopyparty will scan/index all your files. This avoids duplicates on upload, and also makes the volumes searchable through the web-ui:make search queries bysize/date/directory-path/filename, or...drag/drop a local file to see if the same contents exist somewhere on the server, seefile-searchpath/name queries are space-separated, AND'ed together, and words are negated with a-prefix, so for example:path:shibayan -bossafinds all files where one of the folders containshibayanbut filters out any results wherebossaexists somewhere in the pathname:demetori styxgives yougood stufftherawfield 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-e2tsto also scan/index tags from music files, which brings us over to:server configusing arguments or config files, or a mix of both:config files (-c some.conf) can set additional commandline arguments; see./docs/example.confand./docs/example2.confkill -s USR1(same assystemctl reload copyparty) to reload accounts and volumes from config files without restartingor click the[reload cfg]button in the control-panel if the user hasa/admin in any volumechanges to the[global]config section requires a restart to take effectNB:as humongous as this readme is, there is also a lot of undocumented features. Run copyparty with--helpto see all available global options; all of those can be used in the[global]section of config files, and everything listed in--help-flagscan be used in volumes as volflags.if running in docker/podman, try this:docker run --rm -it copyparty/ac --helpzeroconfannounce enabled services on the LAN (pic)  ---zenables bothmdnsandssdp--z-on/--z-off' limits the feature to certain networksmdnsLAN domain-name and feature announcerusesmulticast dnsto give copyparty a domain which any machine on the LAN can use to access itall enabled services (webdav,ftp,smb) will appear in mDNS-aware file managers (KDE, gnome, macOS, ...)the domain will behttp://partybox.localif the machine's hostname ispartyboxunless--namespecifies soemthing elsessdpwindows-explorer announcerusesssdpto make copyparty appear in the windows file explorer on all machines on the LANdoubleclicking the icon opens the "connect" page which explains how to mount copyparty as a local filesystemif copyparty does not appear in windows explorer, use--zsvto see why:maybe the discovery multicast was sent from an IP which does not intersect with the server subnetsqr-codeprint a qr-code(screenshot)for quick access,  great between phones on android hotspots which keep changing the subnet--qrenables it--qrsdoes https instead of http--qrl lootbox/?pw=hunter2appends to the url, linking to thelootboxfolder with passwordhunter2--qrz 1forces 1x zoom instead of autoscaling to fit the terminal size1x may render incorrectly on some terminals/fonts, but 2x should always workit uses the server hostname ifmdnsis enbled, otherwise it'll use your external ip (default route) unless--qrispecifies a specific ip-prefix or domainftp serveran FTP server can be started using--ftp 3921,  and/or--ftpsfor explicit TLS (ftpes)based onpyftpdlibneeds a dedicated port (cannot share with the HTTP/HTTPS API)uploads are not resumable -- delete and restart if necessaryruns in active mode by default, you probably want--ftp-pr 12000-13000if you enable bothftpandftps, the port-range will be divided in halfsome older software (filezilla on debian-stable) cannot passive-mode with TLSlogin with any username + your password, or put your password in the username fieldsome recommended FTP / FTPS clients;wark= example password:https://winscp.net/eng/download.phphttps://filezilla-project.org/struggles a bit with ftps in active-mode, but is fine otherwisehttps://rclone.org/does FTPS withtls=false explicit_tls=truelftp -u k,wark -p 3921 127.0.0.1 -e lslftp -u k,wark -p 3990 127.0.0.1 -e 'set ssl:verify-certificate no; ls'webdav serverwith read-write support,  supports winXP and later, macos, nautilus/gvfsclick theconnectbutton in the control-panel to see connection instructions for windows, linux, macosgeneral usage:login with any username + your password, or put your password in the username field (password field can be empty/whatever)on macos, connect from finder:[Go] -> [Connect to Server...] ->http://192.168.123.1:3923/in order to grant full write-access to webdav clients, the volflagdawmust be set and the account must also have delete-access (otherwise the client won't be allowed to replace the contents of existing files, which is how webdav works)connecting to webdav from windowsusing the GUI  (winXP or later):rightclick [my computer] -> [map network drive] -> Folder:http://192.168.123.1:3923/on winXP only, click theSign up for online storagehyperlink instead and put the URL thereproviding your password as the username is recommended; the password field can be anything or emptyknown client bugs:win7+ doesn't actually send the password to the server when reauthenticating after a reboot unless you first try to login with an incorrect password and then switch to the correct passwordor just type your password into the username field instead to get around it entirelyconnecting to a folder which allows anonymous read will make writing impossible, as windows has decided it doesn't need to loginworkaround: connect twice; first to a folder which requires auth, then to the folder you actually want, and leave both of those mountedwin7+ may open a new tcp connection for every file and sometimes forgets to close them, eventually needing a rebootmaybe NIC-related (??), happens with win10-ltsc on e1000e but not virtiowindows cannot access folders which contain filenames with invalid unicode or forbidden characters (<>:"/\|?*), or names ending with.winxp cannot show unicode characters outside ofsome rangelatin-1 is fine, hiragana is not (not even as shift-jis on japanese xp)tftp servera TFTP server (read/write) can be started using--tftp 3969(you probably wantftpinstead unless you areactuallycommunicating 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 🎉based onpartftpyno accounts; read from world-readable folders, write to world-writable, overwrite in world-deletableneeds a dedicated port (cannot share with the HTTP/HTTPS API)run as root (or see below) to use the spec-recommended port69(nice)can reply from a predefined portrange (good for firewalls)only supports the binary/octet/image transfer mode (no netascii)RFC 7440isnotsupported, so will be extremely slow over WANassuming default blksize (512), expect 1100 KiB/s over 100BASE-T, 400-500 KiB/s over wifi, 200 on bad wifimost 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;on linux:iptables -t nat -A PREROUTING -i eth0 -p udp --dport 69 -j REDIRECT --to-port 3969some recommended TFTP clients:curl (cross-platform, read/write)get:curl --tftp-blksize 1428 tftp://127.0.0.1:3969/firmware.binput:curl --tftp-blksize 1428 -T firmware.bin tftp://127.0.0.1:3969/windows:tftp.exe(you probably already have it)tftp -i 127.0.0.1 put firmware.binlinux:tftp-hpa,atftpatftp --option "blksize 1428" 127.0.0.1 3969 -p -l firmware.bin -r firmware.bintftp -v -m binary 127.0.0.1 3969 -c put firmware.binsmb serverunsafe, slow, not recommended for wan,  enable with--smbfor read-only or--smbwfor read-writeclick theconnectbutton in the control-panel to see connection instructions for windows, linux, macosdependencies:python3 -m pip install --user -U impacket==0.11.0newer versions of impacket will hopefully work just fine but there is monkeypatching so maybe notsomeBIG WARNINGSspecific to SMB/CIFS, in decreasing importance:not entirely confident that read-only is read-onlythe smb backend is not fully integrated with vfs, meaning there could be security issues (path traversal). Please use--smb-port(see below) andprisonpartyaccount passwords work per-volume as expected, and so does account permissions (read/write/move/delete), but--smbwmust be given to allow write-access from smbshadowingprobably works as expected but no guaranteesand some minor issues,clients only see the first ~400 files in big folders;impacket#1433hot-reload of server config (/?reload=cfg) does not include the[global]section (commandline args)listens on the first IPv4-iinterface only (default = :: = 0.0.0.0 = all)login doesn't work on winxp, but anonymous access is ok -- remove all accounts from copyparty config for that to workwin10 onwards does not allow connecting anonymously / without accountson windows, creating a new file through rightclick --> new --> textfile throws an error due to impacket limitations -- hit OK and F5 to get your filepython3 onlyslow (the builtin webdav support in windows is 5x faster, and rclone-webdav is 30x faster)known client bugs:on win7 only,--smb1is much faster than smb2 (default) because it keeps rescanning folders on smb2however smb1 is buggy and is not enabled by default on win10 onwardswindows cannot access folders which contain filenames with invalid unicode or forbidden characters (<>:"/\|?*), or names ending with.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 3945and then using NAT on the server to forward the traffic from 445 to there;on linux:iptables -t nat -A PREROUTING -i eth0 -p tcp --dport 445 -j REDIRECT --to-port 3945authenticate with one of the following:username$username, password$passwordusername$password, passwordkbrowser uxtweaking the uiset default sort order globally with--sortor per-volume with thesortvolflag; specify one or more comma-separated columns to sort by, and prefix the column name with-for reverse sortthe column names you can use are visible as tooltips when hovering over the column headers in the directory listing, for examplehref ext sz ts tags/.up_at tags/Cirle tags/.tn tags/Artist tags/Titleto sort in music order (album, track, artist, title) with filename as fallback, you could--sort tags/Cirle,tags/.tn,tags/Artist,tags/Title,hrefto sort by upload date, first enable showing the upload date in the listing with-e2d -mte +.up_atand then--sort tags/.up_atfile indexingenables dedup and music search ++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:-e2denables file indexing on upload-e2dsalso scans writable folders for new files on startup-e2dsaalso scans all mounted volumes (including readonly ones)-e2tenables metadata indexing on upload-e2tsalso scans for tags in all files that don't have tags yet-e2tsralso deletes all existing tags, doing a full reindex-e2vverfies file integrity at startup, comparing hashes from the db-e2vupatches the database with the new hashes from the filesystem-e2vppanics and kills copyparty instead--xlinkenables deduplication across volumesthe same arguments can be set as volflags, in addition tod2d,d2ds,d2t,d2ts,d2vfor disabling:-v ~/music::r:c,e2ds,e2tsrdoes a full reindex of everything on startup-v ~/music::r:c,d2ddisablesallindexing, even if any-e2*are on-v ~/music::r:c,d2tdisables all-e2t*(tags), does not affect-e2d*-v ~/music::r:c,d2dsdisables on-boot scans; only index new uploads-v ~/music::r:c,d2tssame except only affecting tagsnote:upload-times can be displayed in the file listing by enabling the.up_atmetadata key, either globally with-e2d -mte +.up_ator per-volume with volflagse2d,mte=+.up_at(will have a ~17% performance impact on directory listings)e2tsris probably always overkill, sincee2ds/e2dsawould pick up any file modifications ande2tswould then reindex those, unless there is a new copyparty version with new parsers and the release note says otherwisethe rescan button in the admin panel has no effect unless the volume has-e2dsor higherdeduplication is possible on windows if you run copyparty as administrator (not saying you should!)exclude-patternsto 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:initial indexing is way faster, especially when the volume is on a network diskmakes it impossible tofile-searchif someone uploads the same file contents, the upload will not be detected as a dupe, so it will not get symlinked or rejectedsimilarly, you can fully ignore files/folders using--no-idx [...]and:c,noidx=\.iso$when running on macos, all the usual apple metadata files are excluded by defaultif you set--no-hash [...]globally, you can enable hashing for specific volumes using flag:c,nohash=filesystem guardsavoid traversing into other filesystems  using--xdev/ volflag:c,xdev, skipping any symlinks or bind-mounts to another HDD for exampleand/or you can--xvol/:c,xvolto ignore all symlinks leaving the volume's top directory, but still allow bind-mounts pointing elsewheresymlinks are permitted withxvolif they point into another volume where the user has the same level of accessthese options will reduce performance; unlikely worst-case estimates are 14% reduction for directory listings, 35% for download-as-taras of copyparty v1.7.0 these options also prevent file access at runtime -- in previous versions it was just hints for the indexerperiodic rescanfilesystem 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 dateargument--re-maxage 60will rescan all volumes every 60 sec, same as volflag:c,scan=60to specify it per-volumeuploads 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, ...)upload rulesset upload rules using volflags,  some examples::c,sz=1k-3msets allowed filesize between 1 KiB and 3 MiB inclusive (suffixes:b,k,m,g):c,df=4gblock uploads if there would be less than 4 GiB free disk space afterwards:c,vmaxb=1gblock uploads if total volume size would exceed 1 GiB afterwards:c,vmaxn=4kblock uploads if volume would contain more than 4096 files afterwards:c,nosubdisallow uploading into subdirectories; goes well withrotnandrotf::c,rotn=1000,2moves uploads into subfolders, up to 1000 files in each folder before making a new one, two levels deep (must be at least 1):c,rotf=%Y/%m/%d/%Henforces files to be uploaded into a structure of subfolders according to that date formatif someone uploads to/foo/barthe path would be rewritten to/foo/bar/2021/08/06/23for examplebut the actual value is not verified, just the structure, so the uploader can choose any values which conform to the format stringjust to avoid additional complexity in up2k which is enough of a mess already:c,lifetime=300delete uploaded files when they become 5 minutes oldyou can also set transaction limits which apply per-IP and per-volume, but these assume-j 1(default) otherwise the limits will be off, for example-j 4would allow anywhere between 1x and 4x the limits you set depending on which processing node the client gets routed to:c,maxn=250,3600allows 250 files over 1 hour from each IP (tracked per-volume):c,maxb=1g,300allows 1 GiB total over 5 minutes from each IP (tracked per-volume)notes:vmaxbandvmaxnrequires either thee2dsvolflag or-e2dsaglobal-optioncompress uploadsfiles can be autocompressed on upload,  either on user-request (if config allows) or forced by server-configvolflaggzallows gz compressionvolflagxzallows lzma compressionvolflagpkforcescompression on all filesurl parameterpkrequests compression with server-default algorithmurl parametergzorxzrequests compression with a specific algorithmurl parameterxzrequests xz compressionthings to note,thegzandxzarguments take a single optional argument, the compression level (range 0 to 9)thepkvolflag takes the optional argumentALGORITHM,LEVELwhich will then be forced for all uploads, for examplegz,9orxz,0default compression is gzip level 9all upload methods except up2k are supportedthe files will be indexed after compression, so dupe-detection and file-search will not work as expectedsome examples,-v inc:inc:w:c,pk=xz,0folder named inc, shared at inc, write-only for everyone, forces xz compression at level 0-v inc:inc:w:c,pksame write-only inc, but forces gz compression (default) instead of xz-v inc:inc:w:c,gzallows (but does not force) gz compression if client uploads to/inc?pkor/inc?gzor/inc?gz=4other flags:c,magicenables filetype detection for nameless uploads, same as--magicneedshttps://pypi.org/project/python-magic/python3 -m pip install --user -U python-magicon windows grab this insteadpython3 -m pip install --user -U python-magic-bindatabase locationin-volume (.hist/up2k.db, default) or somewhere elsecopyparty creates a subfolder named.histinside each volume where it stores the database, thumbnails, and some other stuffthis can instead be kept in a single place using the--histargument, or thehist=volflag, or a mix of both:--hist ~/.cache/copyparty -v ~/music::r:c,hist=-sets~/.cache/copypartyas the default place to put volume info, but~/musicgets the regular.histsubfolder (-restores default behavior)note:markdown edits are always stored in a local.histsubdirectoryon windows the volflag path is cyglike, so/c/tempmeansC:\tempbut use regular paths for--histyou can use cygpaths for volumes too,-v C:\Users::rand-v /c/users::rboth workmetadata from audio filesset-e2tto index tags on upload-mtedecides which tags to index and display in the browser (and also the display order), this can be changed per-volume:-v ~/music::r:c,mte=title,artistindexes and displaystitlefollowed byartistif you add/remove a tag frommteyou will need to run with-e2tsronce to rebuild the database, otherwise only new files will be affectedbut instead of using-mte,-mthis 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[⚙️] configpane-mtmcan be used to add or redefine a metadata mapping, say you have media files withfooandbartags and you want them to display asquxin the browser (preferringfooif both are present), then do-mtm qux=foo,barand now you can-mte artist,title,quxtags that start with a.such as.bpmand.dur(ation) indicate numeric valuesee the beautiful mess of a dictionary inmtag.pyfor the default mappings (should cover mp3,opus,flac,m4a,wav,aif,)--no-mutagendisables Mutagen and uses FFprobe instead, which...is about 20x slower than Mutagencatches a few tags that Mutagen doesn'tmelodic key, video resolution, framerate, pixfmtavoids pulling any GPL code into copypartymore importantly runs FFprobe on incoming files which is bad if your FFmpeg has a cve--mtag-tosets 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 filesfile parser pluginsprovide custom parsers to index additional tags,  also see./bin/mtag/README.mdcopyparty can invoke external programs to collect additional metadata for files usingmtp(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)-mtp .bpm=~/bin/audio-bpm.pywill execute~/bin/audio-bpm.pywith the audio file as argument 1 to provide the.bpmtag, if that does not exist in the audio metadata-mtp key=f,t5,~/bin/audio-key.pyuses~/bin/audio-key.pyto get thekeytag, replacing any existing metadata tag (f,), aborting if it takes longer than 5sec (t5,)-v ~/music::r:c,mtp=.bpm=~/bin/audio-bpm.py:c,mtp=key=f,t5,~/bin/audio-key.pyboth as a per-volume config wow this is getting uglybut wait, there's more!-mtpcan be used for non-audio files as well using theaflag:ayonly do audio files (default),anonly do non-audio files, oraddo all files (d as in dontcare)"audio file" also means videos btw, as long as there is an audio stream-mtp ext=an,~/bin/file-ext.pyruns~/bin/file-ext.pyto get theexttag only if file is not audio (an)-mtp arch,built,ver,orig=an,eexe,edll,~/bin/exe.pyruns~/bin/exe.pyto get properties about windows-binaries only if file is not audio (an) and file extension is exe or dllif you want to daisychain parsers, use thepflag to set processing order-mtp foo=p1,~/a.pyruns before-mtp foo=p2,~/b.pyand will forward all the tags detected so far as json to the stdin of b.pyoptionc0disables capturing of stdout/stderr, so copyparty will not receive any tags from the process at all -- instead the invoked program is free to print whatever to the console, just using copyparty as a launcherc1captures stdout only,c2only stderr, andc3(default) captures bothyou can control how the parser is killed if it times out with optionktkilling the entire process tree (default),kmjust the main process, orknlet it continue running until copyparty is terminatedif something doesn't work, try--mtag-vfor verbose error messagesevent hookstrigger 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 deletesthere's a bunch of flags and stuff, see--help-hooksupload eventsthe older, more powerful approach (examples):-v /mnt/inc:inc:w:c,mte=+x1:c,mtp=x1=ad,kn,/usr/bin/notify-sendso filesystem location/mnt/incshared at/inc, write-only for everyone, appendingx1to the list of tags to index (mte), and using/usr/bin/notify-sendto "provide" tagx1for any filetype (ad) with kill-on-timeout disabled (kn)that'll run the commandnotify-sendwith 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 newevent hooksbut this approach has the following advantages:non-blocking and multithreaded; doesn't hold other uploads backyou get access to tags from FFmpeg and other mtp parsersonly trigger on new unique files, not dupesnote that it will occupy the parsing threads, so fork anything expensive (or setknto have copyparty fork it for you) -- otoh if you want to intentionally queue/singlethread you can combine it with--mtag-mt 1handlersredefine behavior with plugins (examples)replace 404 and 403 errors with something completely different (that's it for now)identity providersreplace copyparty passwords with oauth and suchwork isongoingto support authenticating / authorizing users based on a separate authentication proxy, which makes it possible to support oauth, single-sign-on, etc.it is currently possible to specify--idp-h-usr x-username; copyparty will then skip password validation and blindly trust the username specified in theX-Usernamerequest headerthe remaining stuff (accepting user groups through another header, creating volumes on the fly) are still to-do; configuration will probablylook like thishiding from googletell search engines you dont wanna be indexed,  either using the good oldrobots.txtor through copyparty settings:--no-robotsadds HTTP (X-Robots-Tag) and HTML (<meta>) headers withnoindex, nofollowgloballyvolflag[...]:c,norobotsdoes the same thing for that single volumevolflag[...]:c,robotsALLOWS search-engine crawling for that volume, even if--no-robotsis set globallyalso,--force-jsdisables the plain HTML folder listing, making things harder to parse for search enginesthemesyou can change the default theme with--theme 2, and add your own themes by modifyingbrowser.cssor providing your own css to--css-browser, then telling copyparty they exist by increasing--themes0. classic dark2. flat pm-monokai4. vice1. classic light3. flat light5.hotdog standthe classname of the HTML tag is set according to the selected theme, which is used to set colors as css variables ++each themegenerallyhas a dark theme (even numbers) and a light theme (odd numbers), showing in pairsthe first theme (theme 0 and 1) ishtml.a, second theme (2 and 3) ishtml.bif a light theme is selected,html.yis set, otherwisehtml.zisso if the dark edition of the 2nd theme is selected, you use any ofhtml.b,html.z,html.bzto specify rulessee the top of./copyparty/web/browser.csswhere the color variables are set, and there's layout-specific stuff near the bottomcomplete examplesseerunning on windowsfor a fancy windows setupor use any of the examples below, just replacepython copyparty-sfx.pywithcopyparty.exeif you're using the exe editionallow anyone to download or upload files into the current folder:python copyparty-sfx.pyenable searching and music indexing with-e2dsa -e2tsstart an FTP server on port 3921 with--ftp 3921announce it on your LAN with-zso it appears in windows/Linux file managersanyone can upload, but nobody can see any files (even the uploader):python copyparty-sfx.py -e2dsa -v .::wblock uploads if there's less than 4 GiB free disk space with--df 4show a popup on new uploads with--xau bin/hooks/notify.pyanyone can upload, and receive "secret" links for each upload they do:python copyparty-sfx.py -e2dsa -v .::wG:c,fk=8anyone can browse (r), onlykevin(passwordokgo) can upload/move/delete (A) files:python copyparty-sfx.py -e2dsa -a kevin:okgo -v .::r:A,kevinread-only music server:python copyparty-sfx.py -v /mnt/nas/music:/music:r -e2dsa -e2ts --no-robots --force-js --theme 2...with bpm and key scanning-mtp .bpm=f,audio-bpm.py -mtp key=f,audio-key.py...with a read-write folder forkevinwhose password isokgo-a kevin:okgo -v /mnt/nas/inc:/inc:rw,kevin...with logging to disk-lo log/cpp-%Y-%m%d-%H%M%S.txt.xzreverse-proxyrunning copyparty next to other websites  hosted on an existing webserver such as nginx, caddy, or apacheyou can either:give copyparty its own domain or subdomain (recommended)or do location-based proxying, using--rp-loc=/stuffto tell copyparty where it is mounted -- has a slight performance cost and higher chance of bugsif copyparty saysincorrect --rp-loc or webserver config; expected vpath starting with [...]it's likely because the webserver is stripping away the proxy location from the request URLs -- see theProxyPassin the apache example belowsome reverse proxies (such asCaddy) can automatically obtain a valid https/tls certificate for you, and some support HTTP/2 and QUIC which could be a nice speed boostwarning:nginx-QUIC is still experimental and can make uploads much slower, so HTTP/2 is recommended for nowexample webserver configs:nginx config-- entire domain/subdomainapache2 config-- location-basedprometheusmetrics/stats can be enabled  at URL/.cpr/metricsfor grafana / prometheus / etc (openmetrics 1.0.0)must be enabled with--statssince it reduces startup time a tiny bit, and you probably want-e2dsatoothe endpoint is only accessible byadminaccounts, meaning theainrwmdain the following example commandline:python3 -m copyparty -a ed:wark -v /mnt/nas::rwmda,ed --stats -e2dsafollow a guide for setting upnode_exporterexcept have it read from copyparty instead; example/etc/prometheus/prometheus.ymlbelowscrape_configs:-job_name:copypartymetrics_path:/.cpr/metricsbasic_auth:password:warkstatic_configs:-targets:['192.168.123.1:3923']currently the following metrics are available,cpp_uptime_secondstime since last copyparty restartcpp_boot_unixtime_secondssame but as an absolute timestampcpp_http_connsnumber of open http(s) connectionscpp_http_reqsnumber of http(s) requests handledcpp_sus_reqsnumber of 403/422/malicious requestscpp_active_bansnumber of currently banned IPscpp_total_bansnumber of IPs banned since last restartthese are available unless--nos-vstis specified:cpp_db_idle_secondstime since last database activity (upload/rename/delete)cpp_db_act_secondssame but as an absolute timestampcpp_idle_volsnumber of volumes which are idle / readycpp_busy_volsnumber of volumes which are busy / indexingcpp_offline_volsnumber of volumes which are offline / unavailablecpp_hashing_filesnumber of files queued for hashing / indexingcpp_tagq_filesnumber of files queued for metadata scanningcpp_mtpq_filesnumber of files queued for plugin-based analysisand these are available per-volume only:cpp_disk_size_bytestotal HDD sizecpp_disk_free_bytesfree HDD spaceand these are per-volume andtotal:cpp_vol_bytessize of all files in volumecpp_vol_filesnumber of filescpp_dupe_bytesdisk space presumably saved by deduplicationcpp_dupe_filesnumber of dupe filescpp_unf_bytescurrently unfinished / incoming uploadssome of the metrics have additional requirements to function correctly,cpp_vol_*requires either thee2dsvolflag or-e2dsaglobal-optionthe following options are available to disable some of the metrics:--nos-hdddisablescpp_disk_*which can prevent spinning up HDDs--nos-voldisablescpp_vol_*which reduces server startup time--nos-vstdisables volume state, reducing the worst-case prometheus query time by 0.5 sec--nos-dupdisablescpp_dupe_*which reduces the server load caused by prometheus queries--nos-unfdisablescpp_unf_*for no particular purposenote: 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_banspackagesthe party might be closer than you thinkif your distro/OS is not mentioned below, there might be some hints in the«on servers»sectionarch packagenowavailable on aurmaintained by@icxesit comes with asystemd serviceand expects to find one or moreconfig filesin/etc/copyparty.d/fedora packagecurrentlyNOTavailable oncopr-pypi,  fedora is having issues with their build servers and won't be fixed for several monthsif you previously installed copyparty from copr, you may run one of the following commands to upgrade to a more recent version:dnfinstallhttps://ocv.me/copyparty/fedora/37/python3-copyparty.fc37.noarch.rpm
dnfinstallhttps://ocv.me/copyparty/fedora/38/python3-copyparty.fc38.noarch.rpm
dnfinstallhttps://ocv.me/copyparty/fedora/39/python3-copyparty.fc39.noarch.rpmto run copyparty as a service, use thesystemd service scripts, just replace/usr/bin/python3 /usr/local/bin/copyparty-sfx.pywith/usr/bin/copypartynix packagenix profile install github:9001/copypartyrequires aflake-enabledinstallation of nixsome recommended dependencies are enabled by default;override the packageif you want to add/remove some features/depsffmpeg-fullwas chosen overffmpeg-headlessmainly because we needwithWebp(andwithOpenmptis also nice) and being able to use a cached build felt more important than optimizing for size at the time -- PRs welcome if you disagree 👍nixos modulefor this setup, you will need aflake-enabledinstallation of NixOS.{# add copyparty flake to your inputsinputs.copyparty.url="github:9001/copyparty";# ensure that copyparty is an allowed argument to the outputs functionoutputs={self,nixpkgs,copyparty}:{nixosConfigurations.yourHostName=nixpkgs.lib.nixosSystem{modules=[# load the copyparty NixOS modulecopyparty.nixosModules.default({pkgs,...}:{# add the copyparty overlay to expose the package to the modulenixpkgs.overlays=[copyparty.overlays.default];# (optional) install the package globallyenvironment.systemPackages=[pkgs.copyparty];# configure the copyparty moduleservices.copyparty.enable=true;})];};};}copyparty on NixOS is configured viaservices.copypartyoptions, for example:services.copyparty={enable=true;# directly maps to values in the [global] section of the copyparty config.# see `copyparty --help` for available optionssettings={i="0.0.0.0";# use lists to set multiple valuesp=[32103211];# use booleans to set binary flagsno-reload=true;# using 'false' will do nothing and omit the value when generating a configignored-flag=false;};# create usersaccounts={# specify the account name as the keyed={# provide the path to a file containing the password, keeping it out of /nix/store# must be readable by the copyparty service userpasswordFile="/run/keys/copyparty/ed_password";};# or do both in one gok.passwordFile="/run/keys/copyparty/k_password";};# create a volumevolumes={# create a volume at "/" (the webroot), which will"/"={# share the contents of "/srv/copyparty"path="/srv/copyparty";# see `copyparty --help-accounts` for available optionsaccess={# everyone gets read-access, butr="*";# users "ed" and "k" get read-writerw=["ed""k"];};# see `copyparty --help-flags` for available optionsflags={# "fk" enables filekeys (necessary for upget permission) (4 chars long)fk=4;# scan for new files every 60secscan=60;# volflag "e2d" enables the uploads databasee2d=true;# "d2t" disables multimedia parsers (in case the uploads are malicious)d2t=true;# skips hashing file contents if path matches *.isonohash="\.iso$";};};};# you may increase the open file limit for the processopenFilesLimit=8192;};the passwordFile at /run/keys/copyparty/ could for example be generated byagenix, or you could just dump it in the nix store instead if that's acceptablebrowser supportTLDR: yesie= internet-explorer,ff= firefox,c= chrome,iOS= iPhone/iPad,Andr= Androidfeatureie6ie9ie10ie11ff 52c 49iOSAndrbrowse filesyepyepyepyepyepyepyepyepthumbnail view-yepyepyepyepyepyepyepbasic uploaderyepyepyepyepyepyepyepyepup2k--*1*1yepyepyepyepmake directoryyepyepyepyepyepyepyepyepsend messageyepyepyepyepyepyepyepyepset sort order-yepyepyepyepyepyepyepzip selection-yepyepyepyepyepyepyepfile rename-yepyepyepyepyepyepyepfile cut/paste-yepyepyepyepyepyepyepnavpane-yepyepyepyepyepyepyepimage viewer-yepyepyepyepyepyepyepvideo player-yepyepyepyepyepyepyepmarkdown editor--*2*2yepyepyepyepmarkdown viewer-*2*2*2yepyepyepyepplay mp3/m4a-yepyepyepyepyepyepyepplay ogg/opus----yepyep*3yep= feature =ie6ie9ie10ie11ff 52c 49iOSAndrinternet explorer 6 through 8 behave the samefirefox 52 and chrome 49 are the final winxp versions*1yes, but extremely slow (ie10:1 MiB/s, ie11:270 KiB/s)*2only able to do plaintext documents (no markdown rendering)*3iOS 11 and newer, opus only, and requires FFmpeg on the serverquick summary of more eccentric web-browsers trying to view a directory index:browserwill it blendlinks(2.21/macports)can browse, login, upload/mkdir/msglynx(2.8.9/macports)can browse, login, upload/mkdir/msgw3m(0.5.3/macports)can browse, login, upload at 100kB/s, mkdir/msgnetsurf(3.10/arch)is basically ie6 with much better css (javascript has almost no effect)opera(11.60/winxp)OK: thumbnails, image-viewer, zip-selection, rename/cut/paste. NG: up2k, navpane, markdown, audioie4andnetscape4.0can browse, upload with?b=u, auth with&pw=warkncsa mosaic2.7does not get a pass,pic1-pic2SerenityOS(7e98457)hits a page fault, works with?b=u, file upload not-implclient examplesinteract with copyparty using non-browser clientsjavascript: dump some state into a file (two separate examples)await fetch('//127.0.0.1:3923/', {method:"PUT", body: JSON.stringify(foo)});var xhr = new XMLHttpRequest(); xhr.open('POST', '//127.0.0.1:3923/msgs?raw'); xhr.send('foo');curl/wget: upload some files (post=file, chunk=stdin)post(){ curl -F f=@"$1" http://127.0.0.1:3923/?pw=wark;}post movie.mkv(gives HTML in return)post(){ curl -F f=@"$1" 'http://127.0.0.1:3923/?want=url&pw=wark';}post movie.mkv(gives hotlink in return)post(){ curl -H pw:wark -H rand:8 -T "$1" http://127.0.0.1:3923/;}post movie.mkv(randomized filename)post(){ wget --header='pw: wark' --post-file="$1" -O- http://127.0.0.1:3923/?raw;}post movie.mkvchunk(){ curl -H pw:wark -T- http://127.0.0.1:3923/;}chunk <movie.mkvbash: when curl and wget is not available or too boring(printf 'PUT /junk?pw=wark HTTP/1.1\r\n\r\n'; cat movie.mkv) | nc 127.0.0.1 3923(printf 'PUT / HTTP/1.1\r\n\r\n'; cat movie.mkv) >/dev/tcp/127.0.0.1/3923python:u2c.pyis a command-line up2k client(webm)file uploads, file-search,folder sync, autoresume of aborted/broken uploadscan be downloaded from copyparty: controlpanel -> connect ->u2c.pysee./bin/README.md#u2cpyFUSE: mount a copyparty server as a local filesystemcross-platform python client available in./bin/can be downloaded from copyparty: controlpanel -> connect ->partyfuse.pyrcloneas client can give ~5x performance, see./docs/rclone.mdsharex (screenshot utility): see./contrib/sharex.sxcucontextlet (web browser integration); seecontrib contextletigloo irc: Method:postHost:https://you.com/up/?want=url&pw=hunter2Multipart:yesFile parameter:fcopyparty returns a truncated sha512sum of your PUT/POST as base64; you can generate the same checksum locally to verify uplaods:b512(){ printf "$((sha512sum||shasum -a512)|sed -E 's/ .*//;s/(..)/\\x\1/g')"|base64|tr '+/' '-_'|head -c44;}
b512 <movie.mkvyou can provide passwords using headerPW: hunter2, cookiecppwd=hunter2, url-param?pw=hunter2, or with basic-authentication (either as the username or password)NOTE: curl will not send the original filename if you use-Tcombined with url-params! Also, make sure to always leave a trailing slash in URLs unless you want to override the filenamefolder syncsync folders to/from copypartythe commandline uploaderu2c.pywith--dris the best way to sync a folder to copyparty; verifies checksums and does files in parallel, and deletes unexpected files on the server after upload has finished which makes file-renames really cheap (it'll rename serverside and skip uploading)alternatively there isrclonewhich allows for bidirectional sync and iswaymore flexible (stream files straight from sftp/s3/gcs to copyparty, ...), although there is no integrity check and it won't work with files over 100 MiB if copyparty is behind cloudflarestarting from rclone v1.63, rclone is faster than u2c.py on low-latency connectionsmount as drivea remote copyparty server as a local filesystem;  go to the control-panel and clickconnectto see a list of commands to do thatalternatively, some alternatives roughly sorted by speed (unreproducible benchmark), best first:rclone-webdav(25s), read/WRITE (rclone v1.63 or later)rclone-http(26s), read-onlypartyfuse.py(35s), read-onlyrclone-ftp(47s), read/WRITEdavfs2 (103s), read/WRITE,very faston small fileswin10-webdav(138s), read/WRITEwin10-smb2(387s), read/WRITEmost clients will fail to mount the root of a copyparty server unless there is a root volume (so you get the admin-panel instead of a browser when accessing it) -- in that case, mount a specific volume insteadandroid appupload to copyparty with one tap''''the app isNOTthe full copyparty server! just a basic upload client, nothing fancy yetif you want to run the copyparty server on your android device, seeinstall on androidiOS shortcutsthere is no iPhone app, but  the following shortcuts are almost as good:upload to copyparty(offline) (png) based on theoriginalbyDaedren(thx!)can strip exif, upload files, pics, vids, links, clipboardcan download links and rehost the target file on copyparty (see first comment inside the shortcut)pics become lowres if you share from gallery to shortcut, so better to launch the shortcut and pick stuff from thereperformancedefaults are usually fine - expect8 GiB/sdownload,1 GiB/suploadbelow are some tweaks roughly ordered by usefulness:-qdisables logging and can help a bunch, even when combined with-loto redirect logs to file--histpointing to a fast location (ssd) will make directory listings and searches faster when-e2dor-e2tis setand also makes thumbnails load faster, regardless of e2d/e2t--no-hash .when indexing a network-disk if you don't care about the actual filehashes and only want the names/tags searchable--no-htp --hash-mt=0 --mtag-mt=1 --th-mt=1minimizes the number of threads; can help in some eccentric environments (like the vscode debugger)-j0enables multiprocessing (actual multithreading), can reduce latency to20+80/numCorespercent and generally improve performance in cpu-intensive workloads, for example:lots of connections (many users or heavy clients)simultaneous downloads and uploads saturating a 20gbps connectionif-e2dis enabled,-j2gives 4x performance for directory listings;-j4gives 16x...however it also increases the server/filesystem/HDD load during uploads, and adds an overhead to internal communication, so it is usually a better idea to don'tusingpypyinstead ofcpythoncanbe 70% faster for some workloads, but slower for many othersand pypy can sometimes crash on startup with-j0(TODO make issue)client-sidewhen uploading files,chrome is recommended (unfortunately), at least compared to firefox:up to 90% faster when hashing, especially on SSDsup to 40% faster when uploading over extremely fast internetsbutu2c.pycan be 40% faster than chrome againif you're cpu-bottlenecked, or the browser is maxing a cpu core:up to 30% faster uploads if you hide the upload status list by switching away from the[🚀]up2k ui-tab (or closing it)optionally you can switch to the lightweight potato ui by clicking the[🥔]switching to another browser-tab also works, the favicon will update every 10 seconds in that caseunlikely to be a problem, but can happen when uploding many small files, or your internet is too fast, or PC too slowsecuritythere is adiscord serverwith an@everyonefor all important updates (at the lack of better ideas)some notes on hardeningset--rproxy 0if your copyparty is directly facing the internet (not through a reverse-proxy)cors doesn't work right otherwiseif you allow anonymous uploads or otherwise don't trust the contents of a volume, you can prevent XSS with volflagnohtmlthis returns html documents as plaintext, and also disables markdown renderingsafety profiles:option-sis a shortcut to set the following options:--no-thumbdisables thumbnails and audio transcoding to stop copyparty from runningFFmpeg/Pillow/VIPSon uploaded files, which is agood ideaif anonymous upload is enabled--no-mtag-ffusesmutagento grab music tags instead ofFFmpeg, which is safer and faster but less accurate--dotparthides uploads from directory listings while they're still incoming--no-robotsand--force-jsmakes life harder for crawlers, seehiding from googleoption-ssis a shortcut for the above plus:--unpost 0,--no-del,--no-mvdisables all move/delete support--hardlinkcreates hardlinks instead of symlinks when deduplicating uploads, which is less maintenancehowever note if you edit one file it will also affect the other copies--vague-403returns a "404 not found" instead of "401 unauthorized" which is a common enterprise meme--nihremoves the server hostname from directory listingsoption-sssis a shortcut for the above plus:--no-davdisables webdav support--no-loguesand--no-readmedisables support for readme's and prologues / epilogues in directory listings, which otherwise lets people upload arbitrary (but sandboxed)<script>tags-lo cpp-%Y-%m%d-%H%M%S.txt.xzenables logging to disk-ls **,*,ln,p,rdoes a scan on startup for any dangerous symlinksother misc notes:you can disable directory listings by giving permissionginstead ofr, only accepting direct URLs to filesyou may wantfilekeysto prevent filename bruteforcingpermissionhinstead ofrmakes copyparty behave like a traditional webserver with directory listing/index disabled, returning index.html insteadcompatibility with filekeys: index.html itself can be retrieved without the correct filekey, but all other files are protectedgotchasbehavior that might be unexpectedusers without read-access to a folder can still see the.prologue.html/.epilogue.html/README.mdcontents, for the purpose of showing a description on how to use the uploader for exampleusers can submit<script>s which autorun (in a sandbox) for other visitors in a few ways;uploading aREADME.md-- avoid with--no-readmerenamingsome.htmlto.epilogue.html-- avoid with either--no-loguesor--no-dot-renthe directory-listing embed is sandboxed (so any malicious scripts can't do any damage) but the markdown editor is not 100% safe, see belowmarkdown documents can contain html and<script>s; attempts are made to prevent scripts from executing (unless-empis specified) but this is not 100% bulletproof, so setting thenohtmlvolflag is still the safest choiceor eliminate the problem entirely by only giving write-access to trustworthy people :^)corscross-site request configby default, except forGETandHEADoperations, all requests must either:not contain anOriginheader at allor have anOriginmatching the server domainor the headerPWwith your password as valuecors can be configured with--acaoand--acam, or the protections entirely disabled with--allow-csrffilekeysprevent filename bruteforcingvolflagc,fkgenerates filekeys (per-file accesskeys) for all files; users which have full read-access (permissionr) will then see URLs with the correct filekey?k=...appended to the end, andgusers must provide that URL including the correct key to avoid a 404by default, filekeys are generated based on salt (--fk-salt) + filesystem-path + file-size + inode (if not windows); add volflagfkato generate slightly weaker filekeys which will not be invalidated if the file is edited (only salt + path)permissionswG(write + upget) lets users upload files and receive their own filekeys, still without being able to see other uploadspassword hashingyou can hash passwords  before putting them into config files / providing them as arguments; see--help-pwhashfor all the details--ah-alg argon2enables it, and if you have any plaintext passwords then it'll print the hashed versions on startup so you can replace themoptionally also specify--ah-clito enter an interactive mode where it will hash passwords without ever writing the plaintext ones to diskthe default configs take about 0.4 sec and 256 MiB RAM to process a new password on a decent laptophttpsboth HTTP and HTTPS are accepted  by default, but letting areverse proxyhandle the https/tls/ssl would be better (probably more secure by default)copyparty doesn't speak HTTP/2 or QUIC, so using a reverse proxy would solve that as wellifcfsslis installed, copyparty will automatically create a CA and server-cert on startupthe certs are written to--crt-dirfor distribution, see--helpfor the other--crtoptionsthis will be a self-signed certificate so you must install yourca.peminto all your browsers/devicesif you want to avoid the hassle of distributing certs manually, please consider using a reverse proxyrecovering from crashesclient crashesfrefox wsodfirefox 87 can crash during uploads  -- the entire browser goes, including all other browser tabs, everything turns whitehowever you can hitF12in the up2k tab and use the devtools to see how far you got in the uploads:get a complete list of all uploads, organized by statuts (ok / no-good / busy / queued):var tabs = { ok:[], ng:[], bz:[], q:[] }; for (var a of up2k.ui.tab) tabs[a.in].push(a); tabslist of filenames which failed:​var ng = []; for (var a of up2k.ui.tab) if (a.in != 'ok') ng.push(a.hn.split('<a href=\"').slice(-1)[0].split('\">')[0]); ngsend the list of filenames to copyparty for safekeeping:await fetch('/inc', {method:'PUT', body:JSON.stringify(ng,null,1)})HTTP APIseedevnotesdependenciesmandatory deps:jinja2(is built into the SFX)optional dependenciesinstall these to enable bonus featuresenable hashed passwords in config:argon2-cffienable ftp-server:for just plaintext FTP,pyftpdlib(is built into the SFX)with TLS encryption,pyftpdlib pyopensslenable music tags:eithermutagen(fast, pure-python, skips a few tags, makes copyparty GPL? idk)orffprobe(20x slower, more accurate, possibly dangerous depending on your distro and users)enablethumbnailsof...images:Pillowand/orpyvipsand/orffmpeg(requires py2.7 or py3.5+)videos/audio:ffmpegandffprobesomewhere in$PATHHEIF pictures:pyvipsorffmpegorpyheif-pillow-opener(requires Linux or a C compiler)AVIF pictures:pyvipsorffmpegorpillow-avif-pluginJPEG XL pictures:pyvipsorffmpegenablesmbsupport (notrecommended):impacket==0.11.0pyvipsgives higher quality thumbnails thanPillowand is 320% faster, using 270% more ram:sudo apt install libvips42 && python3 -m pip install --user -U pyvipsoptional gpl stuffsome bundled tools have copyleft dependencies, see./bin/#mtagthese are standalone programs and will never be imported / evaluated by copyparty, and must be enabled through-mtpconfigssfxthe self-contained "binary"copyparty-sfx.pywill unpack itself and run copyparty, assuming you have python installed of courseyou can reduce the sfx size by repacking it; see./docs/devnotes.md#sfx-repackcopyparty.exedownloadcopyparty.exe(win8+) orcopyparty32.exe(win7+)can be convenient on machines where installing python is problematic, however isnot recommended-- if possible, please usecopyparty-sfx.pyinsteadcopyparty.exeruns on win8 or newer, was compiled on win10, does thumbnails + media tags, and iscurrentlysafe to use, but any future python/expat/pillow CVEs can only be remedied by downloading a newer version of the exeon win8 it needsvc redist 2015, on win10 it just workssome antivirus may freak out (false-positive), possiblyAvast, AVG, and McAfeedangerous:copyparty32.exeis compatible withwindows7, which means it uses an ancient copy of python (3.7.9) which cannot be upgraded and should never be exposed to the internet (LAN is fine)dangerous and deprecated:copyparty-winpe64.exelets yourun copyparty in WinPEand is otherwise completely uselessmeanwhilecopyparty-sfx.pyinstead relies on your system python which gives better performance and will stay safe as long as you keep your python install up-to-datethen again, if you are already into downloading shady binaries from the internet, you may also want myminimal buildsofffmpegandffprobewhich enables copyparty to extract multimedia-info, do audio-transcoding, and thumbnails/spectrograms/waveforms, however it's much better to instead grab arecent official buildevery once ina while if you can afford the sizeinstall on androidinstallTermux+ its companion appTermux:API(seeocv.me/termux) and then copy-paste this into Termux (long-tap) all at once:yes|pkgupgrade&&termux-setup-storage&&yes|pkginstallpythontermux-api&&python-mensurepip&&python-mpipinstall--user-Ucopyparty&&{grep-qE'PATH=.*\.local/bin'~/.bashrc2>/dev/null||{echo'PATH="$HOME/.local/bin:$PATH"'>>~/.bashrc&&.~/.bashrc;};}echo$?after the initial setup, you can launch copyparty at any time by runningcopypartyanywhere in Termux -- and if you run it with--qryou'll get aneat qr-codepointing to your external ipif you want thumbnails (photos+videos) and you're okay with spending another 132 MiB of storage,pkg install ffmpeg && python3 -m pip install --user -U pillowor if you want to usevipsfor photo-thumbs instead,pkg install libvips && python -m pip install --user -U wheel && python -m pip install --user -U pyvips && (cd /data/data/com.termux/files/usr/lib/; ln -s libgobject-2.0.so{,.0}; ln -s libvips.so{,.42})reporting bugsideas for context to include in bug reportsin general, commandline arguments (and config file if any)if something broke during an upload (replacing FILENAME with a part of the filename that broke):journalctl -aS '48 hour ago' -u copyparty | grep -C10 FILENAME | tee bug.logif there's a wall of base64 in the log (thread stacks) then please include that, especially if you run into something freezing up or getting stuck, for exampleOperationalError('database is locked')-- alternatively you can visit/?stackto see the stacks live, sohttp://127.0.0.1:3923/?stackfor exampledevnotesfor build instructions etc, see./docs/devnotes.md