Quickstart

Object storage (S3)

Unio Cloud object storage speaks the S3 API, so every S3 client you already use works, point it at our European endpoint and go. Data stays in the EU, there are no request fees, and the first 100 GB are free.

1. Get your credentials

In the console under Billing & credentials, click Create S3 credentials. You get an access key, a secret key, and an included bucket. Create more buckets under Object Storage , you can also browse, upload and download objects right there in the browser.

Endpoint
https://s3.fs1.uniocloud.eu
Region
fs1

2. aws CLI

aws CLI v2
# ~/.aws/credentials
[unio]
aws_access_key_id = GK...your-access-key
aws_secret_access_key = ...your-secret-key

# ~/.aws/config
[profile unio]
region = fs1

# then, with --endpoint-url on every call:
aws s3 ls --profile unio --endpoint-url https://s3.fs1.uniocloud.eu
aws s3 cp backup.tar.gz s3://my-bucket/ --profile unio --endpoint-url https://s3.fs1.uniocloud.eu
aws s3 sync ./site s3://my-bucket/site --profile unio --endpoint-url https://s3.fs1.uniocloud.eu
aws s3 rm s3://my-bucket/old.log --profile unio --endpoint-url https://s3.fs1.uniocloud.eu
# tired of typing --endpoint-url? alias it:
alias unio-s3='aws --profile unio --endpoint-url https://s3.fs1.uniocloud.eu'
unio-s3 s3 ls s3://my-bucket/

3. Python (boto3)

boto3
import boto3

s3 = boto3.client(
    "s3",
    endpoint_url="https://s3.fs1.uniocloud.eu",
    region_name="fs1",
    aws_access_key_id="GK...",
    aws_secret_access_key="...",
)

s3.upload_file("backup.tar.gz", "my-bucket", "backups/backup.tar.gz")

for obj in s3.list_objects_v2(Bucket="my-bucket").get("Contents", []):
    print(obj["Key"], obj["Size"])

# presigned URL, valid for one hour
url = s3.generate_presigned_url(
    "get_object",
    Params={"Bucket": "my-bucket", "Key": "backups/backup.tar.gz"},
    ExpiresIn=3600,
)

4. rclone

The fastest way to sync directories, and it can mount a bucket as a filesystem.

rclone
# ~/.config/rclone/rclone.conf
[unio]
type = s3
provider = Other
access_key_id = GK...
secret_access_key = ...
endpoint = https://s3.fs1.uniocloud.eu
region = fs1

# then:
rclone ls unio:my-bucket
rclone sync ./photos unio:my-bucket/photos --progress
rclone mount unio:my-bucket /mnt/unio --daemon   # FUSE mount

5. s3cmd

s3cmd
# ~/.s3cfg
[default]
access_key = GK...
secret_key = ...
host_base = s3.fs1.uniocloud.eu
host_bucket = s3.fs1.uniocloud.eu/%(bucket)
use_https = True

s3cmd ls s3://my-bucket
s3cmd put backup.tar.gz s3://my-bucket/

6. Terraform

The AWS provider works against our endpoint with credential/region validation turned off and path-style addressing on.

Terraform
provider "aws" {
  region                      = "fs1"
  access_key                  = var.unio_access_key
  secret_key                  = var.unio_secret_key
  skip_credentials_validation = true
  skip_requesting_account_id  = true
  skip_region_validation      = true

  endpoints {
    s3 = "https://s3.fs1.uniocloud.eu"
  }
  s3_use_path_style = true
}

resource "aws_s3_object" "artifact" {
  bucket = "my-bucket"
  key    = "releases/app-1.0.0.tar.gz"
  source = "dist/app-1.0.0.tar.gz"
}

7. Backups with restic

restic backs up straight to S3, encrypted, deduplicated, and it is what we use for our own platform backups.

restic
export AWS_ACCESS_KEY_ID=GK...
export AWS_SECRET_ACCESS_KEY=...

restic -r s3:https://s3.fs1.uniocloud.eu/my-bucket/restic init
restic -r s3:https://s3.fs1.uniocloud.eu/my-bucket/restic backup /var/www
restic -r s3:https://s3.fs1.uniocloud.eu/my-bucket/restic snapshots

Good to know

Ready?

Create your credentials in the console and copy a snippet above, you can be storing objects in about a minute.

Open the console