Install
openclaw skills install share-onetime-linkGenerate public one-shot or time-limited download links for files using a local Express server exposed via Cloudflare Tunnel. Links are tokenized, expire automatically, and files are deleted after download or expiry. Use when you need to share a file publicly (no VPN required) with a self-destructing link.
openclaw skills install share-onetime-linkGenerate public, tokenized, self-destructing download links for files. Files are served via a local Express server exposed to the internet through a Cloudflare Tunnel.
shared/ after download or expiry/generate and /status require SHARE_SECRETshared/ are served, never the full workspacecloudflared installed and a Cloudflare Tunnel configured pointing to localhost:5050SHARE_PUBLIC_URL to your public tunnel URL (e.g. https://share.yourdomain.com)SHARE_SECRET to a strong random string (recommended)cd skills/share-onetime-link/scripts
npm install
Create a tunnel in the Cloudflare Zero Trust dashboard:
http://localhost:5050share.yourdomain.comRun the tunnel:
cloudflared tunnel run --token YOUR_TUNNEL_TOKEN
SHARE_PUBLIC_URL="https://share.yourdomain.com" \
SHARE_SECRET="your-strong-random-secret" \
node skills/share-onetime-link/scripts/server.js
Or use start.sh (edit variables first):
bash skills/share-onetime-link/scripts/start.sh
SHARE_SECRET="your-secret" \
node skills/share-onetime-link/scripts/share-file.js /path/to/file.pdf 30
# Returns a public link valid for 30 minutes
Just ask naturally:
"Share
report.pdffor 20 minutes" "Generate a download link forphoto.jpg, valid 1 hour"
curl -H "x-share-secret: your-secret" http://localhost:5050/status
| Variable | Required | Default | Description |
|---|---|---|---|
SHARE_PUBLIC_URL | Yes | http://localhost:5050 | Public base URL for generated links |
SHARE_SECRET | Yes | (none) | Secret key for /generate and /status endpoints |
SHARE_PORT | No | 5050 | Local server port |
SHARED_DIR | No | workspace/shared/ | Directory for shared files |
/dl/:token is public by design — anyone with the link can download once/generate and /status are protected by SHARE_SECRET — required, server refuses to start without itSHARE_SECRET is not set the server exits immediately with an errorshared/ are never accessibleSHARED_DIR unless you intend to share them