naste¶
A minimal, self-hosted paste service for the command line. No database. No frameworks. Just files.
Host your own for privacy or provide it as a free service to others.
At a Glance¶
| Language | Go (stdlib only, zero dependencies) |
| Storage | Filesystem (no database) |
| Binaries | naste-server (server), naste (CLI client) |
| Deployment | Docker, Nix, NixOS module, Home Manager module |
| Security | Path traversal prevention, atomic writes, constant-time auth |
| Size limit | 10 MB per paste |
Quick Start¶
CLI Client¶
The naste binary sends text to a paste server and returns a URL. Install it on any machine to push pastes.
Server¶
The naste-server binary hosts the paste service on port 8080. It stores pastes as files on disk. No database, no dependencies.
Usage¶
# Pipe any text
echo "hello world" | naste
# -> https://paste.semi.sh/abc123
# With a custom slug
cat deploy.sh | naste --slug deploy
# Private paste (requires server auth config)
cat secrets.env | naste --private --slug secrets
# Force overwrite existing slug
naste updated.go --force --slug mycode
# Auto-detects language from file extension
naste main.go
Features¶
- Zero Database - Filesystem-based storage. No PostgreSQL, no MongoDB, no Redis.
- Private Pastes - HTTP Basic Auth for sensitive content. No accounts needed.
- Custom Slugs - Readable URLs like
/deploy-scriptinstead of random IDs. - Syntax Highlighting - Auto-detects language from file extension. Dark theme in browser.
- Single Binary - One Go binary. Deploy anywhere in seconds.
- Docker Ready - Multi-arch images (amd64 + arm64) via GitHub Actions.
- NixOS Module - Declarative system service with sops-nix secret support.
- Home Manager - Run as a user service, no root required.
Architecture¶
+-------------+
| naste | CLI client
| (binary) | reads ~/.config/naste/config.toml
+-----+-------+
|
POST /api/paste
GET /{slug}
|
+-----+-------+
| naste-server| HTTP server
| (binary) | port 8080
+-----+-------+
|
+-----+-------+
| filesystem | /data/paste/
| storage | public/ private/ metadata/
+-------------+
The server stores pastes as flat files in three directories:
public/- public paste contentprivate/- private paste content (auth-gated)metadata/- JSON metadata per paste (slug, lang, size, timestamps)
All writes are atomic (temp file + rename). No partial states.
Configuration¶
The CLI reads configuration from (in order of precedence):
PASTE_ENDPOINTenv varPASTE_USER/PASTE_PASS/PASTE_USER_FILE/PASTE_PASS_FILEenv vars~/.config/naste/config.toml- Built-in default:
https://paste.semi.sh
Documentation¶
- CLI Usage - All flags and options
- Docker - Container deployment
- Nix - Nix flake usage
- NixOS - System service with sops-nix, all options
- Home Manager - User service, all options
- Reverse Proxy - Caddy, Nginx, Tailscale
- API Reference - HTTP endpoints