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
- Cockpit
- nctl
You can create users under the Bucket Users tab in Cockpit.
Update Users
- Cockpit
- nctl
You can update users under the Bucket Users tab in Cockpit.
-
Examples:
Reset credentials:
nctl update bucketuser <name> --reset-credentials
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.
- Cockpit
- nctl
You can delete users under the Bucket Users tab in Cockpit.
-
Example:
nctl delete bucketuser <name>
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.
- Cockpit
- nctl
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.
- Cockpit
- nctl
Permissions can be managed under the Bucket tab by selecting a bucket and configuring user access.
The --permissions flag can be repeated and values are merged deterministically with duplicates automatically removed. Keys are separated with ; and multiple values with ,.
-
Examples when creating a bucket:
# Multiple flags with one permission each (merged deterministically, duplicates deduped)# Result: reader=frontend,analytics,john; writer=ingestnctl create bucket my-bucket --permissions reader=frontend,analytics \--permissions writer=ingest \--permissions reader=john# Multiple permissions in one flagnctl create bucket my-bucket --permissions reader=frontend,analytics;writer=ingest;reader=john -
Examples when updating an existing bucket:
# Add more readersnctl update bucket my-bucket \--permissions reader=frontend,analytics;writer=ingest;reader=john \--permissions reader=guest1,guest2# Remove specific roles/usersnctl update bucket my-bucket \--delete-permissions reader=john;writer=ingest
Lifecycle Policies
Lifecycle policies allow you to set automatic expiration and retention rules for objects inside a bucket based on prefixes.
Lifecycle policies can be managed via nctl or the API. They are currently not configurable in the Cockpit.
- nctl
Each --lifecycle-policy flag creates its own separate policy. Key-value pairs within a policy are separated by ;.
-
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 -
Updating or removing lifecycle policies on an existing bucket:
# Remove a specific policy by exact definitionnctl 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 runnctl 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.
- nctl
The --cors flag can be repeated and entries are merged deterministically. Key-value pairs are separated with ; and multiple values with ,.
-
Creating a bucket with CORS configuration:
# Single flagnctl 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 -
Updating or deleting CORS configuration on an existing bucket:
# Update CORS configurationnctl 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.
- nctl
-
Updating custom hostnames:
# Remove one hostnamenctl update bucket my-bucket \--delete-custom-hostnames assets.example.com# Clear all hostnames and set a new one in a single runnctl 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.
- Cockpit
- nctl
Bucket details are available under the Bucket tab.
-
Use
getto inspect a bucket's configuration and status. By default, it prints a summary (name, location, tier, public flags, versioning, etc.). You can also display specific details with the--print-*flags:nctl get bucket <name> [flags] -
For a full description of available flags and options, run:
nctl get bucket --help
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.