Analytics cookies only (Google Analytics, PostHog). No ad networks, no cross-site tracking. See our privacy policy.
An open-source alternative to GitHub Gist and Pastebin: paste code or text, fork pastes, copy or fetch the raw text, and organise them in folders when signed in. It renders previews for Markdown, Mermaid, SVG, CSV, GeoJSON, diff, calendar and Asciinema files, has a documented API and editor extensions, and accepts anonymous pastes unless you require login. A Java backend with a Vue frontend that needs a MySQL or MariaDB database.
Runs on a VPS from $6/mo (Kamatera 2GB, 2 GB RAM) · prices checked Nov 2026
Fits home hardware (233 MB measured idle, RAM only): Raspberry Pi 4 (4 GB) (arm64 untested), Raspberry Pi 5 (8 GB) (arm64 untested), Repurposed laptop (8 GB), Intel N100 mini PC (16 GB), AMD Ryzen mini PC (32 GB).
Pick Pastefy when you want a Gist-like paste site with folders, forks and rendered previews, and you can run a MariaDB alongside it. You paste code or text, fork a paste, fetch the raw text, and get previews for Markdown, Mermaid, SVG, CSV, GeoJSON, diff, calendar and Asciinema files; signed-in users get folders and a list of their pastes, and there is a documented API plus editor extensions. It is MIT-licensed Java with a Vue frontend. The docs say that only MySQL is supported, and the project's Compose file uses MariaDB 10.11. Our snippet follows that file with the image pinned to 7.2.6 (released 2026-06-01), MariaDB pinned to 10.11.19 with a health check, and generated database passwords in place of the upstream default `pastefy`. Pastefy publishes no RAM figure, so our 1024 MB floor is our estimate for a JVM plus a database. In the catalog, MicroBin, wastebin and PrivateBin are small single-purpose services with no database to run, and Opengist stores snippets in Git; Pastefy is the one that adds folders and rich previews, at the cost of a Java process and MariaDB.
Paid link — we earn a commission if you shop through it.
Run these commands on your server:
# Pastefy — pastebin — adapted from the project's docker-compose.yml (generated database passwords, MariaDB health check), pinned to 7.2.6
echo "DB_PASSWORD=$(openssl rand -hex 16)" > .env
echo "DB_ROOT_PASSWORD=$(openssl rand -hex 16)" >> .env
cat > docker-compose.yml <<'EOF'
services:
db:
image: mariadb:10.11.19
restart: unless-stopped
environment:
MYSQL_ROOT_PASSWORD: ${DB_ROOT_PASSWORD}
MYSQL_DATABASE: pastefy
MYSQL_USER: pastefy
MYSQL_PASSWORD: ${DB_PASSWORD}
volumes:
- dbvol:/var/lib/mysql
healthcheck:
test: ["CMD", "healthcheck.sh", "--connect", "--innodb_initialized"]
interval: 5s
timeout: 5s
retries: 20
pastefy:
image: interaapps/pastefy:7.2.6
restart: unless-stopped
depends_on:
db:
condition: service_healthy
ports:
- 9999:80
environment:
HTTP_SERVER_PORT: 80
HTTP_SERVER_CORS: "*"
DATABASE_DRIVER: mysql
DATABASE_NAME: pastefy
DATABASE_USER: pastefy
DATABASE_PASSWORD: ${DB_PASSWORD}
DATABASE_HOST: db
DATABASE_PORT: 3306
SERVER_NAME: http://localhost:9999
volumes:
dbvol:
EOF
docker compose up -d
timeout 300 bash -c 'until curl -fsS -o /dev/null http://localhost:9999/; do sleep 3; done'
# → http://SERVER_IP:9999 (no login configured: anyone who can reach it can paste; set SERVER_NAME to your public URL before sharing links)Pastefy's documentation and Compose file flag these before you rely on it:
Pastefy used 233 MB of RAM at idle on GCP e2-standard-2 · Ubuntu 26.04 LTS · Docker 29.9.3 (first boot, measured Nov 2026). We list a minimum of 1024 MB.
The Pastefy install snippet is marked verified on Ubuntu 26.04 (Nov 2026).