kvbox.cloud
Guides

Object storage

S3 buckets for your files. Make a bucket, make a key, point any S3 client at it.

Object storage keeps files: uploads, images, exports, backups your app makes. It speaks the S3 protocol, so the AWS CLI, every AWS SDK and tools like rclone work with it.

You make buckets and, for each bucket, access keys. kvbox runs the storage behind them: there is no server to look after, and it never shows in kvbox ls.

kvbox bucket create uploads              # your first bucket also makes your object storage (about a minute)
kvbox bucket key create uploads          # an access key and its secret, shown once
kvbox bucket ls                          # your buckets, the address, the room and the price
kvbox bucket info uploads                # what the bucket holds, how full the storage is

One storage, many buckets

Your account has one object storage, shared by all its buckets. It is made with your first bucket and removed with your last. It has:

  • an address: usually https://s3-<account>.kvbox.app (your username, or the org's slug), the same for every bucket. An account whose name has a . or _, or whose address was taken, gets one with a random part: always use the endpoint kvbox bucket ls or kvbox bucket info prints;
  • a region: kvbox's own, such as de-center-1 or ro-west-1. It is where the storage lives and the name every S3 client signs with. Pick it at your first bucket (--region ro-west-1; without it, any region), and it stays for good. It is not a location: --location eu on your first bucket, or your default location, is what keeps the storage in a country or region. kvbox bucket info prints it;
  • a size: 10 GB unless you say otherwise at your first bucket (--size 50). All buckets share it.

A bucket name is 3 to 63 lowercase letters, digits and -. It only has to be unique among your own buckets.

Connect a client

kvbox bucket key create prints what a client needs:

endpoint    https://s3-you.kvbox.app
region      de-center-1
bucket      uploads
access key  GK31c2f218a2e44f485b94239e
secret key  b892c0665f0ada8a4755dae98baa3b133590e11dae3bcc1f9d769d67f16c3835

The secret key is shown only then. Lose it and you make a new key.

Use your storage's own region in every client: a request signed for another region is refused.

