Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

392 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Relic logo

Relic

Self-hosted artifact storage for developers.
Paste it, share it, preview it β€” code, images, archives, PDFs, diagrams, anything.

Latest release License: MIT Backend: FastAPI Frontend: Svelte Deploy: Docker

πŸš€ Quick Start Β· Features Β· Screenshots Β· CLI Β· Deployment

Relic Overview

Why Relic?

Most pastebins stop at text. Relic is built for everything developers actually share: it gives rich in-browser previews for code, images, archives, structured data, PDFs, spreadsheets, Markdown, and Excalidraw diagrams β€” all self-hosted on your own infrastructure with a single docker compose up.

Around that core, Relic adds the workflow pieces a team needs: fork a relic to build on someone else's snippet and diff it against the original, organize things into spaces, tag and bookmark what matters, and discuss it in comments β€” with public/private access, password protection, and expiration when you want them.

πŸš€ Quick Start

Using prebuilt images (recommended):

curl -O https://raw.githubusercontent.com/ovidiuvio/relic/main/deploy/docker-compose.yml
docker compose up -d

Or from source:

git clone https://github.com/ovidiuvio/relic.git
cd relic
make up

Then open http://localhost. That's it β€” no accounts, no configuration required to start pasting.

For production settings (passwords, version pinning, backups), see deploy/README.md.

✨ Features

πŸ“¦ Universal content support

  • Code β€” Monaco editor and syntax highlighting for 100+ languages
  • Structured data β€” interactive tree explorer for JSON, YAML, TOML, and XML
  • Archives β€” browse ZIP/TAR contents in the browser, including previews of embedded files
  • Documents β€” PDF rendering, CSV/Excel tables, Markdown rendering
  • Images & diagrams β€” direct image previews and integrated Excalidraw support

πŸ”€ Forks & diffs

  • Fork any relic β€” build on someone else's snippet as an independent copy, with a fork_of reference back to the source
  • Lineage & diffs β€” trace fork ancestry and visually compare additions/deletions between text relics

πŸ—‚οΈ Organize & discover

  • Spaces β€” curated, dynamic collections with their own access controls and filtering
  • Tags & bookmarks β€” label relics for search, bookmark the ones you care about
  • Relic indexes β€” file-based curated collections (.rix files) that render as browsable tables

πŸ”’ Sharing on your terms

  • Public or private β€” public relics appear in recents; private ones are reachable only via their unguessable 128-bit URL
  • Password protection β€” optional extra lock on any relic
  • Expiration β€” from 10 minutes to never (the default)
  • Comments β€” discuss code and artifacts directly on the relic page

⚑ Terminal-first workflow

  • Go CLI β€” pipe from stdin, upload files, fork, list, and manage spaces without leaving the shell
  • Clean API β€” everything the UI does is available under /api/v1, with interactive docs at /docs

πŸ›‘οΈ Built to operate

  • One-command deploy β€” Docker Compose with Nginx, PostgreSQL, and MinIO included
  • Admin panel β€” system stats, user management, content moderation
  • S3 sync β€” optional periodic backup of object storage to any S3-compatible destination

πŸ“Έ Visual Tour

πŸ“ Rich code viewing β€” syntax highlighting with line numbers, copy-to-clipboard, and raw view

Source View

πŸ”€ Diff viewer β€” compare any relic against its fork, additions and deletions side by side

Diff View

πŸ“¦ Archive explorer β€” browse ZIP/TAR contents without downloading

Archive View

🌳 Structured data explorer β€” navigate JSON, YAML, TOML, and XML as a tree

JSON Explorer

πŸ—‚οΈ Spaces β€” curated collections with access controls, search, and filtering

Spaces Space View

πŸ’¬ Comments β€” discuss code and artifacts on the relic page

Comments

πŸ•’ Recent relics β€” browse public relics or manage your own

Recent Relics

πŸ–ΌοΈ Image previews β€” direct rendering with size information

Image View

πŸ›‘οΈ Admin dashboard β€” usage, storage, and moderation

Admin Panel

⚑ CLI

Install from your Relic instance (which serves the installer):

curl -sSL https://your-relic-instance/install.sh | bash

Or build from source with Go: cd cli/client && go build ./cmd/relic.

# Upload from stdin
echo "Hello World" | relic

# Upload a file
relic myfile.txt

# Upload with options
relic --name "My Script" --private --expires-in 24h script.py

# Push a relic into a space
relic --space <space_id> script.py

# Fork, inspect, fetch, delete
relic fork <id>
relic info <id>
relic get <id> -o output.txt
relic delete <id>

# Manage spaces
relic spaces create "My Cool Space" --visibility public

Run relic --help for the full command reference, and relic init to configure your default server.

🌐 API

All endpoints live under /api/v1; interactive OpenAPI docs are served at /docs.

Action Endpoint
Create relic POST /api/v1/relics
Get metadata GET /api/v1/relics/{id}
Raw content GET /{id}/raw
Fork POST /api/v1/relics/{id}/fork
Delete DELETE /api/v1/relics/{id}
List recent public GET /api/v1/relics
# Create a relic
curl -X POST http://localhost/api/v1/relics \
  -F "file=@myfile.txt" \
  -F "name=My File"

# Fork it with new content
curl -X POST http://localhost/api/v1/relics/{id}/fork \
  -F "file=@new.txt"

🚒 Deployment

Production (prebuilt images)

The deploy/ directory contains a ready-to-run Compose file that pulls published images:

curl -O https://raw.githubusercontent.com/ovidiuvio/relic/main/deploy/docker-compose.yml
docker compose up -d

See deploy/README.md for environment configuration, version pinning with RELIC_VERSION, and upgrade steps. Change the default PostgreSQL and MinIO passwords before exposing anything.

Production (build from source)

make up        # docker compose -f docker-compose.prod.yml up -d --build
make logs      # follow logs
make down      # stop services

The application is served at http://localhost. (MinIO and PostgreSQL stay internal to the Docker network in this setup; the prebuilt deploy/ compose additionally publishes the MinIO console on port 9001.)

Optional S3 backup sync β€” not started by default. Fill in the S3_SYNC_* variables in .env, then:

docker compose -f docker-compose.prod.yml -f docker-compose.s3-sync.yml up -d --build

Admin setup

Admins can view and delete any relic, manage users, and see system statistics.

  1. Get your user ID from the browser console: localStorage.getItem('relic_user_key')
  2. Set it in the backend environment (comma-separate for multiple admins):
    backend:
      environment:
        ADMIN_USER_IDS: "5cdb7b79c38385db9f5b5f6ad884c8ef"
  3. Restart (make down && make up) β€” the Admin tab appears in the navigation.

πŸ› οΈ Development

Hot-reload setup with mounted source volumes for both frontend and backend:

make dev-up      # start dev stack
make dev-logs    # follow logs
make dev-down    # stop

Code changes are picked up immediately β€” no rebuild needed. See CLAUDE.md for a map of the codebase and architecture notes.

πŸ—οΈ Tech Stack

  • Frontend β€” Svelte, Tailwind CSS, Vite, Monaco
  • Backend β€” FastAPI, SQLAlchemy, Pygments
  • Storage β€” PostgreSQL (metadata), MinIO / any S3-compatible store (content)
  • Infrastructure β€” Docker, Nginx

πŸ“„ License

Relic is licensed under the MIT License β€” free to use, modify, and self-host for personal or commercial purposes.

~ end of file ~

About

Pastebin and artifact storage system designed for developers

Topics

Resources

Stars

38 stars

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages