SFTP, S3 and FTP
Programs can work with ThirtyFile's files over standard protocols. SFTP is available when an administrator enables it. S3 buckets and FTP receive folders are separate features; their availability is described below.
On this page
Which one to use
Use WebDAV to map your spaces as a drive. Use SFTP for encrypted file transfers with WinSCP, FileZilla, Cyberduck, OpenSSH or rclone. SFTP shows the same tree and follows the same permissions as WebDAV.
SFTP
Under Control panel › General › Apps and protocols, turn on Allow SFTP access. It is off by default. The port is set at startup with THIRTYFILE_SFTP_ADDR (default 0.0.0.0:2022). Publish it separately in Docker Compose; it does not go through an HTTP reverse proxy.
services:
thirtyfile:
environment:
THIRTYFILE_SFTP_ADDR: 0.0.0.0:2022
ports:
- "8080:8080"
- "2022:2022"
Add these entries to your existing Compose service, keeping its image and volumes. Restart with docker compose up -d. Open the chosen TCP port in the firewall only where it is needed.
Connecting
Choose SFTP in your client, your server hostname, port 2022, your ThirtyFile username and an app password. Your account password does not work here. A read-only app password cannot change files, even for an administrator. Check the host key fingerprint shown in the control panel before trusting the first connection.
sftp -P 2022 amy@files.example.com
# After connecting:
ls
cd "My files"
put report.csv
get report.csv
SSH public keys
An administrator also enables Allow SSH keys. Under Account menu › SFTP keys, add a name and your SSH public key. Confirm your current password and two-factor code when requested. Keep the private key on your device. The dialog shows the fingerprint and last use; removing a key stops its access, including existing sessions.
sftp -i ~/.ssh/id_ed25519 -P 2022 amy@files.example.com
What SFTP supports
ThirtyFile roles and sharing control access. Unix owner changes are rejected. Permission changes such as chmod 600, and scp -p, are accepted and change nothing. Modification times a client sets (rclone, WinSCP, scp -p) are kept with the file's content and shown again, so syncing by size and time sends only what changed; new content from elsewhere shows the time it changed in ThirtyFile. It is the same time S3 reports for the file. With rclone, set disable_hashcheck = true, because shell commands for remote checksums are unavailable. Ask your administrator for the expected host key fingerprint if you cannot access the control panel.
List and download files, upload, resume at an offset, make folders, rename, move, and remove items (to the trash). Writes are staged and committed when the file closes: quotas, upload limits, versions and activity records apply. A disconnected unfinished write is discarded. Times sent by clients are accepted but ignored. There is no shell, command execution, rsync over SSH, forwarding or symbolic links. Each account may have five sessions, with 32 open handles per session and a five-minute idle timeout.
The server generates an ed25519 host key in the data folder on first start. Keep it in data backups. Replacing it changes the fingerprint and clients should ask you to verify the change.
S3 buckets
Publish a team or company folder as a bucket. Each Access Key reaches only that folder and acts with its creator's current permissions. This is different from adding an existing S3 service as a storage location.
Endpoint setup
In Control panel › General › Apps and protocols › S3, enable S3, enter a separate hostname such as s3.files.example.com, and choose a Region (default us-east-1). S3 is off by default. The proxy sends this hostname to the same HTTP port as the website; no extra Docker port is needed. Keep the original Host header: it is part of the signature. Use a valid HTTPS certificate and DNS record for the S3 hostname.
Add these directives to the HTTPS server block for the S3 hostname, with your existing certificate settings. Keep upload limits appropriate for your disk and space quotas.
location / {
proxy_pass http://thirtyfile:8080;
proxy_set_header Host $http_host;
proxy_request_buffering off;
proxy_buffering off;
client_max_body_size 0;
}
Publishing and keys
Right-click a folder and choose Publish as S3 bucket…, or open Properties › S3 buckets. Choose a unique name of 3–63 lowercase letters, digits and hyphens. Renaming or moving the folder does not change the bucket name.
Administrators may publish team or company folders. Space managers also need their account's permission to share and Space managers can publish buckets enabled. Personal spaces and spaces where Share links can be made by is Nobody cannot be published. A bucket stops while its folder is in the trash, its creator loses the right to manage it, or the space is disabled. Restoring access or the folder makes an enabled bucket work again.
Publishing a bucket and making a key ask for your current password, and a code if you use two-factor sign-in. A key acts as the person who published the bucket, so only they or an administrator can make its keys or turn a stopped bucket or key on again. Others who manage the folder can stop or delete them. The activity log records each change.
Create one or more keys with a description, read-only or read-and-write access, and an optional end date. Save the Secret Key immediately: it is shown only once. Keys are encrypted with the data folder's secret.key; back it up as described in the backup guide. The creator receives an access-ending notice within three days of an enabled key's end date. Read-only spaces accept only read-only keys, and so does a bucket whose creator's account may not change files: a read-and-write key acts as its creator.
Stop or delete individual keys without affecting others. Control panel › S3 buckets lists every bucket, its creator, keys and last use. Stopping a bucket blocks all its keys; deleting a bucket or key keeps the files. Access Keys do not sign in to the website, SFTP or WebDAV. Activity records name the bucket and key description without storing credentials.
Clients
Choose an S3-compatible service in your program: endpoint https://s3.files.example.com, Region us-east-1 (or your configured Region), path-style URLs, and the bucket's keys. Do not enable virtual-hosted URLs, ACLs or server-side encryption settings.
For aws cli, configure a named profile interactively so secrets do not appear in command history. Set its addressing style to path and use the endpoint on each command.
aws configure --profile thirtyfile
aws configure set s3.addressing_style path --profile thirtyfile
aws --profile thirtyfile --endpoint-url https://s3.files.example.com s3 ls s3://backups/
aws --profile thirtyfile --endpoint-url https://s3.files.example.com s3 cp report.csv s3://backups/report.csv
For rclone, run rclone config, choose S3, provider Other, enter the keys interactively, set the endpoint and Region, enable force_path_style, and leave ACL and server-side encryption unset. Use rclone copy for additive transfers; rclone sync can remove destination files.
ThirtyFile preserves rclone's x-amz-meta-mtime with the current content version, including same-key copies that update its time. Other custom metadata, such as the MD5 rclone adds to large uploads, is accepted and not kept. no_system_metadata does not prevent rclone from sending this timestamp; leave that option off. This does not change the file's modification time outside S3.
Backups and other uses
For restic, publish a Backups folder as backups and make a read-and-write key. Load AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY from your protected credentials store. The repository password is separate from the S3 key; store it safely. Initialize only an empty, dedicated folder.
restic -r s3:https://s3.files.example.com/backups -o s3.region=us-east-1 -o s3.bucket-lookup=path init
restic -r s3:https://s3.files.example.com/backups -o s3.region=us-east-1 -o s3.bucket-lookup=path backup ./documents
Duplicati or Synology Hyper Backup can use an S3-compatible destination with the same endpoint, Region and path-style settings. Do not edit backup repository files in the browser. This S3 endpoint is a destination for those tools, separate from ThirtyFile's own backup and replica policies.
For a partner reading price lists, publish a Price lists folder as price-lists and make a read-only key ending after 90 days. For a data team, make a separate key for each rclone or aws cli job so it can be stopped independently.
Folder mapping and limits
Keys such as a/b/c.txt become nested folders and a file; PUT creates missing parent folders. An empty object ending in / is a folder. Listings use UTF-8 byte order, prefixes, delimiters and bounded pages. Names with traversal, empty components, invalid characters or surrounding spaces are refused. Case-only conflicts are refused in spaces that ignore case.
DELETE moves files and folders to the trash. Overwriting preserves earlier versions according to the space's policy. Quotas and the upload size limit apply. MD5 ETags identify uploaded content, and Content-MD5 and supported AWS checksum headers are checked. Multipart parts stay in temporary storage for at most one day; abort an unfinished upload to free them sooner. A key may have 32 pending uploads and a bucket 128 (512 server-wide); parts are capped at 10,000 per upload.
Supported operations are ListBuckets (the key's own bucket only), HeadBucket, GetBucketLocation, ListObjects/V2, HEAD, ranged and conditional GET, PUT, COPY within the same bucket, DELETE and batch deletion, multipart create/upload/complete/abort/list, and presigned GET/PUT. PUT and completing a multipart upload take If-None-Match: * (only if nothing has that key, as Terraform's lock file needs) and If-Match (only over the content with that ETag); the condition is checked again as the object is stored, so of two writers only one succeeds. Deleting a folder key (one ending in /) removes the folder only when it is empty, as S3 removes only the folder marker: the objects in it stay. Pages of more than 1,000 keys, parts or uploads return 1,000, as AWS does. Presigned URLs last at most seven days and stop immediately when the key expires or is revoked. A read-only key cannot PUT even through a presigned URL. Without a request for something else, a download is an attachment (Content-Disposition: attachment, X-Content-Type-Options: nosniff). A presigned link may ask for another disposition, file name, type or cache setting with the response-* parameters, as in S3; they are part of the signature, so only the holder of the key can ask for them.
ACLs, bucket creation through S3, bucket policies, lifecycle, Object Lock, S3 versioning, object tags, server-side encryption settings and virtual-hosted URLs are not offered. Unsupported operations answer NotImplemented. Keep clocks within 15 minutes of the server; wrong signatures share the sign-in failure limit.
FTP receive folders
FTP receive folders let scanners and other devices upload to one folder with their own credentials. They are off by default and separate from adding an existing FTP server as a storage location. Devices do not use your account or app password.
Enable FTP and explicit FTPS
In Control panel › General › Apps and protocols, enable FTP receive folders. Mount a PEM certificate chain and private key readable by user 1000. Add these options to your Docker Compose service and restart it:
services:
thirtyfile:
ports:
- "2121:2121"
- "30000-30009:30000-30009"
volumes:
- ./ftp-tls:/ftp-tls:ro
environment:
THIRTYFILE_FTP_ADDR: 0.0.0.0:2121
THIRTYFILE_FTP_PASSIVE: 30000-30009
THIRTYFILE_FTP_PASSIVE_HOST: ftp.files.example.com
THIRTYFILE_FTP_CERT: /ftp-tls/fullchain.pem
THIRTYFILE_FTP_KEY: /ftp-tls/privkey.pem
The default control address is 0.0.0.0:21; this example uses port 2121. Publish both the control port and the complete passive range with identical inside/outside port numbers. For NAT, forward them to the server and set the passive hostname to its public DNS name or IPv4 address. FTP does not go through an HTTP reverse proxy. Use explicit FTPS (AUTH TLS), validate the server certificate, and encrypt the data connection (PROT P). Implicit FTPS and active-mode transfers are not offered.
Public connections require encryption. For an old device on a trusted LAN only, an administrator can allow plaintext FTP from a directly connected private or loopback peer. This sends passwords and content without encryption. Keep that listener on the trusted LAN; do not put plaintext behind a TCP proxy or an Internet port forward. Reverse proxy headers cannot change this policy. Without a certificate, only these explicitly allowed private connections can connect. A port or certificate error is shown in the control panel and retried; it does not stop the website. Disabled FTP does not open its port or read certificates. Docker's port proxy is never taken for a local device: when Docker relays a published port that way, every client seems to come from the container's gateway, so plain FTP is refused. For devices to be seen by their own address, use host networking for the container, or turn off Docker's userland proxy.
Give a device its own receive folder
Right-click a folder and choose Make FTP receive folder…, or use the folder's details/properties. Administrators can publish team folders; space managers need the matching FTP policy. Personal spaces, guest accounts and spaces with share links turned off cannot be published. Give each device a descriptive name and optional end date. Save the generated device username and password now: the password is shown only once.
Use passive mode on the device, your server hostname and control port, its device username/password, and / as the upload directory. The published folder follows its identity when renamed or moved. Uploads are accepted by default; listing and downloading are separate options, both off by default. Enable only what that device needs. SIZE, MDTM and file metadata need download permission. Device access never permits deleting, moving, renaming, changing permissions, or shell commands. Use devices that save with STOR; resumable/append uploads and temporary-name-then-rename workflows are not supported. By default an upload replaces a file of the same name, keeping its earlier version, which suits a camera that saves the same name again. Turn off Replace files with the same name for a scanner, so that a new file whose name is taken gets a number and nothing already there changes.
Only the person who published a receive folder, or an administrator, can rotate its password, turn it on again, let the device list or download files, or extend its end date. Others who manage the folder can stop it, narrow it or delete it. The activity log names the receive folder in each entry.
Control panel › FTP receive folders lists every publication, creator, destination, permissions, expiry and last use. Edit it to stop access, rotate its password, or delete its credentials after confirming your identity. A changed policy or rotated password invalidates existing sessions too. Reconnect with the new password after rotation; files remain. Access also stops when the publication expires, its folder is trashed, its creator is disabled or loses publication rights, or space sharing is turned off. A parent publication never crosses a nested restricted-folder boundary, including for administrators.
Transfer limits and records
Uploads stay private until committed. Failed or aborted transfers remove temporary content and preserve the old file; a successful same-name upload keeps earlier versions under the space's version policy. Space quotas, read-only spaces and the per-file upload limit apply. Activity records name the creator and receive folder without storing credentials.
A receive folder allows five simultaneous sessions. The server allows 128 control connections, gives sign-in 30 seconds, ends idle control sessions after two minutes, and stops stalled data after 30 seconds. Sessions last at most one hour. Listings are capped at 10,000 entries; use smaller receiving folders for devices. Wrong passwords share the website sign-in address budget. Passive connections must come from the same peer as their control connection; FTP bounce/FXP and symbolic links are refused. This service is intended for receiving files from compatible devices, not a general-purpose FTP account.
Examples
A server can upload a nightly report with an SSH key and an SFTP script. A designer can transfer a large project with Cyberduck. For rclone, run rclone config, choose SFTP, set the hostname and port, verify the host key, and use an app password or SSH private key; avoid putting credentials in command history.