Getting Started
Multiple ways to install and run Snip on your system.
One-Line Install (Recommended)
The fastest way to get started. Downloads the latest binary and sets up a systemd service.
bash
curl -L https://github.com/Vesper36/snip/releases/latest/download/install.sh | bash
After installation, Snip runs as a systemd service. Manage it with:
bash
systemctl status snip
systemctl restart snip
journalctl -u snip -f
Docker
bash
docker run -d -p 53524:53524 --name snip vesper/snip
Docker Compose
docker-compose.yml
version: "3.8"
services:
snip:
image: vesper/snip:latest
container_name: snip
ports:
- "53524:53524"
volumes:
- snip-data:/app/data
environment:
- SNIP_BASE_URL=https://snip.yourdomain.com
- SNIP_JWT_SECRET=replace-with-random-32-bytes
restart: unless-stopped
volumes:
snip-data:
bash
docker-compose up -d
Binary Download
Download the latest release for your platform from GitHub Releases.
bash
# Linux amd64
wget https://github.com/Vesper36/snip/releases/latest/download/snip-linux-amd64
chmod +x snip-linux-amd64
./snip-linux-amd64
From Source
Requires Go 1.21 or later.
bash
git clone https://github.com/Vesper36/snip.git
cd snip
go build -o snip ./cmd/server
./snip
Or use the Makefile:
bash
make build # Build the binary
make run # Build and run
make test # Run tests
make cross # Cross-compile for all platforms
First Run
After starting Snip, open http://localhost:53524 in your browser. You can immediately start creating pastes.
Tip: Set
SNIP_BASE_URL to your public URL so share links are correct.
Environment Variables
Configure Snip using environment variables:
| Variable | Default | Description |
|---|---|---|
SNIP_HOST | 0.0.0.0 | Listen host |
SNIP_PORT | 53524 | Listen port |
SNIP_BASE_URL | http://localhost:53524 | Public URL (used in share links) |
SNIP_DB_PATH | ./data/snip.db | SQLite database path |
SNIP_ADMIN_PASSWORD | (empty) | Admin password (optional) |
SNIP_JWT_SECRET | (auto) | JWT signing key (set in production!) |
SNIP_MAX_SIZE | 10485760 | Max paste size in bytes (10MB) |
SNIP_ALLOW_ANONYMOUS | true | Allow anonymous paste creation |
Keyboard Shortcuts
| Key | Action |
|---|---|
Ctrl/Cmd + Enter | Submit paste form |
Tab | Indent 4 spaces in editor |
/ | Focus search box |
Esc | Blur input |
CLI Usage
Pipe content from stdin or a file:
bash
# From stdin
echo "console.log('hello')" | ./scripts/snip.sh --lang javascript --expire 1h
# From file
./scripts/snip.sh main.go --expire 1d --title "My Go file"
Next Steps
- Configuration - Customize Snip
- API Reference - Programmatic access
- Deployment - Production setup