Trustferry documentation

Trustferry is a team vault and a secure exchange for files and secrets. It runs as one program with the web app built in, and keeps everything in storage you own. These pages describe version 0.6.0.

Trustferry was called Vaultferry before version 0.5.0. Settings keep the VF_ prefix and API tokens keep vf_, so existing installations keep working.

Quick start

On a laptop or a single server

./trustferry              # Linux or macOS
.\trustferry.exe          # Windows

Open http://localhost:8080, paste the setup token printed in the terminal, and create the first administrator. Data goes to ./data, including a generated master.key: back it up. Until email is set up, links and codes are printed in the terminal so you can try every flow.

With Docker Compose

cp .env.example .env
docker run --rm $(docker build -q .) -gen-key    # paste the output into VF_MASTER_KEY
docker compose up --build

This starts Trustferry with MinIO as S3 storage and a mail catcher for testing.

First sign-in

  1. Enter the setup token. It stops anyone who reaches the address first from claiming your installation.
  2. Name your organization and create the first administrator.
  3. Turn on two-factor sign-in for that account under Account & Security. Sensitive settings stay locked until it's on.
  4. Under Administration, set up Storage, Organization Settings (email) and Malware Protection. Each has a Test button.
  5. Invite people, create teams, and import your existing passwords.

Vault items and files

Give items a path such as /finance/payments and labels. Secrets are encrypted before they're stored; files are scanned for malware before anyone else can download them. Only the owner and administrators can edit or delete an item.

Teams and who can see what

Administrators create teams under Identity & Access → Teams, and add people or service accounts to them. Each item has a Who can see this setting:

SettingWho sees the item
Everyone in the organizationEvery member. This is the default, and how items worked before teams existed.
Only meThe owner and administrators.
Specific teamsThe owner, administrators and members of the chosen teams.

Moving in from other tools

Open Import Data, choose the tool, and follow the export steps shown. Then drop the export file in.

ToolHow to export
BitwardenTools → Export vault → .json (not the encrypted option), or .csv
1PasswordFile → Export → 1PUX (recommended) or CSV
LastPassAccount options → Advanced → Export → LastPass CSV File
KeePass / KeePassXCFile → Export → KeePass XML (2.x), or Database → Export → CSV File
Chrome, Edge, BravePassword Manager settings → Export passwords
Firefoxabout:logins → ⋯ → Export Logins
DashlaneSettings → Export data → CSV
Anything elseA CSV whose first row names the columns: Name, Username, Password, URL, Notes, Folder
  1. The preview shows how many logins, keys and notes were found and which folders, without showing any password.
  2. Choose the folder to import into, labels, who can see the items, and whether to skip entries that already exist.
  3. Import. Each item is encrypted as it is saved, folders become paths, and the source is recorded on each item and in the audit log.

The export file holds your passwords in plain text. Trustferry reads it in memory and never stores it; delete it from your computer once the import is done. Password-protected exports and KeePass .kdbx databases can't be read: export without a password instead.

To move files from Dropbox, Google Drive, OneDrive, SharePoint or a file server, download the folder and use Upload Files → Upload a folder. The folder structure becomes paths, and every file is scanned. 1Password attachments are moved the same way.

Secure links

  1. Tick items in any list and choose Share selected. The link contains exactly those items; you can remove one, but not add others. To start from nothing, use Secure Links → New secure link.
  2. Add the recipients' email addresses, an expiry and an optional message. Turn on Request files to let them upload documents back into a folder you choose.
  3. Recipients get an email with the link. Opening it sends a six-digit code to the same address: valid for ten minutes, five attempts, one use.
  4. A recipient sees only that link's items and their own uploads. You can resend or revoke the link at any time.

API and service accounts

Create a service account under Identity & Access, then issue a token from its panel. The token is shown once and stored only as a hash. Put service accounts in teams to give automation access to team items.

curl -H "Authorization: Bearer vf_xxx_yyy" https://vault.example.com/api/items?q=payments

curl -H "Authorization: Bearer vf_xxx_yyy" -H "Content-Type: application/json" \
     -d '{"kind":"secret","name":"Partner API key","path":"/vendors","fields":{"apiKey":"..."},"visibility":"teams","teamIds":["TEAM_ID"]}' \
     https://vault.example.com/api/items

Single sign-on

Trustferry uses OpenID Connect with the authorization code flow, and checks the state, the nonce and the ID token's signature, issuer, audience and expiry on every sign-in.

Okta

  1. In the Okta admin console, open Applications → Create App Integration, choose OIDC – OpenID Connect and Web Application.
  2. Set the sign-in redirect URI to https://YOUR-TRUSTFERRY-ADDRESS/auth/oidc/callback, with the grant type Authorization Code.
  3. Assign the people or groups who may use Trustferry.
  4. Copy the client ID and client secret. The issuer is your authorization server, for example https://YOUR-ORG.okta.com/oauth2/default.
  5. In Trustferry, go to Organization Settings → Single sign-on (OpenID Connect), paste the issuer, client ID and secret, list the email domains allowed to sign in, choose whether new people get an account automatically, and save.

Microsoft Entra ID

  1. In the Entra admin center, open App registrations → New registration. Add the redirect URI https://YOUR-TRUSTFERRY-ADDRESS/auth/oidc/callback as a Web platform.
  2. Under Certificates & secrets, create a client secret.
  3. The issuer is https://login.microsoftonline.com/YOUR-TENANT-ID/v2.0. Paste it with the application (client) ID and secret into Trustferry.

