Skip to main content

Manage buckets and users

Our customer interface Cockpit allows you to create and manage our "Object Storage" product in a self service fashion.

All locations are physically located in Switzerland — see Datacenter Locations for details.

Manage Users

Users can be managed via the Cockpit, nctl, or the API.
A user can only be granted access to buckets that are created in the same Location.

Create Users

You can create users under the Bucket Users tab in Cockpit.

Update Users

You can update users under the Bucket Users tab in Cockpit.

Delete Users

You can delete users via the Cockpit or using nctl.
Please note that users who still have access to buckets may need to be removed from those first.

You can delete users under the Bucket Users tab in Cockpit.

Manage Buckets

Create Buckets

Buckets can be managed via the Cockpit, nctl, or the API. When creating a bucket, you must always provide a unique name and a location.

The following settings are optional:

  • Versioning: The files are stored versioned. This takes up more storage space, but protects the data from being overwritten.
  • Public readable: The bucket's data can be accessed or downloaded without authentication.
  • Public list: A list of the files in the bucket can be retrieved using the specified public URL. The option requires that "Public readable" has been enabled.
  • Location: Defines the location of the data.

All options, except for "Location", can be adjusted later as needed.

You create buckets under the Bucket tab.

Bucket Permissions

After creating a bucket, you can specify which users should have access to the bucket. Users can be granted read (reader) access or write (writer) access. Only users from the same "Location" where the bucket was created can be selected.

Permissions can be managed under the Bucket tab by selecting a bucket and configuring user access.

Lifecycle Policies

Lifecycle policies allow you to set automatic expiration and retention rules for objects inside a bucket based on prefixes.

note

Lifecycle policies can be managed via nctl or the API. They are currently not configurable in the Cockpit.

note

Each --lifecycle-policy flag creates its own separate policy. Key-value pairs within a policy are separated by ;.

  1. Creating a bucket with lifecycle policies:

    # Single policy (e.g. for `logs/`)
    nctl create bucket my-bucket --lifecycle-policy prefix=logs/;expire-after-days=7;is-live=true

    # Multiple policies (repeat the flag)
    nctl create bucket my-bucket --lifecycle-policy prefix=tmp/;expire-after=72h;is-live=true \
    --lifecycle-policy prefix=archive/;expire-after-days=365;is-live=false
  2. Updating or removing lifecycle policies on an existing bucket:

    # Remove a specific policy by exact definition
    nctl update bucket my-bucket \
    --delete-lifecycle-policy prefix=tmp/;expire-after=72h;is-live=true

    # Clear all policies, then add two fresh ones in a single run
    nctl update bucket my-bucket \
    --clear-lifecycle-policies \
    --lifecycle-policy prefix=logs/;expire-after-days=7;is-live=true \
    --lifecycle-policy prefix=archive/;expire-after-days=365;is-live=false

CORS Configuration

Cross-Origin Resource Sharing (CORS) defines how web applications running at one origin can interact with resources in your bucket.

note

The --cors flag can be repeated and entries are merged deterministically. Key-value pairs are separated with ; and multiple values with ,.

  1. Creating a bucket with CORS configuration:

    # Single flag
    nctl create bucket my-bucket --cors origins=https://example.com,https://app.example.com;response-headers=X-My-Header,ETag;max-age=3600

    # Multiple flags (merged deterministically)
    nctl create bucket my-bucket --cors origins=https://example.com;response-headers=ETag \
    --cors origins=https://app.example.com;response-headers=X-My-Header \
    --cors max-age=3600
  2. Updating or deleting CORS configuration on an existing bucket:

    # Update CORS configuration
    nctl update bucket my-bucket \
    --cors origins=https://example.com;response-headers=ETag \
    --cors origins=https://app.example.com;response-headers=X-My-Header \
    --cors max-age=3600

    # Delete specific CORS entries (by key/value)
    nctl update bucket my-bucket \
    --delete-cors origins=https://app.example.com;response-headers=ETag

Custom Hostnames

You can attach or manage custom domain names for your bucket.

  1. Updating custom hostnames:

    # Remove one hostname
    nctl update bucket my-bucket \
    --delete-custom-hostnames assets.example.com

    # Clear all hostnames and set a new one in a single run
    nctl update bucket my-bucket \
    --clear-custom-hostnames \
    --custom-hostnames media.example.com

Getting Bucket Details

A bucket's configuration can be checked anytime through the Cockpit, nctl, or the API.

Bucket details are available under the Bucket tab.

Accessing Buckets

Buckets can be accessed via the S3-compatible API or via HTTP. Various open source tools and framework integrations are available for this purpose.