refactor config variables, add upload password
This commit is contained in:
parent
bfe7fcde99
commit
eb53030043
13 changed files with 456 additions and 182 deletions
24
README.md
24
README.md
|
@ -22,17 +22,27 @@
|
|||
## configuration
|
||||
|
||||
transbeam is configured with the following environment variables:
|
||||
- `TRANSBEAM_STORAGE_DIR`: path where uploaded files should be stored (default: `./storage`)
|
||||
- `TRANSBEAM_STATIC_DIR`: path where the web app's static files live (default: `./static`)
|
||||
- `TRANSBEAM_PORT`: port to listen on localhost for http requests (default: 8080)
|
||||
- `TRANSBEAM_MAX_LIFETIME`: maximum number of days files can be kept for (default: 30)
|
||||
- `TRANSBEAM_MAX_UPLOAD_SIZE`: maximum size, in bytes, of a fileset
|
||||
being uploaded (default: 16GiB)
|
||||
- `TRANSBEAM_STORAGE_DIR`: path where uploaded files should be stored
|
||||
(default: `./storage`)
|
||||
- `TRANSBEAM_STATIC_DIR`: path where the web app's static files live
|
||||
(default: `./static`)
|
||||
- `TRANSBEAM_PORT`: port to listen on localhost for http requests
|
||||
(default: 8080)
|
||||
- `TRANSBEAM_MAX_LIFETIME`: maximum number of days files can be kept
|
||||
for (default: 30)
|
||||
- `TRANSBEAM_MAX_UPLOAD_SIZE`: maximum size of a fileset being
|
||||
uploaded (default: 16G)
|
||||
- `TRANSBEAM_MAX_STORAGE_SIZE`: maximum total size, in bytes, of all
|
||||
files being stored by transbeam (default: 64GiB)
|
||||
files being stored by transbeam (default: 64G)
|
||||
- `TRANSBEAM_MNEMONIC_CODES`: generate memorable download codes using
|
||||
English words, rather than random alphanumeric strings (default:
|
||||
true)
|
||||
- `TRANSBEAM_UPLOAD_PASSWORD`: password for uploading files. This
|
||||
isn't meant to be a hardcore security measure, just a defense
|
||||
against casual internet randos filling up your storage. I strongly
|
||||
recommend setting up fail2ban to throttle password attempts;
|
||||
transbeam logs failed attempts along with IP addresses, in the form
|
||||
`Incorrect authentication attempt from 203.0.113.12`.
|
||||
- `RUST_LOG`: log levels, for the app as a whole and/or for specific
|
||||
submodules/libraries. See
|
||||
[`env_logger`](https://docs.rs/env_logger/latest/env_logger/)'s
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue