This project has undergone several changes, but here's where we are now:
Paste69 is a clone of the popular pastebin service 0x45.st, but written in Crystal using [the Athena framework](https://athenaframework.org/) rather than in Python with Flask.
Or, you can use the hosted version available through ghcr:
```bash
docker pull ghcr.io/watzon/paste69:main
docker run -d -p 8080:8080 ghcr.io/watzon/paste69:main
```
All configuration items are available through environment variables, in addition to the config file. Configuration items and their environment variable names are listed below.
## Configuration
I've done my best to make Paste69 as zero configuration as possible. The default values listed in [src/services/config_manager.cr](src/services/config_manager.cr) should be sufficient for most deployments. However, should you wish to change any of the values you can do so through a config file, or using environment variables.
Valid config file locations are:
- /etc/paste69/config.yml
- ~/.paste69/config.yml
- ~/.config/paste69/config.yml
The following table contains all available configuration options, their default values, and their environment variable counterparts:
| `vscan.interval` | `604800` | `VSCAN.INTERVAL` | How often to scan for viruses |
| `vscan.ignore` | _too long_ | `VSCAN.IGNORE` | Mime types for which to ignore virus scanning |
| `url_alphabet` | `"01234567890abcdef..."` | `URL_ALPHABET` | Alphabet string to use for shortened URL creation |
### Custom Templates
Paste69 supports custom templates, which can be used to override the default templates. To do this, simply create a directory somewhere and copy the default templates from [src/templates](src/templates) into it. For example:
```bash
mkdir -p ~/.config/paste69/templates
cp -r ./src/templates ~/.config/paste69/templates
```
and then update your config file (or set the TEMPLATES_DIR environment variable) to point to the new location.
IP blocklisting is supported. All uploads database entries _should_ contain an IP address, telling you where it was uploaded from. If you want to block a certain IP address (or even an entire subnet), you can create a file containing a list of IP addresses to block and upadate your config file with the path to the file. The file should contain a single IP address or subnet per line. For example: