copyparty

MIT
Platform
Web Linux Windows macOS Android iOS Docker Self-hosted
Licence
MIT Open source
copyparty

copyparty turns almost any device into a file server. One Python file, no stack to deploy, and a browser interface that uploads, browses, searches and plays back whatever sits on the disk — built for the machine you already have (a NAS, a Raspberry Pi, an old laptop, a router) rather than a datacentre install.

One file, no stack

The main download is copyparty-sfx.py, a single self-extracting script that runs on Python 2 or 3 with every dependency optional: no database server, no PHP, no Node, no Java. There is also a PyPI package (python3 -m pip install --user -U copyparty), a Docker image with all dependencies built in, packages for Arch, Homebrew and Nix, a Termux recipe for Android and an a-Shell recipe for iOS, plus a standalone copyparty.exe for Windows machines without Python. The same codebase runs on Linux, macOS, Windows, FreeBSD, Android, ARM32/ARM64, ppc64le, s390x and RISC-V.

Protocols beyond HTTP

The web interface is one way in, not the only one. The same volumes are exposed over WebDAV, SFTP, FTP(S), TFTP and SMB/CIFS, so a phone, a TV, an e-book reader or an operating system’s file manager can mount the share natively. Folders can be downloaded as a single zip or tar, and a read-only FUSE client lets a Linux machine mount the server as a normal directory without SMB.

Uploads that survive a bad connection

  • up2k uploads are chunked, multithreaded and resumable, with no server-side file-size limit; a dropped connection picks up where it stopped.
  • “Race the beam” lets a file be downloaded while it is still uploading.
  • Duplicate detection can either drop a re-uploaded file or symlink it to the copy already on disk.
  • Uploads can be given a self-destruct lifetime, made write-only, or randomised in filename, and an unpost view undoes an accidental upload.

Browsing, search and playback

  • A navpane tree, breadcrumbs and a file manager for cut/paste, delete and batch rename.
  • Thumbnails for images, RAW files, video and audio spectrograms (using Pillow, pyvips or FFmpeg, cached with max-age eviction), plus an image gallery, a cbz comic reader and a webm player.
  • An audio player with OS media controls, m3u8 playlists, an equaliser and Opus/MP3 transcoding for formats the browser will not play.
  • File search by name, path, date, size, ID3 tags or file contents (the last one needs the -e2dsa index), and a text viewer with syntax highlighting that streams growing log files live.
  • Event hooks / script runner for reacting to uploads, UPnP/zeroconf discovery and a QR code for getting a phone onto the share quickly.

Accounts and volumes

Permissions are attached to volume mounts rather than bolted on afterwards — -v /mnt/music:/music:r:rw,foo -a foo:bar shares a folder read-only with everybody and read-write for user foo. Rules can be per-folder, per-user and per-operation, with shares, upload-only folders and shadowed subfolders for the parts of a tree that should stay hidden. The web UI, WebDAV and the FTP/SFTP front ends all go through the same permission check.

Running it

Start it against a folder and open the port: running copyparty with no arguments serves the current directory read-write to everyone who can reach it, so accounts are strongly advised before it faces a network. Thumbnails, media indexing and transcoding need optional dependencies — apt install --no-install-recommends python3-pil ffmpeg on Debian, or nothing at all with Docker — and -e2dsa / -e2ts turn on file and audio-metadata indexing.

Where it fits

copyparty is the quickest way to make an existing disk reachable: it needs no web server, no reverse proxy and no database, and the whole install can be one file that you copy over and run. For a synced folder that follows you between devices rather than a server you browse, FileRise or LocalSend are closer fits.

Explore More Categories

Sign In

Register

Reset Password

Please enter your username or email address, you will receive a link to create a new password via email.