Skip to main content
This guide walks you through deploying your first project with Sher.

Prerequisites

Make sure you have Sher installed. If not, see the installation guide.
sher --version

Deploy Your First Project

1

Navigate to your project

Open your terminal and navigate to any frontend project directory:
cd ~/projects/my-vite-app
Sher works with Vite, Next.js, Astro, Create React App, and any project that produces static output.
2

Run sher link

Run the deploy command:
sher link
Sher will automatically:
  • Detect your framework (e.g., Vite, Next.js)
  • Detect your package manager (npm, yarn, pnpm, bun)
  • Run your build script (npm run build)
  • Collect and upload your build output
  • Return a shareable URL
3

View your preview

You’ll see output like this:
sher share your work

framework  Vite
building   npm run build

files      12 files (194KB)
uploading

https://a8xk2m1p.sher.sh  (copied)
expires 2/19/2026, 11:00 AM
The URL is automatically copied to your clipboard. Open it in your browser or share it with others.
Your preview URL expires after 24 hours by default. Run sher login to unlock higher limits and longer expiration times (up to 7 days with Pro).

Understanding the Output

When you run sher link, you’ll see:
  • framework - Auto-detected framework (Vite, Next.js, Astro, etc.)
  • building - The build command that’s running (e.g., npm run build)
  • files - Number of files and total size uploaded
  • URL - Your shareable preview URL (copied to clipboard)
  • expires - When the link will stop working
If you’re not logged in, you’ll see a tip recommending sher login for longer links and higher rate limits.

Authenticate for Higher Limits

Without authentication, you’re limited to 1 link per day with a 6-hour expiration. To unlock the Starter tier (free):
sher login
This opens GitHub authentication in your browser. After logging in:
  • 25 links per day (up from 1)
  • 24-hour expiration (up from 6 hours)
  • 50 MB max upload size (up from 10 MB)
  • Ability to list and delete deployments
Run sher whoami to check your current tier and login status.

Common Options

Skip the Build Step

If your project is already built, skip the build step:
sher link --no-build
This uploads your existing dist/ or build/ directory without rebuilding.

Share a Specific Directory

Upload a specific directory instead of auto-detecting the output folder:
sher link --dir ./my-build
Control how long your link stays active (in hours):
sher link --ttl 4
This creates a link that expires in 4 hours. Maximum TTL depends on your tier:
  • Free: 6 hours
  • Starter: 24 hours
  • Pro: 168 hours (7 days)

Password Protection (Pro)

Protect your preview with a password:
sher link --pass
This generates a random password and prints it in the output:
https://xyz123.sher.sh  (copied)
password   a4c8e2f1
expires 2/19/2026, 11:00 AM
Or set a specific password:
sher link --pass mysecret
Password protection requires the Pro tier ($8/mo). Run sher upgrade to subscribe.

Managing Deployments

List Active Deployments

See all your active preview links:
sher list
Output:
sher your deployments

https://a8xk2m1p.sher.sh  18h 45m left
https://xyz123.sher.sh  3h 12m left  🔒
The 🔒 icon indicates password-protected links.

Delete a Deployment

Remove a deployment before it expires:
sher delete a8xk2m1p
You can extract the deployment ID from the URL (e.g., a8xk2m1p from https://a8xk2m1p.sher.sh).

Example Workflow

Here’s a typical workflow for sharing work in progress:
1

Make changes to your project

Edit your code, add features, fix bugs.
2

Deploy for feedback

sher link --ttl 48
Creates a link that expires in 48 hours.
3

Share the URL

Send the URL to your client, teammate, or test on your phone.
4

Iterate and redeploy

Make more changes, run sher link again to create a new preview.
Each time you run sher link, a new deployment is created with a unique URL. Old URLs remain active until they expire.

Troubleshooting

”Rate limit reached”

You’ve hit your daily deployment limit. Run sher login to increase it to 25/day, or sher upgrade for 200/day.

”Build output is too large”

Your build exceeds the size limit for your tier:
  • Free: 10 MB
  • Starter: 50 MB
  • Pro: 100 MB
Run sher upgrade to increase your limit, or optimize your build output (remove source maps, compress assets).

”Command not found: sher”

Sher is not installed or not in your PATH. Reinstall with:
npm install -g shersh

Next Steps

Commands Reference

Explore all available commands and options

Configuration

Learn how to customize Sher for your project

Self-Hosting

Deploy your own Sher instance on Cloudflare

GitHub

View the source code and contribute

Build docs developers (and LLMs) love