Docs / Hosting OwnBase

Attachment storage

Attachments are unlimited unless you say otherwise, which on a small disk means one enthusiastic upload can fill it. Cap the workspace with --storage-limit-mb, or OWNBASE_STORAGE_LIMIT_MB for Compose:

ownbase-server --data ./data --storage-limit-mb 20000

The cap covers every stored attachment plus uploads still arriving, so simultaneous uploads cannot cross it between them. An upload that would not fit is refused with 507 and leaves nothing behind; the author is told the workspace is full and keeps their draft. Deleting a message frees its attachments back once the cleanup worker runs.

Members can see usage under Account settings, including how much is left and the per-file maximum. 0 means unlimited, which is the default.

An attachment chosen and then thought better of would otherwise hold its bytes forever. Uploads never attached to a message are freed after 24 hours, tunable with --abandoned-upload-hours or OWNBASE_ABANDONED_UPLOAD_HOURS. Files a scheduled message is still waiting to send are never swept, however old they are. The window has to outlast the gap between choosing a file and sending it, including a client that goes offline in between: an outbox entry that has been waiting longer than the window loses its attachments and says so rather than sending the words alone.

Blobs left behind by a process killed mid-upload — bytes on disk that no database row accounts for — are found and freed at startup.

Size the cap below the free space on the volume rather than at it: the database, its write-ahead log, and any backups written locally share that disk. Lowering a cap below what is already stored is allowed — nothing is deleted, and uploads are refused until the workspace is back under the line.

Files of 8 MiB or more use the browser or desktop download manager, which streams them to disk without first buffering a complete JavaScript blob. Large images show a download card; smaller files keep their existing preview/download path. Upgrade both the server and client to use this feature.

The client requests a single-use link valid for 60 seconds and tied to its signed-in session. Access is checked again before streaming. The server omits file requests from its request logs; configure reverse-proxy access logs to omit query strings on /api/files/ too, since download contains the temporary credential. Tickets are stored only as hashes and are invalidated by sign-out or file deletion.

Transfer progress, cancellation and completion appear in the browser or device. A failed or cancelled download can be started again from the file card. Downloads do not support range resume, and retrying creates a new link and starts from the beginning. Revocation prevents new transfers; a transfer already streaming is not interrupted.

This page is made from docs/DEPLOYMENT.md.