GET /p/:id - Get a paste by ID
POST /p/n - Post a new paste
GET /s - Get stats about the zer0bin instance
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 |
- Rust >= 1.58.0
- Postgresql >= 12.0
- NodeJS >= 16.0
- Nginx
- *nix OS
git clone https://github.com/Domterion/zer0bin && cd zer0bin
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
psql -d postgres
CREATE DATABASE zer0bin;
and\c zer0bin
- Paste contents of
schema.sql
and\q
cd frontend
cp config.example.json config.json
and edit as appropriatenpm i && npm run build
cd ../backend
cp config.example.json config.json
and edit as appropriatecargo build --release
./target/release/backend
(preferably in a tmux session)
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 |