Skip to content

AugustArchive/zer0bin

 
 

Repository files navigation



Just a place to paste

Stargazers Issues License


API

GET /p/:id - Get a paste by ID

POST /p/n - Post a new paste

GET /s - Get stats about the zer0bin instance

Public instances

Submit your public instance here!

Website Country Expiration Max paste size Version
zer0b.in (not up yet) ? 7 days 40,000 chars vx.x.x
stepbro.voring.me 🇺🇸 US 365 days 100,000 chars v0.1.0

Technologies used

Frontend:

Backend:

Instructions

Requirements

  • Rust >= 1.58.0
  • Postgresql >= 12.0
  • NodeJS >= 16.0
  • Nginx
  • *nix OS

Steps

  1. git clone https://github.com/Domterion/zer0bin && cd zer0bin
  2. cp example.nginx /etc/nginx/sites-avaliable/yoursite.tld, edit as appropriate, sudo cp /etc/nginx/sites-avaliable/yoursite.tld /etc/nginx/sites-enabled/yoursite.tld && systemctl nginx restart
  3. psql -d postgres
  4. CREATE DATABASE zer0bin; and \c zer0bin
  5. Paste contents of schema.sql and \q
  6. cd frontend
  7. cp config.example.json config.json and edit as appropriate
  8. npm i && npm run build
  9. cd ../backend
  10. cp config.example.json config.json and edit as appropriate
  11. cargo build --release
  12. ./target/release/backend (preferably in a tmux session)

Configuration

Key Values Description
server.backend_host 127.0.0.1 or 0.0.0.0 The host to run the backend on
server.backend_port Any open port The port to run the backend on
pastes.character_limit Number up to 2^64 - 1 The amount of characters allowed in a single paste
pastes.days_til_expiration Number up to 2^63 or -1 The days till a paste is to expire. If set to -1 then pastes will never expire
pastes.id_length Number up to 2^64 - 1 The length of the ID for each paste
databases.postgres_uri PostreSQL Connection URI The URI to use when connecting to a PostgreSQL database
ratelimits.seconds_in_between_pastes Number up to 2^64 - 1 The seconds between paste uploads
ratelimits.allowed_pastes_before_ratelimit Number up to 2^32 - 1 Amount of requests that can be made before they are blocked and have to wait

About

🖊️ // Just a place to paste

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Rust 48.2%
  • JavaScript 22.2%
  • CSS 13.3%
  • HTML 12.5%
  • PLpgSQL 3.8%