{"id":13564194,"url":"https://github.com/lus/pasty","last_synced_at":"2026-04-09T00:32:30.043Z","repository":{"id":42010891,"uuid":"289559333","full_name":"lus/pasty","owner":"lus","description":"pasty is a fast and lightweight code pasting server","archived":false,"fork":false,"pushed_at":"2023-12-09T14:23:49.000Z","size":335,"stargazers_count":215,"open_issues_count":21,"forks_count":34,"subscribers_count":6,"default_branch":"master","last_synced_at":"2026-01-14T20:28:46.088Z","etag":null,"topics":["hacktoberfest","haste","hastebin","paste","pastebin","server"],"latest_commit_sha":null,"homepage":"https://pasty.lus.pm","language":"Go","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/lus.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","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},"funding":{"github":"lus"}},"created_at":"2020-08-22T20:09:16.000Z","updated_at":"2026-01-05T22:44:12.000Z","dependencies_parsed_at":"2023-12-09T15:37:58.583Z","dependency_job_id":null,"html_url":"https://github.com/lus/pasty","commit_stats":null,"previous_names":["lukaesebrot/pasty"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/lus/pasty","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lus%2Fpasty","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lus%2Fpasty/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lus%2Fpasty/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lus%2Fpasty/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lus","download_url":"https://codeload.github.com/lus/pasty/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lus%2Fpasty/sbom","scorecard":{"id":605735,"data":{"date":"2025-08-11","repo":{"name":"github.com/lus/pasty","commit":"317d7e6d88cb407078fc3195bb1dd0bbb65844f0"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3.3,"checks":[{"name":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: no topLevel permission defined: .github/workflows/docker.yml:1","Warn: no topLevel permission defined: .github/workflows/general.yml:1","Info: no jobLevel write permissions found"],"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Code-Review","score":2,"reason":"Found 6/30 approved changesets -- score normalized to 2","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Pinned-Dependencies","score":0,"reason":"dependency not pinned by hash detected -- score normalized to 0","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/docker.yml:20: update your workflow using https://app.stepsecurity.io/secureworkflow/lus/pasty/docker.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/docker.yml:32: update your workflow using https://app.stepsecurity.io/secureworkflow/lus/pasty/docker.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/docker.yml:35: update your workflow using https://app.stepsecurity.io/secureworkflow/lus/pasty/docker.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/docker.yml:37: update your workflow using https://app.stepsecurity.io/secureworkflow/lus/pasty/docker.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/docker.yml:43: update your workflow using https://app.stepsecurity.io/secureworkflow/lus/pasty/docker.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/general.yml:14: update your workflow using https://app.stepsecurity.io/secureworkflow/lus/pasty/general.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/general.yml:16: update your workflow using https://app.stepsecurity.io/secureworkflow/lus/pasty/general.yml/master?enable=pin","Warn: containerImage not pinned by hash: Dockerfile:2","Warn: containerImage not pinned by hash: Dockerfile:21: pin your Docker image by updating alpine:latest to alpine:latest@sha256:4bcff63911fcb4448bd4fdacec207030997caf25e9bea4045fa6c8c44de311d1","Info:   0 out of   3 GitHub-owned GitHubAction dependencies pinned","Info:   0 out of   4 third-party GitHubAction dependencies pinned","Info:   0 out of   2 containerImage dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 8 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Vulnerabilities","score":7,"reason":"3 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: GO-2024-2605 / GHSA-m7wr-2xf7-cm9p","Warn: Project is vulnerable to: GO-2024-2606 / GHSA-mrww-27vc-gghv","Warn: Project is vulnerable to: GO-2022-0355 / GHSA-fx95-883v-4q4h"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}}]},"last_synced_at":"2025-08-21T01:33:07.449Z","repository_id":42010891,"created_at":"2025-08-21T01:33:07.449Z","updated_at":"2025-08-21T01:33:07.449Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31579965,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-08T14:31:17.711Z","status":"ssl_error","status_checked_at":"2026-04-08T14:31:17.202Z","response_time":54,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["hacktoberfest","haste","hastebin","paste","pastebin","server"],"created_at":"2024-08-01T13:01:27.825Z","updated_at":"2026-04-09T00:32:30.033Z","avatar_url":"https://github.com/lus.png","language":"Go","readme":"# pasty\nPasty is a fast and lightweight code pasting server\n\n\u003e [!CAUTION]\n\u003e pasty was misused for distributing illegal material and I received emails from my hosting provider about it. It will remain offline until I manage to implement better report workflows. If you need any stored pastes, send me an email at `hi@kas.lu` or join my [Discord server](https://discord.gg/GaNdScZ4Hq) and ask me there. I am sorry for the inconveniences.\n\n## !!! Important deprecation notices !!!\n\n\u003e This version of pasty uses a new field name for the so far called `deletionToken`: `modificationToken`.\n\u003e Instances using **PostgreSQL** are **not affected** as a corresponding SQL migration will run before the first startup.\n\u003e If you however use **another storage driver** you may have to **update the entries** by hand or using a simple query, depending on your driver as I don't plan to ship migrations for every single storage driver.\n\u003e It may be important to know that the **data migrator has been upgraded** too. This may serve as a **convenient workaround** (export data (field will be renamed) and import data with changed field names again).\n\u003e\n\u003e The old `deletionToken` field will be processed corresponding to these changes but I strongly recommend updating old pastes if possible.\n\n\u003e Additionally, I changed the three `DELETION_TOKEN*`environment variables to their corresponding `MODIFICATION_TOKEN*` ones:\n\u003e - `DELETION_TOKENS` -\u003e `MODIFICATION_TOKENS`\n\u003e - `DELETION_TOKEN_MASTER` -\u003e `MODIFICATION_TOKEN_MASTER`\n\u003e - `DELETION_TOKEN_LENGTH` -\u003e `MODIFICATION_TOKEN_LENGTH`\n\u003e\n\u003e Again, **the old ones will still work** because I do not want to jumble your configurations. However, **please consider updating** them to stay future-proof ^^.\n\n\n## Support\n\nAs pasty is an open source project on GitHub you can open an [issue](https://github.com/lus/pasty/issues) whenever you encounter a problem or feature request.\nHowever, it may be annoying to open an issue just to ask a simple question about pastys functionalities, get help with the installation process or mention something about the hosted version.\nThis is why I created a simple [Discord server](https://discord.gg/GaNdScZ4Hq) you may want to join to get an answer to stuff like that pretty quickly.\n\n## Disclaimer\n\nThe pasty web frontend comes with some service-related links in it (Discord server). Of course, you are allowed to remove these references.\nHowever, a small reference to pasty would be nice ^^.\n\n## Installation\n\nYou may set up pasty in multiple different ways. However, I won't cover all of them as I want to keep this documentation as clean as possible.\n\n### 1.) Building from source\nTo build pasty from source make sure you have [Go](https://go.dev) installed.\n\n1. Clone the repository:\n```sh\ngit clone https://github.com/lus/pasty\n```\n\n2. Switch directory:\n```sh\ncd pasty/\n```\n\n3. Run `go build`:\n```sh\ngo build -o pasty ./cmd/pasty/main.go\n```\n\nTo configure pasty, simply create a `.env` file in the same directory as the binary is placed in.\n\nTo run pasty, simply execute the binary.\n\n### 2.) Docker (recommended)\nTo run pasty with Docker, you should have basic understanding of it.\n\nAn example `docker run` command may look like this:\n```sh\ndocker run -d \\\n    -p 8080:8080 \\\n    --name pasty \\\n    -e PASTY_AUTODELETE=\"true\" \\\n    ghcr.io/lus/pasty:latest\n```\n\nPasty will be available at http://localhost:8080.\n\n---\n\n## General environment variables\n| Environment Variable                  | Default Value                                                    | Type     | Description                                                                                                                |\n|---------------------------------------|------------------------------------------------------------------|----------|----------------------------------------------------------------------------------------------------------------------------|\n| `PASTY_WEB_ADDRESS`                   | `:8080`                                                          | `string` | Defines the address the web server listens to                                                                              |\n| `PASTY_STORAGE_TYPE`                  | `file`                                                           | `string` | Defines the storage type the pastes are saved to                                                                           |\n| `PASTY_HASTEBIN_SUPPORT`              | `false`                                                          | `bool`   | Defines whether or not the `POST /documents` endpoint should be enabled, as known from the hastebin servers                |\n| `PASTY_ID_LENGTH`                     | `6`                                                              | `number` | Defines the length of the ID of a paste                                                                                    |\n| `PASTY_ID_CHARACTERS`                 | `abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789` | `string` | Defines the characters to use when generating paste IDs                                                                    |\n| `PASTY_MODIFICATION_TOKENS`           | `true`                                                           | `bool`   | Defines whether or not modification tokens should be generated                                                             |\n| `PASTY_MODIFICATION_TOKEN_MASTER`     | `\u003cempty\u003e`                                                        | `string` | Defines the master modification token which is authorized to modify every paste (even if modification tokens are disabled) |\n| `PASTY_MODIFICATION_TOKEN_LENGTH`     | `12`                                                             | `number` | Defines the length of the modification token of a paste                                                                    |\n| `PASTY_MODIFICATION_TOKEN_CHARACTERS` | `abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789` | `string` | Defines the characters to use when generating modification tokens                                                          |\n| `PASTY_RATE_LIMIT`                    | `30-M`                                                           | `string` | Defines the rate limit of the API (see https://github.com/ulule/limiter#usage)                                             |\n| `PASTY_LENGTH_CAP`                    | `50000`                                                          | `number` | Defines the maximum amount of characters a paste is allowed to contain (a value `\u003c= 0` means no limit)                     |\n\n## AutoDelete\nPasty provides an intuitive system to automatically delete pastes after a specific amount of time. You can configure it with the following variables:\n| Environment Variable             | Default Value | Type     | Description                                                                    |\n|----------------------------------|---------------|----------|--------------------------------------------------------------------------------|\n| `PASTY_AUTODELETE`               | `false`       | `bool`   | Defines whether or not the AutoDelete system should be enabled                 |\n| `PASTY_AUTODELETE_LIFETIME`      | `720h`        | `string` | Defines the duration a paste should live until it gets deleted                 |\n| `PASTY_AUTODELETE_TASK_INTERVAL` | `5m`          | `string` | Defines the interval in which the AutoDelete task should clean up the database |\n\n## Reports\nPasty aims at being lightweight by default. This is why no fully-featured admin interface with an overview over all pastes and reports is included.\nHowever, pasty does include a way of abstract reports to allow frontends work with this information.\nIf enabled, pasty makes a standardized request to the configured webhook URL if a paste is reported.\n| Environment Variable         | Default Value | Type     | Description                                                                                         |\n|------------------------------|---------------|----------|-----------------------------------------------------------------------------------------------------|\n| `PASTY_REPORTS`              | `false`       | `bool`   | Defines whether or not the report system should be enabled                                          |\n| `PASTY_REPORT_WEBHOOK`       | `\u003cempty\u003e`     | `string` | Defines the webhook URL that is called whenever a paste is reported                                 |\n| `PASTY_REPORT_WEBHOOK_TOKEN` | `\u003cempty\u003e`     | `string` | Defines the token that is sent in the `Authorization` header on every request to the report webhook |\n\n## Storage types\nPasty supports multiple storage types, defined using the `PASTY_STORAGE_TYPE` environment variable (use the value behind the corresponding title in this README).\nEvery single one of them has its own configuration variables: \n\n### File (`file`)\n| Environment Variable      | Default Value | Type     | Description                                               |\n|---------------------------|---------------|----------|-----------------------------------------------------------|\n| `PASTY_STORAGE_FILE_PATH` | `./data`      | `string` | Defines the file path the paste files are being saved to  |\n\n---\n\n### PostgreSQL (`postgres`)\n| Environment Variable         | Default Value                            | Type     | Description                                                                         |\n|------------------------------|------------------------------------------|----------|-------------------------------------------------------------------------------------|\n| `PASTY_STORAGE_POSTGRES_DSN` | `postgres://pasty:pasty@localhost/pasty` | `string` | Defines the PostgreSQL connection string (you might have to add `?sslmode=disable`) |\n\n---\n\n### MongoDB (`mongodb`)\n| Environment Variable                      | Default Value                           | Type     | Description                                                     |\n|-------------------------------------------|-----------------------------------------|----------|-----------------------------------------------------------------|\n| `PASTY_STORAGE_MONGODB_CONNECTION_STRING` | `mongodb://pasty:pasty@localhost/pasty` | `string` | Defines the connection string to use for the MongoDB connection |\n| `PASTY_STORAGE_MONGODB_DATABASE`          | `pasty`                                 | `string` | Defines the name of the database to use                         |\n| `PASTY_STORAGE_MONGODB_COLLECTION`        | `pastes`                                | `string` | Defines the name of the collection to use                       |\n\n---\n\n### S3 (`s3`)\n| Environment Variable                 | Default Value | Type     | Description                                                                               |\n|--------------------------------------|---------------|----------|-------------------------------------------------------------------------------------------|\n| `PASTY_STORAGE_S3_ENDPOINT`          | `\u003cempty\u003e`     | `string` | Defines the S3 endpoint to connect to                                                     |\n| `PASTY_STORAGE_S3_ACCESS_KEY_ID`     | `\u003cempty\u003e`     | `string` | Defines the access key ID to use for the S3 storage                                       |\n| `PASTY_STORAGE_S3_SECRET_ACCESS_KEY` | `\u003cempty\u003e`     | `string` | Defines the secret acces key to use for the S3 storage                                    |\n| `PASTY_STORAGE_S3_SECRET_TOKEN`      | `\u003cempty\u003e`     | `string` | Defines the session token to use for the S3 storage (may be left empty in the most cases) |\n| `PASTY_STORAGE_S3_SECURE`            | `true`        | `bool`   | Defines whether or not SSL should be used for the S3 connection                           |\n| `PASTY_STORAGE_S3_REGION`            | `\u003cempty\u003e`     | `string` | Defines the region of the S3 storage                                                      |\n| `PASTY_STORAGE_S3_BUCKET`            | `pasty`       | `string` | Defines the name of the S3 bucket (has to be created before setup)                        |\n","funding_links":["https://github.com/sponsors/lus"],"categories":["Install from Source","Go","Software","hacktoberfest"],"sub_categories":["Pastebins"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flus%2Fpasty","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flus%2Fpasty","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flus%2Fpasty/lists"}