{"id":13688753,"url":"https://github.com/s-thom/paste","last_synced_at":"2025-05-01T20:30:38.088Z","repository":{"id":38329819,"uuid":"442670712","full_name":"s-thom/paste","owner":"s-thom","description":"📓 A tiny pastebin/gist/tinypaste alternative for self-hosting. Use at your own peril.","archived":true,"fork":false,"pushed_at":"2023-01-09T05:05:24.000Z","size":127,"stargazers_count":4,"open_issues_count":11,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-23T12:55:26.095Z","etag":null,"topics":["docker","hastebin","paste","pastebin","rust","rust-lang","self-hosted"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/s-thom.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-12-29T05:34:46.000Z","updated_at":"2023-01-09T06:31:35.000Z","dependencies_parsed_at":"2023-02-08T08:45:14.703Z","dependency_job_id":null,"html_url":"https://github.com/s-thom/paste","commit_stats":null,"previous_names":[],"tags_count":10,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/s-thom%2Fpaste","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/s-thom%2Fpaste/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/s-thom%2Fpaste/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/s-thom%2Fpaste/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/s-thom","download_url":"https://codeload.github.com/s-thom/paste/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251940419,"owners_count":21668531,"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":["docker","hastebin","paste","pastebin","rust","rust-lang","self-hosted"],"created_at":"2024-08-02T15:01:21.771Z","updated_at":"2025-05-01T20:30:38.082Z","avatar_url":"https://github.com/s-thom.png","language":"Rust","readme":"# paste\n\nA tiny pastebin alternative for self-hosting.\n\nMy goals with this project are as follows:\n\n1. Learn rust by getting it wrong the first time on a low-stakes project\n2. Keep the feature set small.\n\n## Creating new pastes\n\nThere is no form for creating a paste. Either use `curl` directly, or configure a program like [ShareX](https://getsharex.com/) on Windows.\n\nUploading is done via a `multipart/form-data` POST request to a path of `/`. The first part of the request will be used as the text content.\n\n```sh\ncat my-cool-file.txt | curl -H \"Authorization: Bearer \u003cyour-secret-token\u003e\" -F file=@- http://localhost:80\n```\n\n## Running it yourself\n\nEither build and run it yourself, or use the provided [Docker images](https://github.com/s-thom/paste/pkgs/container/paste).\n\n```sh\n# Before running, add environment variables to `.env`\ncargo run\n\n# OR\n\ndocker run \\\n  -e PASTE_BEARER_TOKEN=\u003cyour-secret-token\u003e \\\n  -p \u003cport-on-host\u003e:80 \\\n  -v \u003cpath-on-host\u003e:/app/pastes \\\n  ghcr.io/s-thom/paste\n```\n\n### Configuration\n\nConfiguration is done through environment variables. Use of a `.env` file is supported for convenience.\n\n| Variable Name      | Description                                         | Default     |\n| ------------------ | --------------------------------------------------- | ----------- |\n| PASTE_DIR          | Directory to store pastes                           | `pastes`    |\n| PASTE_BEARER_TOKEN | A secret that must be provided to create new pastes |             |\n| SERVER_HOST        | Host for the app to listen on                       | `127.0.0.1` |\n| SERVER_PORT        | Port for the app to listen on                       | `80`        |\n\n## Features / TODO List\n\n- [x] Read files from directory\n- [x] Write files to directory\n- [x] Configuration for directory (env variable)\n- [x] Simple bearer token authentication for creating new pastes\n","funding_links":[],"categories":["docker"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fs-thom%2Fpaste","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fs-thom%2Fpaste","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fs-thom%2Fpaste/lists"}