selfhost.directory

The index of self-hostable projects — ranked, categorized and served with live updates.
Own your data and stop giving it to big tech.

paste logo

Self-host paste

v0.1.1

An anonymity-friendly, multi-file pastebin written in Rust

BetaOpen SourceMIT
Updated2 years ago
LanguageRust
Setup difficultyAdvanced
ThemeDark mode
Stars
615
Port
8000 (Rocket backend server inside the Docker container (nginx fronts it on host ports 80/443))
Requires
PostgreSQL, Redis, Sidekiq
Docker
jkcclemens/paste
Install with Docker Compose
Paste web UI in the light themePaste web UI in the dark theme

What is paste?

paste is a pastebin server written in Rust on the Rocket framework, MIT-licensed, created by jkcclemens as an easy-to-use alternative after GitHub Gist dropped anonymous pastes. It supports pastes holding multiple files, syntax highlighting with language autodetection in the web UI, public/unlisted/private visibility, optional expiry dates, anonymous pastes guarded by a deletion key, raw file endpoints, user accounts with open or email-whitelisted registration, regex-based content filters, SMTP email sending, and an optional camo image proxy. The JSON REST API at /api/v1 is declared stable and covers full paste and file CRUD; the web interface and backend internals are described as unstable. Self-hosting is documented through a docker-compose production stack (behind nginx, with PostgreSQL, Redis and Sidekiq) or a manual build requiring nightly Rust, Ruby, Postgres 9.x+ and Redis; TLS is mandatory. The author also hosts the public instance paste.gg, though that site now describes itself as built on Cloudflare Workers. GitHub releases stopped at v0.1.1 (2018) and the repository's last push was in November 2023.

Should you self-host paste?

paste scores 47/100 on selfhost.directory (how scoring works) and ranks #13 of 19 in Pastebins. It has 615 GitHub stars.

There was no stable release in the past 12 months, so check the repository's recent activity before you rely on it.

Setup is advanced: plan for several services and some ongoing maintenance. An official Docker image is available. It is MIT-licensed and written mostly in Rust.

Its closest alternative on selfhost.directory is Drift (46/100, 1 364 stars). paste scores higher overall. See paste vs Drift side by side.

Features

  • Admin roles
  • Anonymous pastes
  • Avatar conversion and caching
  • Content Filtering
  • Email notifications via SMTP
  • Image proxying (camo)
  • Multi-file pastes
  • Paste expiration
  • Paste visibility levels
  • Raw file output
  • REST API
  • Syntax highlighting
  • User accounts and registration control

paste README

How to install paste

Install paste with Docker Compose

Docker
Environment variables
DATABASE_URL, REDIS_URL, SIDEKIQ_URL, EMAIL_TEMPLATES, CAMO_URL, CAMO_KEY

You can run your own paste server by using docker-compose. You will need Docker, obviously.

Copy the example configuration files (.docker/nginx/nginx.conf, .docker/nginx/sites/paste.conf, Rocket.toml, config.toml, sidekiq.yml, sidekiq.sh, .env) and edit them, then:

# from the repo root
docker-compose -p paste -f .docker/docker-compose.yml up

The Docker image builds and runs the server in release mode from whatever is checked out in the repository. nginx exposes ports 80 and 443 on the host by default; access paste via HTTPS.

How to configure paste

  • CAMO_KEYthis should be the secret key for the camo server

    this should be the secret key for the camo server

  • CAMO_URLhttp://path-to-camo/this should be a base URL pointing to the publicly-accessible camo server

    this should be a base URL pointing to the publicly-accessible camo server

  • DATABASE_URLpostgres://username:password@server/database
  • EMAIL_TEMPLATESwebserver/web/emails/*
  • REDIS_URLredis://localhost
  • SIDEKIQ_URLredis://localhost/1

paste releases & version history

More in Pastebins

Rate this project

Click to rate — no account needed.

0 comments

Posting as guest
Loading comments…