{"id":13689278,"url":"https://github.com/grisu48/pasta","last_synced_at":"2025-06-13T09:33:39.920Z","repository":{"id":40650518,"uuid":"318280522","full_name":"grisu48/pasta","owner":"grisu48","description":"Stupid simple pastebin service","archived":false,"fork":false,"pushed_at":"2025-03-03T14:28:46.000Z","size":157,"stargazers_count":15,"open_issues_count":2,"forks_count":5,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-03-27T01:05:31.379Z","etag":null,"topics":["go","golang","pastebin"],"latest_commit_sha":null,"homepage":"https://feldspaten.org/projects/pasta/","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/grisu48.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":"2020-12-03T18:12:22.000Z","updated_at":"2025-03-03T14:28:48.000Z","dependencies_parsed_at":"2023-12-05T09:24:58.870Z","dependency_job_id":"c6d9ca9b-c230-4109-a44f-8c3b1a3316a8","html_url":"https://github.com/grisu48/pasta","commit_stats":{"total_commits":90,"total_committers":7,"mean_commits":"12.857142857142858","dds":0.5111111111111111,"last_synced_commit":"058246f5446f924e414da48afb0ef0aefedaeea1"},"previous_names":[],"tags_count":12,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/grisu48%2Fpasta","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/grisu48%2Fpasta/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/grisu48%2Fpasta/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/grisu48%2Fpasta/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/grisu48","download_url":"https://codeload.github.com/grisu48/pasta/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248690993,"owners_count":21146247,"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":["go","golang","pastebin"],"created_at":"2024-08-02T15:01:41.003Z","updated_at":"2025-04-13T09:33:18.482Z","avatar_url":"https://github.com/grisu48.png","language":"Go","funding_links":[],"categories":["golang"],"sub_categories":[],"readme":"![Build status badge](https://github.com/grisu48/pasta/workflows/pastad/badge.svg)\n\n# pasta\n\nStupid simple pastebin service written in go.\n\nThe aim of this project is to create a simple pastebin service for self-hosting. pasta is self-contained, this means it does not need any additional services, e.g. a database to function. All it needs is a data directory and a config `toml` file and it will work.\n\nThis README contains the most important information. See the [docs](docs/index.md) folder for more documentation, e.g. the [getting-started](docs/getting-started.md) guide.\n\n## Run as container (podman/docker)\n\nThe easiest way of self-hosting a `pasta` server is via the provided container from `ghcr.io/grisu48/pasta:latest`. Setup your own `pasta` instance is as easy as:\n\n* Create your `data` directory (holds config + data)\n* Create a [pastad.toml](pastad.toml.example) file therein\n* Start the container, mount the `data` directory as `/data` and publish port `8199`\n* Configure your reverse proxy (e.g. `nginx`) to forward requests to the `pasta` container\n\nAssuming you want your data directory be e.g. `/srv/pasta`, prepare your server:\n\n    mkdir /srv/pasta\n    cp pastad.toml.example /srv/pastsa/pastad.toml\n    $EDITOR /srv/pastsa/pastad.toml                     # Modify the configuration to your needs\n\nAnd then create and run your container with your preferred container engine:\n\n    docker container run -d --name pasta -v /srv/pasta:/data -p 127.0.0.1:8199:8199 ghcr.io/grisu48/pasta\n    podman container run -d --name pasta -v /srv/pasta:/data -p 127.0.0.1:8199:8199 ghcr.io/grisu48/pasta\n\n`pasta` listens here on port 8199 and all you need to do is to configure your reverse proxy (e.g. `nginx`) accordingly:\n\n```nginx\nserver {\n    listen 80;\n    listen [::]:80;\n    server_name my-awesome-pasta.server;\n\n    client_max_body_size 32M;\n    location / {\n        proxy_pass http://127.0.0.1:8199/;\n    }\n}\n```\n \n Note that the good old [dockerhub image](https://hub.docker.com/r/grisu48/pasta/) is deprecated. It still gets updates but will be removed one fine day.\n\nThe container runs fine as rootless container (podman).\n\n### environment variables\n\nIn addition to the config file, `pastad` can also be configured via environmental variables. This might be useful for running pasta as a container without a dedicated config file. Supported environmental variables are:\n\n| Key | Description |\n|-----|-------------|\n| `PASTA_BASEURL` | Base URL for the pasta instance |\n| `PASTA_PASTADIR` | Data directory for pastas |\n| `PASTA_BINDADDR` | Address to bind the server to |\n| `PASTA_MAXSIZE` | Maximum size (in Bytes) for new pastas |\n| `PASTA_CHARACTERS` | Number of characters for new pastas |\n| `PASTA_MIMEFILE` | MIME file |\n| `PASTA_EXPIRE` | Default expiration time (in seconds) |\n| `PASTA_CLEANUP` | Seconds between cleanup cycles |\n| `PASTA_REQUESTDELAY` | Delay between requests from the same host in milliseconds |\n| `PASTA_PUBLICPASTAS` | Number of public pastas to be displayed |\n\n### macros\n\nThe `BASEURL` setting, defined either via configuration file or via the `PASTA_BASEURL` environment variable, supports custom macros, that should help you in various scenarios. Macros are pre-defined strings, which will be replaced.\n\nThe following macros are currently supported\n\n| Macro | Replaced with | Example |\n| `$hostname` | Local hostname | `localhost` |\n\nA usage example would be to e.g. define the following in your local `pastad.conf`\n\n```toml\nBaseURL = \"http://$hostname:8199\"    # base URL as used within pasta\n```\n\n# Usage\n\nAssuing the server runs on http://localhost:8199, you can use the `pasta` CLI tool (See below) or `curl`:\n\n    curl -X POST 'http://localhost:8199' --data-binary @README.md\n\n## pasta CLI\n\n`pasta` is the CLI utility for making the creation of a pastas (i.e. files submitted to a pasta server) as easy as possible.  \nFor instance, if you want to push the `README.md` file and create a pasta out of it:\n\n    pasta README.md\n    pasta -r http://localhost:8199 REAME.md          # Define a custom remote server\n\n`pasta` reads the config from `~/.pasta.toml` (see the [example file](pasta.toml.example))\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgrisu48%2Fpasta","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgrisu48%2Fpasta","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgrisu48%2Fpasta/lists"}