A simple web app that I created to use as a shared clipboard and file-share service.
❗Disclaimer: partially vibe-coded.
The app uses sockets to make sure the data is updated in real time.
It uses basic auth and has some other security features:
- Allows a maximum of 5 connected users at a time (configurable).
- Users are disconnected from the server after 2 minutes of inactivity (configurable).
- The clipboard is capped at 1MB capacity (configurable).
- File uploads are capped to 10GB total capacity (configurable).
| Environment Variable | Required | Default Value | Type | Description |
|---|---|---|---|---|
AUTH_USER |
Yes | — | String | Username for HTTP Basic Authentication. Server will not start if missing or empty. |
AUTH_PASS |
Yes | — | String | Password for HTTP Basic Authentication. Server will not start if missing or empty. |
MAX_TEXT_SIZE |
No | 1048576 (1 MB) |
Integer | Maximum allowed size (in bytes) for clipboard text content. |
MAX_STORAGE_SIZE |
No | 10737418240 (10 GB) |
Integer | Maximum total disk usage (in bytes) for uploaded files. |
MAX_CLIENTS |
No | 5 |
Integer | Maximum number of concurrent WebSocket clients allowed. |
IDLE_TIMEOUT |
No | 120 |
Integer | WebSocket idle timeout in seconds before disconnecting a client. |