# pasty Pasty is a fast and lightweight code pasting server ## General environment variables | Environment Variable | Default Value | Type | Description | |-------------------------------|---------------|----------|-------------------------------------------------------------------------------------------------------------| | `PASTY_WEB_ADDRESS` | `:8080` | `string` | Defines the address the web server listens to | | `PASTY_STORAGE_TYPE` | `file` | `string` | Defines the storage type the pastes are saved to | | `PASTY_HASTEBIN_SUPPORT` | `false` | `bool` | Defines whether or not the `POST /documents` endpoint should be enabled, as known from the hastebin servers | | `PASTY_DELETION_TOKEN_LENGTH` | `12` | `number` | Defines the length of the deletion token of a paste | | `PASTY_RATE_LIMIT` | `30-M` | `string` | Defines the rate limit of the API (see https://github.com/ulule/limiter#usage) | ## Storage types Pasty supports multiple storage types, defined using the `PASTY_STORAGE_TYPE` environment variable (use the value behind the corresponding title in this README). Every single one of them has its own configuration variables: ### File (`file`) | Environment Variable | Default Value | Type | Description | |---------------------------|---------------|----------|-----------------------------------------------------------| | `PASTY_STORAGE_FILE_PATH` | `./data` | `string` | Defines the file path the paste files are being saved to | ### S3 (`s3`) | Environment Variable | Default Value | Type | Description | |--------------------------------|---------------|----------|-------------------------------------------------------------------------------------------| | `STORAGE_S3_ENDPOINT` | `` | `string` | Defines the S3 endpoint to connect to | | `STORAGE_S3_ACCESS_KEY_ID` | `` | `string` | Defines the access key ID to use for the S3 storage | | `STORAGE_S3_SECRET_ACCESS_KEY` | `` | `string` | Defines the secret acces key to use for the S3 storage | | `STORAGE_S3_SECRET_TOKEN` | `` | `string` | Defines the session token to use for the S3 storage (may be left empty in the most cases) | | `STORAGE_S3_SECURE` | `true` | `bool` | Defines whether or not SSL should be used for the S3 connection | | `STORAGE_S3_REGION` | `` | `string` | Defines the region of the S3 storage | | `STORAGE_S3_BUCKET` | `pasty` | `string` | Defines the name of the S3 bucket (has to be created before setup) |