Clients must use path-style addressing: the bucket goes in the path (https://s3-you.kvbox.app/uploads/photo.jpg), not in the host name. Most clients need to be told.

With the AWS CLI:

export AWS_ACCESS_KEY_ID=GK31c2f218a2e44f485b94239e
export AWS_SECRET_ACCESS_KEY=b892c066…
export AWS_DEFAULT_REGION=de-center-1
aws configure set default.s3.addressing_style path

aws s3 cp photo.jpg s3://uploads/ --endpoint-url https://s3-you.kvbox.app
aws s3 ls s3://uploads --endpoint-url https://s3-you.kvbox.app

In Node, with the AWS SDK:

import { S3Client, PutObjectCommand } from "@aws-sdk/client-s3";

const s3 = new S3Client({
  endpoint: "https://s3-you.kvbox.app",
  region: "de-center-1",
  forcePathStyle: true,
  credentials: { accessKeyId: process.env.S3_KEY, secretAccessKey: process.env.S3_SECRET },
});
await s3.send(new PutObjectCommand({ Bucket: "uploads", Key: "photo.jpg", Body: file }));

In Python, with boto3: boto3.client("s3", endpoint_url="https://s3-you.kvbox.app", region_name="de-center-1", config=Config(s3={"addressing_style": "path"})).

An app running in a box uses the same address. Give it the keys as variables (kvbox env set S3_KEY … --secret).

For large files use multipart uploads. The AWS CLI and the SDKs' upload helpers do that by themselves.

Keys

A key opens one bucket and nothing else.

kvbox bucket key create uploads --name web          # reads and writes
kvbox bucket key create uploads --read-only         # reads only
kvbox bucket key ls uploads                         # the keys, never their secrets
kvbox bucket key rm uploads GK31c2f218a2e44f485b94239e

Removing a key stops whatever uses it at once. Make one key per app, so you can remove one without touching the others.

Everything in a bucket is private, unless you make the bucket public: a request without a key is refused.

Public buckets

For files anyone may read, like the images of a website, make their bucket public. Every file in it then has a permanent HTTPS address, with no key and no signature:

kvbox bucket create assets
kvbox bucket public assets on            # https://assets-<account>.kvbox.app
aws s3 cp logo.png s3://assets/img/logo.png --endpoint-url …
curl https://assets-<account>.kvbox.app/img/logo.png

The address is <bucket>-<account>.kvbox.app, or one with a few random characters when that is taken; --sub <name> picks your own (kvbox bucket public assets on --sub cdn-acme), and running it again with another name moves it. kvbox bucket info shows it.

  • A file is served with the type it was uploaded with (Content-Type), so set it when you upload (S3 clients and aws s3 cp do).
  • Browsers and caches keep a file for an hour (Cache-Control: public, max-age=3600), then check it again; a file you replace under the same name can show its old version for up to that long. A file uploaded with its own Cache-Control keeps it.
  • Files are read, never listed: https://…/ shows index.html if the bucket has one, so a public bucket also serves a static site.
  • Pages on other sites may load the files, from <img> and from fetch (any origin may GET).
  • Writing still takes a key.
  • Public is the whole bucket: keep public files in a bucket of their own, beside your private ones. For one private file, a share link (below) lasts up to 7 days.

kvbox bucket public assets off makes it private again and frees the address at once. An account has at most 10 public buckets. A storage made before public buckets existed needs its newer version first: the command says so.

Files in the web app

A bucket's page in the web app has a Files tab: browse folders, upload files and folders (drop them on the page, or use Upload), download, make folders, delete, and rename or move a file. Uploads go straight from your browser to your storage, so keep the page open until they finish.

Share link makes a link that downloads one file with no key and no account, for an hour up to 7 days. It cannot be taken back before it expires, short of deleting the file.

A folder is what S3 clients show for names that share a start, like invoices/2026/; a new empty folder is an empty object of that name. Renaming or moving a file is a copy and a delete, for files up to 5 GB, and folders are moved with an S3 client (aws s3 mv --recursive). The app uploads files up to 50 GB; use a client for bigger ones. A deleted file is gone: there is no trash and no earlier version.

Org members can browse and download in every bucket of the org. Uploading, deleting and renaming are for whoever created the bucket and for the org's admins.

More room

kvbox bucket grow 50                     # your object storage, to 50 GB

The size is your storage's, not a bucket's, and it only grows. Growing restarts the storage once: a few seconds during which requests fail. kvbox bucket info <bucket> shows what is used and warns when the storage is nearly full. A full storage refuses uploads; reads keep working.

Delete

kvbox bucket rm uploads                  # asks first; the bucket must be empty
kvbox bucket rm uploads --force          # your last bucket only: with everything in it

A bucket is removed empty: delete its objects first (aws s3 rm s3://uploads --recursive --endpoint-url …). Its keys go with it.

Removing your last bucket removes the object storage too, and its cost stops. Only that last bucket can be removed with what it still holds, with --force.

Backups

kvbox bucket backup create               # back up your whole object storage; it runs in the background (--wait stays)
kvbox bucket backup ls                   # its backups, newest first, with the buckets each one holds
kvbox bucket backup restore <id>         # every bucket and key goes back to the backup's; asks first
kvbox bucket backup rm <id>              # delete a backup for good; asks first
kvbox bucket backup schedule --on        # back it up every night (--at <hour> UTC, --off; alone: shows when)

A backup is your whole object storage at one instant: every bucket with what it holds, and every access key. It is taken while the storage runs, encrypted and kept off its host: the same backups as a volume's. --org <slug> backs up an org's storage. The storage can take 2 backups in any 24 hours, and each is kept 30 days. While a backup runs, access keys cannot be made or deleted and buckets cannot be deleted: try again once kvbox bucket backup ls shows it done.

restore puts the whole storage back as it was then, and restarts it (a minute or so during which requests fail). Its address and region stay. What it means for each bucket and key:

  • A bucket that exists now and then holds exactly what it held then: files uploaded since are gone, files deleted since are back.
  • A bucket made since the backup is removed, with everything in it.
  • A bucket removed since the backup comes back with what it held then, without keys: make new ones.
  • An access key made since the backup stops working, and is no longer listed. Make a new one and give it to your app.
  • An access key removed since the backup stays removed: a restore never brings a key back to life.

kvbox bucket backup schedule --on backs the storage up on its own every night, at an hour picked for it between 00:00 and 05:00 UTC (--at 3 for 03:00 UTC, --off to stop). It is off until you turn it on, costs $0.10 a night once the backup is ready, and is outside the 2 a day you may take yourself: see nightly backups.

The restore prints which buckets and keys each of these were (--json for a script). A restore only goes into the storage the backup was taken of: once your last bucket is removed, its backups can no longer be restored, not even into a new storage. They are still listed by kvbox bucket backup ls until they expire, and kvbox bucket backup rm deletes them sooner.

Price

$6 a month for your object storage, with 10 GB included, and $0.06 a month for each further GB of its size. It is charged by the hour for as long as the storage exists, whatever it holds: one bucket or twenty, empty or full. kvbox bucket ls prints the estimate for yours, and kvbox usage shows it on a line of its own.

When your credit runs out the storage is put to sleep with the rest of your account: requests fail and the files stay. It answers again once you top up.

Orgs

Buckets belong to you or to an org, like a box: --org <slug> on any command. An org has its own storage, its own address and its own bill. Members see an org's buckets and their keys' names; making keys for a bucket, or deleting it, is for whoever created the bucket and for the org's admins.

Not yet

A backup cannot be put into a new storage after your last bucket is removed. One bucket cannot be restored alone: a restore is always the whole storage. A public bucket has no custom domain yet. A bucket has no CORS settings of your own, so a page of yours cannot upload to it directly from a browser: send uploads through your app. There are no lifecycle rules and no versioning.

On this page