You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- Windows (PowerShell): `$env:COOKIE_SECRET="your-long-random-secret"; $env:PORT="3925"; $env:NODE_ENV="production"; node server.js`
39
+
5. Open `http://localhost:3925` and log in with your CopyParty server URL and password.
40
+
41
+
Notes:
42
+
- The ZIP includes `.next/standalone` with `server.js` and minimal node_modules, plus static assets under `.next/standalone/.next/static` and `public` so it runs without the full dev environment.
43
+
- Behind a reverse proxy, ensure `x-forwarded-proto` is set to `https` to enable secure cookies.
44
+
45
+
### Option B: Build it yourself
46
+
1. Clone the repo and install deps:
47
+
-`git clone <your-repo-url>`
48
+
-`cd copyparty-front && npm install`
49
+
2. Build production: `npm run build` (Next is configured with `output: 'standalone'`).
50
+
3. Prepare the standalone bundle (assets copied into the standalone directory):
51
+
-`cp -r public .next/standalone/ && cp -r .next/static .next/standalone/.next/`
52
+
- Or simply run: `make zip-deploy` (creates `build-front/` and `build-front.zip`).
53
+
Note: the `zip-deploy` Makefile target currently uses `pnpm`. If you use `npm`, either replace that line with `npm run build` or run the copy commands above manually.
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.
60
+
28
61
## Usage
29
62
- On the login screen, enter your CopyParty server URL and password, then Connect.
30
63
- Browse folders, switch between grid/list, and use breadcrumbs to navigate.
@@ -41,13 +74,14 @@ A clean Next.js frontend for interacting with a CopyParty file server. Log in us
41
74
42
75
## Security Notes
43
76
- Always set `COOKIE_SECRET` in production; the default dev fallback is insecure.
44
-
- In production, cookies are `httpOnly`, `sameSite=lax`, and `secure` when served over HTTPS.
77
+
- In production, cookies are `httpOnly`, `sameSite=lax`, and `secure` when served over HTTPS (or when `x-forwarded-proto=https`).
45
78
- The browser never stores the password; it is encrypted server‑side and only forwarded to CopyParty during API requests.
46
79
47
80
## Build and Deploy
48
81
- Production build: `npm run build`
49
-
- Start: `npm start`
50
-
- Deploy to your platform of choice (e.g., Vercel). Ensure `COOKIE_SECRET` is configured and your app is served over HTTPS.
0 commit comments