{"id":13471354,"url":"https://github.com/lucko/bytebin","last_synced_at":"2025-04-05T12:08:20.201Z","repository":{"id":29617064,"uuid":"122252885","full_name":"lucko/bytebin","owner":"lucko","description":"Fast \u0026 lightweight content storage web service.","archived":false,"fork":false,"pushed_at":"2025-03-15T16:01:54.000Z","size":222,"stargazers_count":108,"open_issues_count":2,"forks_count":29,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-03-29T11:11:21.309Z","etag":null,"topics":["paste","pastebin"],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/lucko.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-02-20T20:35:16.000Z","updated_at":"2025-03-25T08:37:48.000Z","dependencies_parsed_at":"2025-01-10T07:29:35.068Z","dependency_job_id":"ba7b0242-69f0-4bbf-9333-046522ff0c29","html_url":"https://github.com/lucko/bytebin","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lucko%2Fbytebin","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lucko%2Fbytebin/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lucko%2Fbytebin/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lucko%2Fbytebin/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lucko","download_url":"https://codeload.github.com/lucko/bytebin/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247332612,"owners_count":20921853,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["paste","pastebin"],"created_at":"2024-07-31T16:00:43.516Z","updated_at":"2025-04-05T12:08:20.168Z","avatar_url":"https://github.com/lucko.png","language":"Java","readme":"\u003ch1 align=\"center\"\u003e\n\t\u003cimg\n\t\talt=\"bytebin\"\n\t\tsrc=\"https://i.imgur.com/XBxNheI.png\"\u003e\n\u003c/h1\u003e\n\n\u003ch3 align=\"center\"\u003e\n  bytebin is a fast \u0026 lightweight content storage web service.\n\u003c/h3\u003e\n\nYou can think of bytebin a bit like a [pastebin](https://en.wikipedia.org/wiki/Pastebin), except that it accepts any kind of data (not just plain text!).  \nAccordingly, the name 'bytebin' is a portmanteau of \"byte\" (binary) and \"pastebin\".\n\nbytebin is:\n\n* **fast** \u0026 (somewhat) **lightweight** - the focus is on the speed at which HTTP requests can be handled.\n  * relatively *low* CPU usage\n  * relatively *high* memory usage (content is cached in memory by default, but this can be disabled)\n* **standalone** - it's just a simple Java app that listens for HTTP requests on a given port.\n* **efficient** - utilises compression to reduce disk usage and network load.\n* **flexible** - supports *any* content type or encoding. (and CORS too!)\n* **easy to use** - simple HTTP API and a minimal HTML frontend.\n\nI host a [public instance](#public-instances) of bytebin for some of my own projects, which you are welcome to use too.\n\nThere is also a traditional \"pastebin\" frontend for sharing code/configs/whatever, see [lucko/paste](https://github.com/lucko/paste) for more information.\n\n\n## Running bytebin\n\nThe easiest way to spin up a bytebin instance is using Docker. Images are automatically created and published to GitHub for each commit/release.\n\nAssuming you're in the bytebin directory, just run:\n```bash\n$ docker compose up\n```\n\nYou should then (hopefully!) be able to access the application at `http://localhost:3000/`.\n\nIt's that easy!\n\n\n## API Usage\n\n### Read\n\n* Just send a HTTP `GET` request to `/{key}` (e.g. `/aabbcc`).\n  * The content will be returned as-is in the response body.\n  * If the content was posted using an encoding other than gzip, the requester must also \"accept\" it.\n  * For gzip, bytebin will automatically uncompress if the client doesn't support compression.\n\n### Post\n* Send a POST request to `/post` with the content in the request body.\n  * You should also specify `Content-Type` and `User-Agent` headers, but this is not required.\n* Ideally, content should be compressed with GZIP or another mechanism before being uploaded.\n  * Include the `Content-Encoding: \u003ctype\u003e` header if this is the case.\n  * bytebin will compress server-side using gzip if no encoding is specified - but it is better (for performance reasons) if the client does this instead.\n* A unique key that identifies the content will be returned. You can find it:\n  * In the response `Location` header.\n  * In the response body, encoded as JSON - `{\"key\": \"aabbcc\"}`.\n\n## Public Instances\n\nI host a public instance at [https://bytebin.lucko.me](https://bytebin.lucko.me)\n\nYou can use it in your application as long as:\n\n* you're not malicious\n* you don't needlessly spam it\n* your usage isn't illegal, infringing copyright or otherwise going to get me into trouble\n* you provide a `User-Agent` header uniquely identifying your application\n\nIf you're planning something likely to be super duper popular or use a lot of data (say \u003e5GB per month across all users), then please [run it past me](https://lucko.me/) first - otherwise, go for it!\n\nIf you come across any content which is illegal or infringes on copyright, please [get in touch](https://lucko.me/contact) and let me know so I can remove it.\n\n## Credits\n\nbytebin uses:\n\n* [jooby](https://jooby.io/) and [netty](https://netty.io/) for handling http requests\n* [caffeine](https://github.com/ben-manes/caffeine) for caching and rate limiting\n* [gson](https://github.com/google/gson) to read the configuration file on startup\n\nand plain ol' Java for everything else.\n\n## Performance\n\nI haven't had time to do any accurate benchmarks or performance testing, however, the libraries bytebin uses (see above) are known to be pretty efficient.\n\nThe [public instance](#public-instances) handles approx ~250k requests per day and stores ~1M items at any one time. It uses very little CPU resources and memory only up to the desired cache size.\n\n## License\nMIT, have fun!\n","funding_links":[],"categories":["Java"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flucko%2Fbytebin","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flucko%2Fbytebin","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flucko%2Fbytebin/lists"}