TFE Object Storage
Here's how to install the TFE Object Storage Linux agent, from logging into the server to proving the encryption actually works. Work through the steps in order. Each one depends on the last.
Work through Prerequisites first if you haven't already.
- Until the client access key and client secret key (Step 8) are filled in, the agent runs but rejects every request. That's by design, not a bug.
- TFE Object Storage doesn't support presigned URLs.
- By default it only listens on the same server. To reach it remotely, either enable TLS on the agent (agent 0.2.7 or later, see Step 8) or put an HTTPS reverse proxy in front of it.
1. Server Preparation
Step 1: Log In to the Server
ssh <username>@<server-ip>
Step 2: Make Sure Port 9000 Is Free
sudo ss -tlnp | grep 9000
No output means the port's free. Any output means something else is already using it (often MinIO), which is worth noting, since you can change the port in Step 8.
Step 3: Copy the Installation Package to the Server
scp -r <package-folder>/ <username>@<server-ip>:~/
cd ~/<package-folder>
ls -l
TFE Object Storage shares the same installation package and deployment/ folder as TFE Local Directory. Check that install.sh, uninstall.sh, and takakrypt-fos are at least present.
Step 4: Grant Permission to Run the Installer
chmod u+x install.sh uninstall.sh
ls -l install.sh uninstall.sh
2. Running the Installer
Step 5: Run the Installer
Choose one of the three methods below.
a. Environment variables (recommended)
TAKAKRYPT_GATEWAY_AGENT_ID="" \
TAKAKRYPT_GATEWAY_ACCESS_TOKEN="<access-token>" \
TAKAKRYPT_GATEWAY_USER_KEY="uk_<user-key>" \
TAKAKRYPT_GATEWAY_TENANT="default" \
TAKAKRYPT_GATEWAY_ENDPOINT="https://<gateway-domain>" \
sudo -E ./install.sh fos --start
- Include the
-Eoption forsudo, or the installer falls back to interactive mode. - Leave the Agent ID empty (
"") to have the agent register itself in the dashboard.
You can install TFE Local Directory and TFE Object Storage together on the same server. Just run install.sh fte and install.sh fos separately, each with its own Agent ID.
b. Bootstrap file
sudo ./install.sh fos --bootstrap=/path/fos-config.yaml --start
c. Interactive
sudo ./install.sh fos
The installer asks for Access Token, User Key, Tenant, Endpoint, and Agent ID, cleaning up the address the same way as TFE Local Directory does (adds http:// if the scheme is missing, strips a trailing slash).
Step 6: Enter the Server Password
[sudo] password for <username>:
Step 7: Wait for the Automatic Installation Process
Same stages as TFE Local Directory, just with different paths: the agent goes to /usr/local/bin/takakrypt-fos, and the configuration and data folders are /etc/takakrypt/fos and /var/lib/takakrypt/fos.
3. Application and Object Storage Access Settings
Step 8: Fill In the Client Access Key and Secret Key
sudo nano /etc/takakrypt/fos/fos-config.yaml
Edit the file at this exact path, since editing a copy inside the installation package folder does nothing to the running agent.
Generate a new key pair. This one's defined by the admin, not pulled from AWS, MinIO, or the dashboard:
# client access key
openssl rand -hex 10
# client secret key
openssl rand -hex 20
Fill in the s3proxy section:
s3proxy:
enabled: true
listen_addr: "127.0.0.1:9000"
client_access_key: "<client-access-key>"
client_secret_key: "<client-secret-key>"
allow_anonymous: false
# optional, for remote access over TLS instead of a reverse proxy
# tls_cert_file: "/etc/takakrypt/fos/tls/cert.pem"
# tls_key_file: "/etc/takakrypt/fos/tls/key.pem"
| Rule | Reason |
|---|---|
client_access_key and client_secret_key must be filled in | Without them, every request is rejected with 503 ServiceUnavailable |
| This key is not the MinIO/S3 key | It is a completely separate key pair, used only between applications and TFE Object Storage |
allow_anonymous must stay false | true is only for internal testing, never for production |
listen_addr set to anything other than 127.0.0.1 requires tls_cert_file and tls_key_file | Without a certificate and key configured, the agent refuses to listen on a non-loopback address |
TLS support for s3proxy was added in agent version 0.2.7. On older agent versions, listen_addr must stay on 127.0.0.1. Use an HTTPS reverse proxy (nginx or HAProxy) in front of the agent for remote access instead. Check your agent version with takakrypt-fos --version before relying on tls_cert_file/tls_key_file.
# check the key that has been configured
sudo grep -E "client_access_key|client_secret_key" /etc/takakrypt/fos/fos-config.yaml
# restart the agent after the change
sudo systemctl restart takakrypt-fos
Two different key pairs
| Client access/secret key | Object storage access/secret key | |
|---|---|---|
| Created by | Admin, via openssl rand | Real AWS IAM or MinIO admin |
| Stored at | fos-config.yaml, s3proxy section | Dashboard, automatically sent to the backend section of fos-config.yaml |
| Used by | Applications / AWS CLI, together with --endpoint-url | TFE Object Storage itself, to connect to the actual object storage |
| Used for | Everyday application access (Step 12) | Only for verifying the encryption result directly against object storage (Step 17), without --endpoint-url |
Check the object storage region setting in the dashboard. It defaults to us-east-1, and the dashboard admin needs to change it to match the real bucket region, or requests fail with AuthorizationHeaderMalformed. This can't be fixed from the server.
4. Agent Registration and Approval
Step 9: Approve the Agent and Add the Bucket in the Dashboard
Path A: the agent registers itself (Agent ID left empty)
- Open Agent > Config, find the agent with status Pending and Type = Object Storage.
- Click the three-dot icon and select Manage, or click the agent name, then click Approve at the top right of the detail page.
- Click Edit, go to the Mount Points section, select the Policy, fill in the bucket data, then click + Add To Table Mount Point. Click Next, review on the Confirmation page, then click Update.
Path B: the agent is created first in the dashboard (Agent ID filled in)
- Open Agent > Config, click Create New.
- General Info: fill in Agent Name (example
Agent-FOS-01), select Account and Access Token, select Agent Mode = Object Storage, fill in Description if needed. Click Next. - Mount Points: click + Add Mount Point, fill in the bucket data and select Policy Name. Click Next.
- Confirmation: review on the Review & Confirm page, click Deploy Agent.
- Copy the Agent ID from the agent detail page.
- Active just means the agent's approved, and it only starts serving applications once at least one bucket is added.
- For TFE Object Storage, the policy only decides whether the bucket is encrypted. User Set and Process Set settings don't apply here, since requests carry no server-user information.
Step 10: Monitor the Registration Process
TFE Object Storage has no enroll command like TFE Local Directory does. Watch the log instead:
sudo journalctl -u takakrypt-fos -f | grep -E "FOS|S3-PROXY"
The bucket is ready when a line like the following appears:
[FOS] Using guard point ... (bucket ..., key ...)
Before a bucket's added, the log just shows DEGRADED, which is normal while you're waiting on approval and bucket configuration.
A line like "guard_point_id ... is not an enabled guard point; using ..." means the agent is using a different bucket or key than what you configured. Go back and recheck the dashboard settings.
5. Checking the Installation Result
Step 11: Check the Installation Result
| Command | Expected result |
|---|---|
sudo systemctl status takakrypt-fos | Status is active (running) |
sudo journalctl -u takakrypt-fos -f | Log entries run without repeated errors |
takakrypt-fos --version | Displays the version number |
sudo takakrypt-fos status | Shows the agent and bucket status |
curl -s 127.0.0.1:9091/metrics | head | Agent monitoring data is displayed. Note that the TFE Object Storage metrics port is 9091, different from TFE Local Directory's port 9090 |
curl -v http://localhost:9000 | Returns 503 or 403. Both are normal, since the request carries no access key |
Bucket status in the dashboard:
| Status | Meaning |
|---|---|
| Healthy | The bucket is active and functioning normally |
| Degraded | Waiting for approval or bucket configuration |
| Error | A problem exists, so check the agent log |
| Disabled | The bucket has been intentionally disabled from the dashboard |
Check the agent detail page too: Type should read Object Storage, Status Active, Connection Status Connected, with Version, Last Heartbeat/Last Sync filled in, and the Mount Point Protection table showing Policy, Protected Path, Health, and Checks for each bucket.
6. Connecting Applications
Step 12: Connect Applications Through TFE Object Storage
Example using the AWS CLI:
export AWS_DEFAULT_REGION=ap-southeast-1
export AWS_ACCESS_KEY_ID="<client-access-key>"
export AWS_SECRET_ACCESS_KEY="<client-secret-key>"
EP=http://localhost:9000
aws --endpoint-url $EP s3 ls
aws --endpoint-url $EP s3 cp file.csv s3://my-bucket/
aws --endpoint-url $EP s3 cp s3://my-bucket/file.csv .
EP must match the listen_addr value in fos-config.yaml:
sudo grep listen_addr /etc/takakrypt/fos/fos-config.yaml
Always include --endpoint-url. Leave it out, and data goes straight to the real object storage, unencrypted, with no warning or error.
- No presigned URL support here. Before migrating, check whether the application relies on a "generate temporary link" feature or browser-direct-upload.
- An unregistered bucket gets rejected with "This proxy serves only the buckets it guards."
7. Local Storage Location (Optional)
Step 13: Allow the Agent to Write to Another Folder
By default, the agent can only write to /var/lib/takakrypt/fos, /etc/takakrypt/fos, /var/log/takakrypt-audit.log, and /var/log/takakrypt-fos.log.
To allow another path, say /data/objects:
sudo systemctl edit takakrypt-fos
[Service]
ReadWritePaths=/data/objects
sudo systemctl daemon-reload
sudo systemctl restart takakrypt-fos
8. TFE Object Storage Verification
Here's how to prove that files stored through TFE Object Storage are genuinely encrypted. It involves two different sets of credentials, so keep them straight.
| Credential | Used in |
|---|---|
| Gateway credentials (Access Token, User Key) | Not used in this verification |
| Client access/secret key | Steps 15–16 |
| Object storage access/secret key | Step 17 only |
Step 14: Prepare a Test File
Make a small text file with an easily recognizable sentence. For example, a file named test-file.txt that contains This sentence must not be readable in object storage.
Step 15: Set the Application Credentials
export AWS_ACCESS_KEY_ID="<client-access-key>"
export AWS_SECRET_ACCESS_KEY="<client-secret-key>"
export AWS_DEFAULT_REGION=ap-southeast-1
env | grep ^AWS_
Step 16: Store and Retrieve the Test File
EP=http://localhost:9000
aws --endpoint-url $EP s3 cp test-file.txt s3://my-bucket/
aws --endpoint-url $EP s3 cp s3://my-bucket/test-file.txt result-file.txt
diff test-file.txt result-file.txt && echo "SAME"
Identical content (SAME) means TFE Object Storage encrypted it going in and decrypted it coming back out, exactly as it should.
| Error | Cause |
|---|---|
| "Unable to locate credentials" | Re-export the credentials in the same terminal session |
503 ... "no client credentials configured" | Step 8 was not completed correctly, or the agent has not been restarted |
| "Could not connect to the endpoint URL" | The agent is not running, or the port is wrong |
| "AuthorizationHeaderMalformed" | Region setting does not match the bucket, see Step 8 |
403 SignatureDoesNotMatch | Recheck the client access/secret key in Step 15 |
403 AccessDenied "No security rule permits this object" | See the troubleshooting guide |
Step 17: Prove the Encryption Directly in Object Storage
Use the real object storage access and secret key (AWS or MinIO), written inline, and don't export them:
AWS_ACCESS_KEY_ID="<access-key-object-storage>" \
AWS_SECRET_ACCESS_KEY="<secret-key-object-storage>" \
aws s3 cp s3://my-bucket/test-file.txt raw-file.txt
# add --endpoint-url for MinIO; omit it for real AWS S3
cat raw-file.txt
grep -c "This sentence must not be readable in object storage." raw-file.txt
cat raw-file.txt should show random characters, not the original sentence, and grep -c should come back 0.
Don't export the real object storage key. If you later forget --endpoint-url in some other command, data could get written unencrypted straight to object storage.
If the original sentence is still readable, encryption has failed. Stop immediately, report it to the TAKAKRYPT team, and don't run the agent in production until it's resolved.
Step 18: Alternative Manual Verification
Prefer not to use the CLI? Download the file directly from the AWS or MinIO web console and open it in a text editor. It should show the same random characters.
That's the install done. Next up: the full fos-config.yaml reference in Agent Configuration, or Upgrading and Uninstalling for what comes after.