Once SSO works, you can turn off password sign-in for the whole organization. If a sign-in fails, the person sees a plain explanation and the reason is written to the server log for administrators.

Storage

In Administration → Storage, choose Amazon S3 (or MinIO, Cloudflare R2, Wasabi, Ceph), Azure Blob Storage or local disk, and press Test connection. Switching copies every record, file and audit entry to the new storage before it's used.

On AWS, give the server an IAM role instead of access keys. This is the least-privilege policy for one bucket and email through SES:

{ "Version": "2012-10-17", "Statement": [
  { "Effect": "Allow", "Action": ["s3:ListBucket","s3:ListBucketMultipartUploads","s3:GetBucketLocation","s3:GetBucketCORS","s3:PutBucketCORS"],
    "Resource": "arn:aws:s3:::YOUR-BUCKET" },
  { "Effect": "Allow", "Action": ["s3:GetObject","s3:PutObject","s3:DeleteObject","s3:AbortMultipartUpload","s3:ListMultipartUploadParts","s3:GetObjectTagging"],
    "Resource": "arn:aws:s3:::YOUR-BUCKET/*" },
  { "Effect": "Allow", "Action": ["ses:SendEmail","ses:SendRawEmail"], "Resource": "arn:aws:ses:REGION:ACCOUNT:*" } ] }

Turn on Block all public access, versioning and default encryption for the bucket. Browsers upload straight to it, so tick Set CORS when switching and Trustferry adds the rule it needs. Azure container names must be 3–63 lowercase letters, numbers and single hyphens.

Email delivery

In Organization Settings → Email, choose SMTP, Microsoft 365, Amazon SES, SendGrid, Mailgun, Postmark or Azure Communication Services, then send a test email.

Amazon SES

  1. Verify your domain in SES and turn on Easy DKIM; publish the three CNAME records it shows.
  2. Set a custom MAIL FROM domain so SPF aligns for DMARC.
  3. New SES accounts can only send to verified addresses. Request production access before inviting partners.
  4. Choose Amazon SES in Trustferry with your region and From address. With an IAM role, no keys are needed.

SPF, DKIM and DMARC

With all three published, receiving servers can reject email that pretends to be from you. Check DNS records under Email security shows each one with the exact fix.

RecordNameValue
SPF (TXT)your-domainv=spf1 include:amazonses.com -all (for SES)
DKIMtrustferry._domainkey.your-domainShown after Generate DKIM key (SMTP), or the three SES CNAME records
DMARC (TXT)_dmarc.your-domainv=DMARC1; p=quarantine; rua=mailto:dmarc@your-domain

Also set a security phrase. It appears at the top of every email and on the partner page, so partners can tell a real email from a fake. Privacy mode keeps link names and messages out of subjects and previews.

Malware scanning

Pick an engine in Administration → Malware Protection and press Test engine, which sends the harmless EICAR test file.

EngineUse it for
ICAPSymantec, Trellix, Sophos, Trend Micro, Kaspersky, ESET, Fortinet, Check Point
Installed antivirusMicrosoft Defender or any command-line scanner (needs VF_ALLOW_SCAN_COMMAND=true)
ClamAVThe open-source clamd. Raise its stream and file size limits for large files.
OPSWAT MetaDefenderSeveral engines at once, on-premises or cloud
VirusTotalReputation by file hash; unknown files are only uploaded if you allow it
Cloud scanningVerdicts from GuardDuty Malware Protection for S3 or Defender for Storage

New uploads can't be downloaded until they're scanned. Infected files are quarantined, can't be shared, and administrators are emailed.

Settings reference

VariablePurpose
VF_LISTENAddress to listen on (default :8080)
VF_BASE_URLPublic address used in emailed links and the SSO redirect
VF_STORAGEfs, s3 or azure to fix storage in configuration; leave unset to manage it on screen
VF_DATA_DIRFolder for local storage and settings (default ./data)
VF_S3_BUCKET, VF_S3_REGION, VF_S3_ENDPOINTS3 bucket, region and an optional compatible endpoint
VF_AZURE_ACCOUNT, VF_AZURE_KEY, VF_AZURE_CONTAINERAzure Blob account, key and container
VF_KEY_PROVIDER, VF_KMS_KEY_IDlocal master key or awskms with a KMS key
VF_MASTER_KEYBase64 32-byte key; set VF_REQUIRE_MASTER_KEY=true in production
VF_SETUP_TOKENToken for the first-run screen
VF_COOKIE_SECUREtrue behind HTTPS
VF_TRUSTED_PROXIESAddresses of your load balancer; only these may set the client address
VF_SMTP_CA_FILEExtra CA certificate for an internal mail relay
VF_REFRESH_SECONDSHow often each copy reloads its index from storage (default 30)

Deployment

Our reference deployment is a small ARM instance on AWS, open only on ports 80 and 443, managed through AWS Systems Manager instead of SSH, with a private versioned S3 bucket reached through an instance role.

Security model

Backups and keys

Back up the storage (turn on versioning, and replication if you need it) and the master key. Without the master key the encrypted secrets can't be read. With AWS KMS, the key never leaves KMS.

Upgrades

Replace the program and restart it. Each release reads data written by earlier ones. The single-server package includes an upgrade script that keeps the previous version and restores it automatically if the new one doesn't start cleanly.