Go to file
Kainoa Kanter c9a15a4c86
Update README.md
2022-03-04 17:36:36 -08:00
.github/ISSUE_TEMPLATE Update 03_public_instance.md 2022-03-01 10:51:39 -08:00
backend config tings 2022-03-04 18:15:21 -05:00
frontend formatting 2022-03-04 17:17:50 -08:00
.gitignore a 2022-03-04 17:23:45 -08:00
LICENSE first 2022-02-28 16:10:02 -05:00
README.md Update README.md 2022-03-04 17:36:36 -08:00
config.example.json snake case cuz dom likes snakes 2022-03-04 16:31:10 -08:00
example.nginx nginx shtuff 2022-03-04 17:28:39 -08:00
schema.sql compiled size optimizations 2022-02-28 17:09:16 -05:00
zer0bin.svg Update zer0bin.svg 2022-02-28 18:48:23 -08:00
zero.png stuff and things uwu 2022-03-04 16:35:06 -08: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 🇺🇸 365 days 100,000 chars v0.1.0

Instructions

Requirements

  • Rust >= 1.58.0
  • Postgresql >= 12.0
  • Nginx >= 1.18.0
  • NodeJS + Yarn (sudo npm i -g yarn)
  • *nix OS

Steps

  1. git clone https://github.com/Domterion/zer0bin && cd zer0bin
  2. cp config.example.json config.json and edit as appropriate
  3. 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
  4. psql -d postgres
  5. CREATE DATABSE zer0bin; and \c zer0bin
  6. Paste contents of schema.sql and \q
  7. cd frontend && yarn && yarn run build
  8. cd ../backend && cargo build --release
  9. ./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
frontend.api_url Your public facing API URL The URL that the frontend will post to, most likely https://domain.tld/api