Attachments
This page is for staff Admins. The Attachments card, the second card in Settings › Integrations, decides whether people can attach files to requests, replies and internal notes, how large a file may be, and where files are kept. It has three parts: Attaching files, Largest file and, at the bottom, Where files are kept. Start with the last one: attaching stays off until you choose where files are kept.
Where files are kept
Section titled “Where files are kept”A new install has no storage: “No storage is chosen yet, so nobody can attach files.”
- Open Settings › Integrations, and find Where files are kept.
- Choosing where files are kept needs your second step from the last 15 minutes. If the part ends with “Choosing where files are kept needs you to confirm it’s you first.” instead of its button, press Confirm it’s you before you fill in anything. Afterwards you come back to the card.
- Choose the Storage: A folder on this server, An S3-compatible bucket or A folder on another server (SFTP).
- Fill in the fields for the kind you chose (below).
- Press Test and save storage. You see “Storage saved. A test file was written, read back and deleted there.”
A folder on this server
Section titled “A folder on this server”“Files on this server’s disk. Not on Vercel, and for one server only.” Give the Folder, an absolute path such as /data/attachments. “It must exist and be writable.” On Vercel this choice isn’t offered, because its disk doesn’t keep files.
An S3-compatible bucket
Section titled “An S3-compatible bucket”“AWS S3, Cloudflare R2, Backblaze B2, or a server of your own such as Garage or SeaweedFS.”
| Field | What to give |
|---|---|
| Service address | For example https://your-account-id.r2.cloudflarestorage.com for Cloudflare R2. In production it must start with https://. |
| Region | “auto on Cloudflare R2. Leave it empty for us-east-1.” |
| Bucket | 3 to 63 lowercase letters, digits, dots and dashes. |
| Access key ID | The key your provider made for Adiutor. |
| Secret access key | Its secret. Never shown again once saved. |
| Bucket in the path | “Most servers of your own, such as Garage or SeaweedFS, need this.” |
A folder on another server (SFTP)
Section titled “A folder on another server (SFTP)”“Any server you reach over SSH, such as a storage box or a NAS.”
| Field | What to give |
|---|---|
| Server and Port | The host name, and the port (22 unless yours differs). |
| User | The account to sign in with. |
| Password and Private key | One of them: “The key’s PEM text. Give a password or a private key.” |
| Host key fingerprint | “As ssh-keygen -lf prints it, starting with SHA256:. Check it on the server itself: no other key is accepted.” |
| Folder | “An absolute path on the server. It must exist.” |
To get the fingerprint, run ssh-keyscan your-server | ssh-keygen -lf -. It prints a line for each kind of key the server has: Adiutor uses the ED25519 key if there is one, else ECDSA, else RSA, so copy that line’s fingerprint. Compare it with the one the server itself prints, for example with ssh-keygen -lf /etc/ssh/ssh_host_ed25519_key.pub. Adiutor checks it on every connection and refuses any other key.
What the test does
Section titled “What the test does”Adiutor writes a small test file to the place, reads it back and deletes it. Only if that works is the storage saved. If it fails, you read the kind of problem, never the server’s reply, such as:
- “The storage couldn’t be reached. Check its address and port.”
- “The storage refused the keys or the password. Check them.”
- “The server’s host key doesn’t match the fingerprint. Check it on the server itself before trying again.”
- “The bucket or the folder doesn’t exist. Create it first.”
- “Writing there isn’t possible. Check the folder’s permissions and the free space.”
- “The storage took too long to answer. Try again, or check its address.”
Saved secrets
Section titled “Saved secrets”A saved secret is kept while its field is empty and the place stays the same. For a bucket that is the same service address and access key ID; for SFTP, the same server, port, user and host key, with both Password and Private key left empty (typing either replaces what was saved). Change one, and you give the secret again.
The folder’s marker
Section titled “The folder’s marker”A folder on this server, or on an SFTP server, holds a marker file that says it is Adiutor’s. Without it, Adiutor refuses to keep, read or remove files there. This makes a server that starts without its storage volume fail loudly, instead of keeping files on a disk that goes away. Saving the storage here sets the folder up, and buckets need no marker.
If the folder isn’t set up, the card says so: “This folder isn’t set up for attached files, so files can’t be kept, read or removed there. If it’s the right folder (on a server, with its volume mounted), test and save it again to set it up.”
Switching storage
Section titled “Switching storage”Attaching files
Section titled “Attaching files”The Attaching files part says what it decides: “Whether people can attach files. While it’s off, files already attached can still be downloaded.” Tick People can attach files and press Save. You see “People can attach files now.” Untick it for “Attaching files is turned off.” It starts off. Until a storage is chosen, the box is locked: “First choose where files are kept, below.”
While it’s off, nobody sees an Attach files button, and uploads are refused with “Attaching files is turned off.”
Largest file
Section titled “Largest file”Largest file (“The largest file anyone may attach.”) is a whole number of Megabytes from 1 to 50 (“From 1 to 50.”). It starts at 10. Press Save size; you see “Largest file saved.” On Vercel the most is 4, because it refuses bigger uploads. Someone who attaches a larger file reads “That file is too large: attach files of at most 10 MB.”
When the server’s environment chooses
Section titled “When the server’s environment chooses”Whoever runs Adiutor can choose these in its environment, and the card then says “Chosen in the server’s environment (ATTACHMENTS_STORAGE), so it can’t be changed here.” (or ATTACHMENTS_MAX_FILE_MB). With ATTACHMENTS_STORAGE set to a storage, the card lists where files are kept, without secrets. Set to off, it says “Attachments are turned off in the server’s environment (ATTACHMENTS_STORAGE=off).”, and the box is locked off. See File storage.
If the folder the environment names isn’t set up, the card says so and shows Set up this folder. It asks “Set up this folder?”: “Do this only if it’s the right folder: on a server, the volume that keeps the attached files must be mounted there. Files are then kept here.” Press Set up folder; you see “Folder set up. A test file was written, read back and deleted there.” It needs your second step like saving does.
Example
Section titled “Example”Alex Admin wants attached files kept in a Cloudflare R2 bucket. In Settings › Integrations, Alex chooses An S3-compatible bucket, gives the service address, region auto, the bucket adiutor-attachments and an access key, and presses Test and save storage. Then Alex ticks People can attach files and presses Save. Avery Alpha at Adiutor Alpha can now attach files to a request.
Who can do this
Section titled “Who can do this”Only staff Admins open Settings. Everyone else gets the “This page doesn’t exist or you don’t have access to it.” page.
Good to know
Section titled “Good to know”- Choosing or setting up the storage is recorded in the audit log (“Changed where attached files are kept”, “Set up where attached files are kept”), without secrets. Attaching and the largest file aren’t. You can test and save 20 times an hour.
- No email goes to the other staff Admins when the storage changes.
- Only some kinds of file can be attached: images, PDFs, text, Office or OpenDocument files, archives and screen recordings. Files has the details.
Related
Section titled “Related”- File storage: the environment variables, volumes and moving files.
- Files: attaching and viewing files.
- Mail server: the card above this one.
Adiutor's code is released under the MIT License. The Adiutor name and logo aren’t covered by it; see the notice.
Set in Inter and JetBrains Mono, under the SIL Open Font License (Inter, JetBrains Mono).