Go to file
Kainoa Kanter cba848dd58 Typo 2022-03-13 16:38:26 -07:00
.github/ISSUE_TEMPLATE a 2022-03-13 17:48:40 -04:00
backend 🥳 0.2.0 2022-03-13 16:33:00 -07:00
frontend Typo 2022-03-13 16:38:26 -07:00
.gitignore 🥳 0.2.0 2022-03-13 16:33:00 -07:00
LICENSE a 2022-03-13 17:48:40 -04:00
README.md Update technologies used 2022-03-13 16:36:20 -07:00
example.nginx Nginxfmt 2022-03-13 16:20:22 -07:00
schema.sql 🥳 0.2.0 2022-03-13 16:33:00 -07:00
zer0bin.svg 🥳 0.2.0 2022-03-13 16:33:00 -07:00
zero.png a 2022-03-13 17:48:40 -04:00

README.md



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 69,000 chars v0.2.0

Technologies used

Frontend:

Backend:

Instructions

Requirements

  • Rust >= 1.58.0
  • Postgresql >= 12.0
  • NodeJS >= 16.0
  • Nginx
  • Domain with SSL
  • *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 -f example.sql -U <username> zer0bin
  4. cd frontend
  5. cp config.example.json config.json and edit as appropriate
  6. npm i && npm run build
  7. cd ../backend
  8. cp config.example.json config.json and edit as appropriate
  9. cargo build --release
  10. ./target/release/backend (preferably in a tmux session or as a service)

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