Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,14 @@ GOFTP_RUN_AS=

# Largest accepted upload per file, e.g. 10GiB; 0 = unlimited.
GOFTP_UPLOAD_MAX_SIZE=0
# Free disk space that uploads leave for the database and everything else
# on the disk, e.g. 5GiB; 0 = no check.
GOFTP_UPLOAD_MIN_FREE=1GiB

# How much each user's home may hold, along with what they deleted from it
# that is in the trash, e.g. 10GiB; 0 = no limit. `goftp user quota NAME
# SIZE` sets it for one user.
GOFTP_HOMES_QUOTA=0

# Connections one client may hold at once when clients connect directly,
# e.g. 100; 0 = no limit. Behind a reverse proxy, limit them there.
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -216,8 +216,8 @@ token. `POST /.auth/logout` ends the session. Sessions last
needs a Content-Length.

The target directory must exist, and `upload.max_size` caps each file.
Uploads stop short of the disk's last `upload.min_free` bytes (1 GiB by
default; `0` turns the check off), which stay for the database and
Uploads stop short of the disk's last `upload.min_free` bytes
(`GOFTP_UPLOAD_MIN_FREE`; 1 GiB by default, `0` turns the check off), which stay for the database and
everything else on that disk: the upload gets `507 Insufficient Storage`.
Users who may upload new files into a folder (`write`) can also create
folders in it, with the "New folder" button or
Expand Down
2 changes: 2 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@ services:
GOFTP_DATABASE_URL: postgres://goftp@postgres:5432/goftp?sslmode=disable
PGPASSWORD: ${POSTGRES_PASSWORD}
GOFTP_UPLOAD_MAX_SIZE: ${GOFTP_UPLOAD_MAX_SIZE:-0}
GOFTP_UPLOAD_MIN_FREE: ${GOFTP_UPLOAD_MIN_FREE:-1GiB}
GOFTP_HOMES_QUOTA: ${GOFTP_HOMES_QUOTA:-0}
GOFTP_SERVER_MAX_CONNS_PER_IP: ${GOFTP_MAX_CONNS_PER_IP:-0}
GOFTP_SERVER_PROXY_HEADER: ${GOFTP_PROXY_HEADER:-}
GOFTP_SERVER_TRUSTED_PROXIES: ${GOFTP_TRUSTED_PROXIES:-}
Expand Down
Loading