Will be available soon (or available now maybe :)) on hastebin.ru
- Download JAR executable from Releases tab or compile project from source code.
- Copy-n-paste
config.example.jsontoconfig.json - Configure your instance
- Create storage directory (specified in
config.json) andstaticdirectory - Create/download/build frontend and place it in the
staticdirectory
You can use free original Hastebin UI. You can download it here.
If you want you can create your own UI using original Hastebin API
POST /documents
Host: <your ruhaste host>
Content-Type: text/plain
Accept: application/json
<body>Rate limiting is 10 requests per minute.
Answer:
HTTP/1.1 200 OK
Content-Type: application/json
X-RateLimit-Limit: 10
X-RateLimit-Remaining: 9
X-RateLimit-Reset: 299999
{"key": "xaxaxaxaxaxa"}GET /raw/:id
Host: <your ruhaste host>This will return document (text/plain) or 404 error with JSON (application/json)
GET /documents/:id
Host: <your ruhaste host>Document found:
{
"key": "key from request (:id param)",
"data": "file contents"
}Document not found:
{
"message": "Document not found."
}IP we listen to. Default: 0.0.0.0
Port we listen to. Default: 8080
Directory we save pastes to. Default: ./data (Please note that you have to create this directory first)
Key length for generator. Default: 10
Maximum length of document. Default: 400000
You can specify here static pastes available all time.
Default:
{
"readme": "./README.md"
}So if you go to <your ruhaste host>/readme you will get content of README.md file.