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
# Burner paste (auto-deletes after first view)
cat one-time-token.txt | naste --burner 1
# 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.
- Burner Pastes - Auto-delete after N views. One-time secrets with no cleanup job:
naste --burner 1. - Private Pastes - HTTP Basic Auth for sensitive content. No accounts needed.
- Custom Slugs - Readable URLs like
/deploy.sh, dots allowed for file-extension names. - Syntax Highlighting - Auto-detects language from file extension. Dark theme in browser.
- Raw & Download - Every paste has raw and download links. No JavaScript.
- Full CLI -
get,lsandrmsubcommands for fetching and managing pastes. - Single Binary - One Go binary. Deploy anywhere in seconds.
- Docker Ready - Multi-arch images (amd64 + arm64), version-tagged on releases.
- 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):
NASTE_ENDPOINTenv varNASTE_USER/NASTE_PASS/NASTE_USER_FILE/NASTE_PASS_FILEenv vars~/.config/naste/config.toml- Built-in default:
https://paste.semi.sh
Documentation¶
Docs are served at naste.semi.sh. To preview locally: just doc
- 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