Skip to content
T4

clients

S3 clients

S3 clients

Endpoint: https://t4.dalang.io — path-style, any region.

aws-cli

export AWS_ACCESS_KEY_ID=T4…
export AWS_SECRET_ACCESS_KEY=…
export AWS_DEFAULT_REGION=id-jkt-1
EP=https://t4.dalang.io

aws --endpoint-url $EP s3api create-bucket --bucket assets
aws --endpoint-url $EP s3 cp ./data.tar s3://assets/backup/data.tar
aws --endpoint-url $EP s3 ls s3://assets/backup/
aws --endpoint-url $EP s3api head-object --bucket assets --key backup/data.tar
aws --endpoint-url $EP s3 presign s3://assets/backup/data.tar --expires-in 3600

boto3

import boto3
from botocore.config import Config

s3 = boto3.client(
    "s3",
    endpoint_url="https://t4.dalang.io",
    aws_access_key_id="T4…",
    aws_secret_access_key="…",
    region_name="id-jkt-1",
    config=Config(s3={"addressing_style": "path"}, signature_version="s3v4"),
)

s3.upload_file("data.tar", "assets", "backup/data.tar")
url = s3.generate_presigned_url(
    "get_object",
    Params={"Bucket": "assets", "Key": "backup/data.tar"},
    ExpiresIn=3600,
)
print(url)

rclone

~/.config/rclone/rclone.conf:

[t4]
type = s3
provider = Other
access_key_id = T4…
secret_access_key = …
endpoint = https://t4.dalang.io
force_path_style = true
region = id-jkt-1
rclone lsd t4:
rclone copy ./reports t4:assets/reports --progress
rclone link t4:assets/reports/index.pdf --expire 1h

restic

export RESTIC_REPOSITORY=s3:https://t4.dalang.io/assets/restic
export RESTIC_PASSWORD=…
export AWS_ACCESS_KEY_ID=T4…
export AWS_SECRET_ACCESS_KEY=…
restic init
restic backup ~/Documents

Notes

  • An API key works for every bucket in your account; revoke it from API keys

if it leaks.

  • A positive credit balance is required before creating a key or uploading; the

account quota is 50 GB.

  • Recent AWS CLI versions use aws-chunked bodies; T4 decodes that framing.
  • If a client signs for another region (e.g. us-east-1), the signature is still

accepted; region does not affect where data is stored.