Deploy your first preview environment in under a minute.
Prerequisites
Before you begin, make sure you have:
- The prev CLI installed (Installation Guide)
- An active subscription (Plans & Pricing)
- An API key from your Dashboard
Step 1: Set Your API Key
Export your API key as an environment variable:
export PREV_API_KEY="your-api-key-here"You can find your API key in the Dashboard under API Keys.
Step 2: Deploy Your Project
Navigate to your project directory and run:
prev create .That's it! The CLI will automatically detect your project type, package your source code, and deploy it.
Step 3: Access Your Preview
After a few seconds, you'll receive a URL like:
https://k7f2m9xq.us.prev.shThe URL contains the subdomain and the deployment region. Share this URL with anyone — no login required to view.
Common Deployment Examples
Deploy with a Custom Subdomain
prev create . --subdomain my-demoYour preview will be available at https://my-demo.us.prev.sh (region is included in the URL).
Deploy with a Longer TTL
prev create . --ttl 7dThe environment will stay active for 7 days instead of the default 24 hours.
Deploy a Docker Image
prev create --image nginx:latest --port 80
Deploy to a Specific Region
prev create . --region eu
Deploy from a GitHub Repository
prev create --source github.com/user/repo
Deploy with Password Protection
prev create . --credentials admin:mysecretpass
What Happens Behind the Scenes
Next Steps
- Learn about all available CLI Commands
- Configure the CLI with a Configuration File
- Explore Plans & Billing to find the right plan