Documentation / File Sharing

File Sharing

Share files and directories over the internet with a single command

Requires Pro tier

Quick Start

Share a single file
$ stunl share report.pdf

  ● STUNL SHARE

  ╭── ◎ ── FILE
  │   URL       https://abc123.localshare.io
  │   File      report.pdf (2.4 MB)
  │   Expires   never
Share a directory
$ stunl share ./build-artifacts/

  ● STUNL SHARE

  ╭── ◎ ── DIRECTORY
  │   URL       https://xyz789.localshare.io
  │   Path      ./build-artifacts/ (14 files)
  │   Expires   never

Flags

Flag Description
-password Require a password to access the share
-expires Auto-expire after duration (e.g., 1h, 24h, 7d)
-single-use Delete the share after the first download
-domain Domain for the share URL (default: localshare.io)
-id Custom subdomain ID for the URL
-theme Directory listing theme: amber, nord, or matrix
-key API key (overrides STUNL_API_KEY)
-server Server address to connect to
-grpc-port gRPC port on the server
-insecure Use plaintext gRPC (no TLS)
-skip-verify Skip TLS certificate verification

How It Works

stunl share serves files directly from your machine through a stunl tunnel. Nothing is uploaded to a third-party server -- visitors download straight from your local filesystem.

When sharing a directory, visitors see a themed directory listing with search, column sorting, and the option to download the entire directory as a ZIP archive. Individual files can be previewed in the browser.

Directory listing features

  • + Search and sort files by name, size, or date
  • + Download entire directory as ZIP
  • + In-browser preview for images, markdown (rendered to HTML), and code/text files (up to 1MB)

Themes

  • amber -- VT220 terminal aesthetic with warm amber tones
  • nord -- Modern Nordic palette, clean and minimal
  • matrix -- Cyberpunk green-on-black

Security

  • + Password login is rate-limited: 5 attempts, then 30-second lockout
  • + Session cookies valid for 24 hours
  • + Path traversal protection prevents access outside the shared path
  • + Symlinks validated to stay within the share root
  • + Security headers set on all responses

Examples

Password-protected share that expires in 24 hours
$ stunl share ./contracts/ -password s3cret -expires 24h
Single-use file download with a custom ID
$ stunl share firmware-v2.bin -single-use -id firmware-update
Share a directory with the matrix theme
$ stunl share ./project-assets/ -theme matrix
Expiring link for a one-week review period
$ stunl share ./design-mockups/ -expires 7d -password review2026

Next Steps