A clean Next.js frontend for interacting with a CopyParty file server. Log in using your server password, browse directories, upload and delete files, and quickly search — all proxied through a secure API route that never stores your password in the browser.
- Connect to any reachable CopyParty server via URL
- Directory listing with grid/list views and breadcrumb navigation
- File uploads with progress, and optional delete (respecting server permissions)
- Lightweight search/filter input for quick file discovery
- Session restore via cookie and local storage of the
serverUrl
- Node.js 18+ and npm (or pnpm)
- A running CopyParty server (for example
http://127.0.0.1:3923) - Set a cookie encryption secret: add
COOKIE_SECRET=your-long-random-secretto your environment
- Install dependencies:
npm install - Start dev server:
npm run dev - Open the URL shown in the terminal (default
http://localhost:3925)
COOKIE_SECRET(recommended) orNEXT_PUBLIC_COOKIE_SECRETencrypts the auth cookie using AES‑256‑GCM.- No username is required; CopyParty APIs authenticate with the password only.
- The app persists only
serverUrlinlocalStorage. The password is never stored in web storage.
You can self-host in two ways: using a prebuilt ZIP from Releases (standalone build), or building locally.
- Download the latest
build-front.zipfrom the project’s Releases page.wget https://github.com/andrecrjr/copyparty-front/releases/0.0.1/download/build-front.zipor latest one check the Releases page.- Alternatively, build it yourself using the instructions below.
- Unzip it:
unzip build-front.zip(this createsbuild-front/). - Change into the standalone bundle:
cd build-front/.next/standalone. - Set environment variables (at minimum a strong cookie secret, and your desired port):
- macOS/Linux:
COOKIE_SECRET=your-long-random-secret PORT=3925 NODE_ENV=production node server.js - Windows (PowerShell):
$env:COOKIE_SECRET="your-long-random-secret"; $env:PORT="3925"; $env:NODE_ENV="production"; node server.js
- macOS/Linux:
- Open
http://localhost:3925and log in with your CopyParty server URL and password.
Notes:
- The ZIP includes
.next/standalonewithserver.jsand minimal node_modules, plus static assets under.next/standalone/.next/staticandpublicso it runs without the full dev environment. - Behind a reverse proxy, ensure
x-forwarded-protois set tohttpsto enable secure cookies.
- Clone the repo and install deps:
git clone <your-repo-url>cd copyparty-front && npm install
- Build production:
npm run build(Next is configured withoutput: 'standalone'). - Prepare the standalone bundle (assets copied into the standalone directory):
cp -r public .next/standalone/ && cp -r .next/static .next/standalone/.next/- Or simply run:
make zip-deploy(createsbuild-front/andbuild-front.zip). Note: thezip-deployMakefile target currently usespnpm. If you usenpm, either replace that line withnpm run buildor run the copy commands above manually.
- Start the standalone server:
cd .next/standaloneCOOKIE_SECRET=your-long-random-secret PORT=3925 NODE_ENV=production node server.js
- Visit
http://localhost:3925.
Alternative start (non-standalone): npm run serve (uses next start --port 3925). Use this when running on a machine with the full Node environment available.
- On the login screen, enter your CopyParty server URL and password, then Connect.
- Browse folders, switch between grid/list, and use breadcrumbs to navigate.
- Upload files: open the upload modal, select files, watch progress, and refresh to see results.
- Delete files (if permitted by the server) using the actions in the list.
- Log out to clear the session. A valid session is restored automatically if the cookie is still valid.
- UI: React 19 + Next.js App Router, shadcn/ui components, lucide-react icons.
- API proxy:
app/api/action/route.tsforwards requests to the CopyParty server and appendspwas a query parameter after decrypting the cookie. - Middleware:
middleware.tsensures/api/actionroutes carry the encrypted cookie via a header. - Crypto:
lib/crypto.tsderives a 32‑byte key fromCOOKIE_SECRETand encrypts the password in acopyparty_authhttpOnly cookie. - Types:
types/copyparty.tsdescribes the server’s listing response; seedocs/devnotes.mdfor CopyParty HTTP API details.
- Always set
COOKIE_SECRETin production; the default dev fallback is insecure. - In production, cookies are
httpOnly,sameSite=lax, andsecurewhen served over HTTPS (or whenx-forwarded-proto=https). - The browser never stores the password; it is encrypted server‑side and only forwarded to CopyParty during API requests.
- Production build:
npm run build - Start (standalone):
COOKIE_SECRET=your-long-random-secret PORT=3925 node .next/standalone/server.js - Start (Next server):
npm run serve - Deploy to your platform of choice (e.g., a VM or container). Ensure
COOKIE_SECRETis configured and your app is served over HTTPS.
- Powered by CopyParty and Next.js and me.