{"id":13549245,"url":"https://github.com/Cesura/pastey","last_synced_at":"2025-04-02T22:31:36.383Z","repository":{"id":44584011,"uuid":"357652002","full_name":"Cesura/pastey","owner":"Cesura","description":"A minimal, self-hosted paste platform","archived":false,"fork":false,"pushed_at":"2024-06-08T20:51:23.000Z","size":2606,"stargazers_count":105,"open_issues_count":10,"forks_count":12,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-11-03T18:34:42.445Z","etag":null,"topics":["docker","encryption","language-detection","pastebin"],"latest_commit_sha":null,"homepage":"https://pastey.link/","language":"HTML","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Cesura.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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":"2021-04-13T18:28:10.000Z","updated_at":"2024-10-15T06:08:22.000Z","dependencies_parsed_at":"2024-06-16T05:07:38.482Z","dependency_job_id":null,"html_url":"https://github.com/Cesura/pastey","commit_stats":null,"previous_names":[],"tags_count":8,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Cesura%2Fpastey","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Cesura%2Fpastey/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Cesura%2Fpastey/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Cesura%2Fpastey/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Cesura","download_url":"https://codeload.github.com/Cesura/pastey/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246905119,"owners_count":20852812,"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","encryption","language-detection","pastebin"],"created_at":"2024-08-01T12:01:19.810Z","updated_at":"2025-04-02T22:31:33.449Z","avatar_url":"https://github.com/Cesura.png","language":"HTML","funding_links":[],"categories":["HTML","docker"],"sub_categories":[],"readme":"![logo](https://i.imgur.com/W22RFJZ.png)\n\nA minimal, self-hosted paste platform\n\n# Features\n* Self-contained system without external database dependencies\n* Automatic programming language detection\n* Optional on-disk encryption\n* Optional single use pastes\n* Optional expiration date\n* QR code generation\n* Theme system\n* IP/network whitelisting and blocking\n* Endpoint rate limiting\n* JSON API\n* Fully configurable via environment variables\n* Included script for uploading files/content from stdin\n\n\n## Screenshots\n### Browser\n![home](https://i.imgur.com/P3BSv9d.png)\n![new](https://i.imgur.com/5YiQ3GB.png)\n![view](https://i.imgur.com/4bkPKNP.png)\n### Dark\n![dark](https://i.imgur.com/SXeSa5d.png)\n### CLI\n![screenshot5](https://i.imgur.com/kV7q1Zv.png)\n\n# Installation\n### Docker\nIt is highly recommended that you use the official Docker image to run Pastey. To do so, simply run:\n```\n$ docker run -d -p 5000:5000 -v /path/to/local/dir:/app/data cesura/pastey:latest\n```\nChange **/path/to/local/dir** to a local folder you would like to use for persistent paste storage. It will be mounted in the container at **/app/data**.\n\nPastey will then be accessible at *http://localhost:5000*\n\n### Docker (slim image OR non-AVX processor)\nIf you're interested in a slimmer image (or your processor does not have support for AVX instructions required by Tensorflow), a slim image without language detection is also maintained:\n```\n$ docker run -d -p 5000:5000 -v /path/to/local/dir:/app/data cesura/pastey:latest-slim\n```\n\n### docker-compose\nIf you prefer to use docker-compose:\n```\n$ wget https://raw.githubusercontent.com/Cesura/pastey/main/docker-compose.yml \u0026\u0026 docker-compose up -d\n```\nNote that this must be modified if you wish to use a local directory for storage, rather than a Docker volume.\n\n### Local\n#### With language detection\nRequirements:\n* Python 3.8\n* AVX-enabled processor (or a Python environment configured to use Anaconda's Tensorflow)\n\n```\n$ git clone https://github.com/Cesura/pastey.git \u0026\u0026 cd pastey \u0026\u0026 mkdir ./data\n$ pip3 install -r requirements.txt\n$ python3 app.py \n```\n\n#### Without language detection\nIf you prefer to not use the language detection feature, use the included **patch_no_tensorflow.sh** script to remove the guesslang requirements:\n```\n$ git clone https://github.com/Cesura/pastey.git \u0026\u0026 cd pastey \u0026\u0026 mkdir ./data\n$ ./patch_no_tensorflow.sh \u0026\u0026 pip3 install -r requirements.txt\n$ python3 app.py \n```\n\n# Configuration\nHere is a list of the available configuration options:\n| Environment Variable        | config.py Variable   | Description                                                                                                                                                                                      | Default Value                                                             |\n|-----------------------------|----------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------|\n| PASTEY_DATA_DIRECTORY       | data_directory       | Local directory for paste storage                                                                                                                                                                | ./data                                                                    |\n| PASTEY_LISTEN_ADDRESS       | listen_address       | Address to listen on                                                                                                                                                                             | 0.0.0.0                                                                   |\n| PASTEY_LISTEN_PORT          | listen_port          | Port to listen on                                                                                                                                                                                | 5000                                                                      |\n| PASTEY_USE_WHITELIST        | use_whitelist        | Enable/disable whitelisting for admin tasks (view recent, delete, config)                                                                                                                        | True                                                                      |\n| PASTEY_WHITELIST_CIDR       | whitelist_cidr       | List of whitelisted IP addresses or networks (in CIDR format). When passed as an environment variable, it should be a comma-separated list.                                                      | [ '127.0.0.1/32' ,  '10.0.0.0/8' ,  '172.16.0.0/12' ,  '192.168.0.0/16' ] |\n| PASTEY_BLACKLIST_CIDR       | blacklist_cidr       | List of blocked IP addresses or networks (in CIDR format). When passed as an environment variable, it should be a comma-separated list.                                                          | []                                                                        |\n| PASTEY_RESTRICT_PASTING     | restrict_pasting     | Enable/disable restricting of pasting to whitelisted users                                                                                                                                       | False                                                                     |\n| PASTEY_RATE_LIMIT           | rate_limit           | Rate limit for pasting, for non-whitelisted users                                                                                                                                                | 5/hour                                                                    |\n| PASTEY_GUESS_THRESHOLD      | guess_threshold      | Threshold for automatic language detection guesses. If a result is below this value, it is treated as Plaintext.                                                                                 | 0.20                                                                      |\n| PASTEY_RECENT_PASTES        | recent_pastes        | Number of recent pastes to show on the home page                                                                                                                                                 | 10                                                                        |\n| PASTEY_BEHIND_PROXY         | behind_proxy         | Inform Pastey if it is behind a reverse proxy (nginx, etc.). If this is the case, it will rely on HTTP headers X-Real-IP or X-Forwarded-For. NOTE: Make sure your proxy config sets these values | False                                                                     |\n| PASTEY_DEFAULT_THEME        | default_theme        | Select which theme Pastey should use by default. This is overridden by client options.                                                                                                           | Light                                                                     |\n| PASTEY_PURGE_INTERVAL       | purge_interval       | Purge interval (in seconds) for checking expired pastes in background thread                                                                                                                     | 3600                                                                      |\n| PASTEY_FORCE_SHOW_RECENT    | force_show_recent    | Show recent pastes on the home page, even to non-whitelisted users (without delete button)                                                                                                       | False                                                                     |\n| PASTEY_IGNORE_GUESS         | ignore_guess         | Ignore these classifications for language detection                                                                                                                                              | ['TeX', 'SQL']                                                            |\n| PASTEY_SHOW_CLI_BUTTON      | show_cli_button      | Enable/disabling showing of CLI button on home page                                                                                                                                              | True                                                                      |\n\n### Docker configuration\nFor Docker environments, it is recommended that the options be passed to the container on startup: \n```\n$ docker run -d -p 5000:5000 -e PASTEY_LISTEN_PORT=80 -e PASTEY_BEHIND_PROXY=\"True\" cesura/pastey:latest\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FCesura%2Fpastey","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FCesura%2Fpastey","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FCesura%2Fpastey/lists"}