How to Use Linode Object Storage

Updated , by Linode

Traducciones al Español
Estamos traduciendo nuestros guías y tutoriales al Español. Es posible que usted esté viendo una traducción generada automáticamente. Estamos trabajando con traductores profesionales para verificar las traducciones de nuestro sitio web. Este proyecto es un trabajo en curso.
Note
Linode Object Storage is now available to the general public in the Newark, Frankfurt, and Singapore data centers! For billing information on Object Storage, see our Object Storage Pricing and Limitations guide.
Caution
Object Storage is similar to a subscription service. Once enabled, you will be billed at the flat rate regardless of whether or not there are active buckets on your account. You must Cancel Object Storage to stop billing for this service.

Linode’s Object Storage is a globally-available, S3-compatible method for storing and accessing data. Object Storage differs from traditional hierarchical data storage (as in a Linode’s disk) and Block Storage Volumes. Under Object Storage, files (also called objects) are stored in flat data structures (referred to as buckets) alongside their own rich metadata.

Additionally, Object Storage does not require the use of a Linode. Instead, Object Storage gives each object a unique URL with which you can access the data. An object can be publicly accessible, or you can set it to be private and only visible to you. This makes Object Storage great for sharing and storing unstructured data like images, documents, archives, streaming media assets, and file backups, and the amount of data you store can range from small collections of files up to massive libraries of information. Lastly, Linode Object Storage has the built-in ability to host a static site.

In this guide you learn about:

Enabling Object Storage

Object Storage is not enabled for a Linode account by default. All that is required to enable Object Storage is to create a bucket or an Object Storage access key. To cancel Object Storage, see the Cancel Object Storage how-to.

Note
Billing for Object Storage starts when it is enabled on the account, regardless of how it is enabled. For example, if you enable the service by creating an access key, but you have not yet created a bucket, the $5 monthly flat rate (prorated) for Object Storage is charged for the account. Cancelling Object Storage stops billing for it.

Access Keys

The first step towards using Object Storage is to create a pair of keys for the service. This pair is composed of an access key and a secret key:

  • The access key allows you to access any objects that you set to have private read permissions.

    Note
    To use the access key when viewing a private object, you first need to generate a signed URL for the object. The signed URL is much like the standard URL for the object, but some extra URL parameters are appended to it, including the access key. Instructions for generating a signed URL can be found for s3cmd and the Linode CLI, outlined in this guide.
  • The secret key is used together with the access key to authenticate the various Object Storage tools with the Linode account. You should not share the secret key.

    Note
    Each Object Storage key pair on the Linode account has complete access to all of the buckets on the account.

Generating an Access Key

Limiting Access through Access Keys

By default, an Access Key is unrestricted and has full access to all Buckets on an account. When creating an Access Key, you can enable Limited Access and set more granular permissions for each Bucket. These permissions include None, Read, and Read/Write:

  • None: Restricts all access to the specified Bucket. This Access Key will still be able to view the Bucket in the list of all Buckets, but will otherwise be unable to access any objects stored within it.

  • Read (read_only): Access keys with Read permissions are able to list and retrieve most information about the specified Bucket and objects stored in that Bucket. Technically, read permissions provide access to the following s3 actions (which are used by all s3-compatible clients and tools):

    GetBucketAcl, GetBucketCORS, GetBucketLocation, GetBucketLogging, GetBucketNotification, GetBucketPolicy, GetBucketTagging, GetBucketVersioning, GetBucketWebsite, GetLifecycleConfiguration, GetObjectAcl, GetObject, GetObjectTorrent, GetReplicationConfiguration, GetObjectVersionAcl, GetObjectVersion, GetObjectVersionTorrent, ListBucketMultipartUploads, ListBucket, ListBucketVersions, ListMultipartUploadParts

  • Read/Write (read_write): Access keys with Read/Write permissions can list, retrieve, add, delete, and modify most information and objects stored within the specified Bucket. Technically, read/write permissions provide access to all of the same s3 actions as read permissions, as well as the following:

    AbortMultipartUpload, DeleteBucketWebsite, DeleteObject, DeleteObjectVersion, DeleteReplicationConfiguration, PutBucketCORS, PutBucketLogging, PutBucketNotification, PutBucketTagging, PutBucketVersioning, PutBucketWebsite, PutLifecycleConfiguration, PutObject, PutObjectAcl, PutObjectVersionAcl, PutReplicationConfiguration, RestoreObject

A full list of s3 actions is available on Amazon’s S3 API Reference documentation.

Control Access with ACLs and Bucket Policies

Linode Object Storage allows users to share access to objects and buckets with other Object Storage users. There are two mechanisms for setting up sharing: Access Control Lists (ACLs), and bucket policies. These mechanisms perform similar functions: both can be used to restrict and grant access to Object Storage resources. Learn more about ACLs and bucket policies.

Bucket Names

Bucket names, also referred to as labels, need to be unique within the same cluster, including buckets on other users' Linode accounts. This also means if you reserve a bucket name in one cluster, it is not automatically reserved in another. For example, if you have my-bucket.us-east-1.linode.com and want my-bucket.eu-central-1.linode.com you must manually reserve them both. They are separate clusters and not guaranteed. If the label you enter is already in use, then choose a different label. Additionally, bucket labels have the following rules:

  • Cannot be formatted as IP addresses.
  • Must be between 3 and 63 characters in length.
  • Can only contain lower-case characters, numbers, periods, and dashes.
  • Must start with a lowercase letter or number.
  • Cannot contain underscores (_), end with a dash (-) or period (.), have consecutive periods (.), or use dashes (-) adjacent to periods (.).
Note
A cluster is defined as all buckets hosted by a unique URL; for example: us-east-1.linodeobjects.com, ap-south-1.linodeobjects.com, or eu-central-1.linodeobjects.com.

Object Storage TLS/SSL Certificates

Object storage supports the importing of custom TLS/SSL Certificates in order to encrypt connections with your bucket in transit. Currently, you can Upload, View, or Delete TLS/SSL certificates using the following API Endpoints:

Like all API endpoints, TLS/SSL certificates can additionally be added using the Linode CLI.

For more information on Object Storage Certificates, including configuration options in the Linode Manager, see our Guide for Custom Object Storage Certificates

Object Storage Tools

There are a number of tools that are available to help manage Linode Object Storage. This guide explains how to install and use the following options:

  • The Linode Cloud Manager can be used to create buckets, and upload and delete objects, as well as create access keys for use with the S3 compatible clients.

  • The Linode CLI has an Object Storage plugin and can be used to create and remove buckets, add and remove objects, and convert a bucket into a static site from the command line.

  • s3cmd is a powerful command line utility that can be used with any S3-compatible object storage service, including Linode’s. s3cmd can be used to create and remove buckets, add and remove objects, convert a bucket into a static site from the command line, plus other functions like syncing entire directories up to a bucket.

  • Cyberduck is a graphical utility available for Windows and macOS and is a great option if you prefer a GUI tool.

Cloud Manager

Create a Bucket

The Cloud Manager provides a web interface for creating buckets. To create a bucket:

  1. If you have not already, log into the Linode Cloud Manager.

  2. Click the Object Storage link in the sidebar, and then click Add a Bucket.

    The Object Storage menu

    If you have not created an access key or a bucket before, you are prompted to enable Object Storage.

  3. The Create a Bucket menu appears.

    The Create a Bucket menu

  4. Add a label for the bucket. See the Bucket Name section for rules on naming the bucket.

  5. Choose a cluster location for the bucket to reside in.

    Note
    A cluster is defined as all buckets hosted by a unique URL; for example: us-east-1.linodeobjects.com, ap-south-1.linodeobjects.com, or eu-central-1.linodeobjects.com.
  6. Click Submit. You are now ready to upload objects to the bucket.

Upload Objects to a Bucket

Follow these steps to upload objects to a bucket using the Cloud Manager:

  1. If you have not already, log into the Linode Cloud Manager.

  2. Click the Object Storage link in the sidebar. A list of all the buckets appears. Click the bucket where you want to upload the objects.

    Select an Object Storage Bucket

  3. The bucket’s Objects Listing Page appears. In the example, the my-example-bucket does not yet contain any objects. You can use the Upload Files Pane to drag and drop a file from the local computer to the object storage bucket.

    Note
    You can drag and drop multiple files to the Upload Files Pane at one time.

    Drag and drop an object to the bucket

    You can also click the Browse Files button to bring up the local computer’s file browser and select a file to upload to the bucket.

    Upload an object to the bucket using the file browser

  4. When the upload has completed, the object appears in the Objects Listing Page.

    Successful upload of the object

    Note

    Individual object uploads are limited to a size of 5GB each, though larger object uploads can be facilitated with multipart uploads. s3cmd and Cyberduck do this for you automatically if a file exceeds this limit as part of the uploading process.

    Object file names additionally cannot contain the following special characters when using Cloud Manager or the Linode CLI:

    " ' < > & + =

View Bucket Objects

Follow these steps to view your objects from the Cloud Manager:

  1. If you have not already, log into the Linode Cloud Manager.

  2. Click the Object Storage link in the sidebar. A list of all the buckets appears. Click the bucket whose objects you’d like to view.

    Select an Object Storage Bucket

  3. The bucket’s Objects Listing Page appears, which displays all the objects in the bucket.

    View all of the bucket&rsquo;s objects

  4. Click the ellipsis menu corresponding to the object you’d like to view. Then, select Download.

    Download a bucket&rsquo;s object

  5. The object is downloaded to the local computer.

Delete Objects from a Bucket

Follow these steps to delete objects in a bucket from the Cloud Manager:

  1. If you have not already, log into the Linode Cloud Manager.

  2. Click the Object Storage link in the sidebar. A list of all the buckets appears. Click the bucket whose objects you’d like to delete.

    Select an Object Storage Bucket

  3. The bucket’s Objects Listing Page appears, which displays all the objects in the bucket.

    View all of the bucket&rsquo;s objects

  4. Click the ellipsis menu corresponding to the object you’d like to delete. Then, select Delete.

    Delete an object from the bucket

  5. A dialog box appears prompting you to confirm if you’d like to delete the object. Click Delete to proceed. After the object has been deleted, it is no longer be visible on the Objects Listing Page.

Delete a Bucket

Follow these steps to delete an Object Storage bucket from the Cloud Manager:

Note
You can only delete an empty Object Storage bucket. See the Delete Objects from a Bucket how-to for information on deleting a bucket’s objects using the Cloud Manager.
  1. If you have not already, log into the Linode Cloud Manager.

  2. Click the Object Storage link in the sidebar. A list of all the buckets appears.

  3. Click the ellipsis menu corresponding to the bucket you’d like to delete. Then, select Delete.

    Delete an Object Storage bucket

  4. A dialog box appears that prompts you to enter the bucket’s name as a way to confirm that you’d like to delete the bucket. Type the bucket’s name into the text entry field and click Delete.

    Confirm deleting the Object Storage bucket

    After the bucket has been deleted, it is no longer be visible on the Buckets Listing Page.

Cancel Object Storage

Follow these steps to cancel the Object Storage service from the Cloud Manager:

  1. To cancel Object Storage, you must first delete all the buckets. To delete a bucket, the bucket must be empty. For buckets that contain large amounts of objects, consider employing lifecycle policies to delete the objects.

    Caution
    If you have removed all of the buckets, but you have not also cancelled the Object Storage service, the account is billed at a flat rate of $5 per month (prorated) for the service. Make sure that you complete each step of this section to fully cancel the Object Storage service and to stop billing for it. For more information, see our Pricing and Limitations guide.
  2. After you’ve deleted all the buckets, navigate to the Account page in the left-hand navigation. Click the Settings tab. In the menu, you should see a setting for Object Storage:

    Cancel Object Storage

  3. Click Cancel Object Storage. A prompt appears asking you to confirm the cancellation. If you still have active buckets, you are prompted to delete them.

Next Steps

There are S3 bindings available for a number of programming languages, including the popular Boto library for Python, that allow you to interact with Object Storage programmatically.

More Information

You may wish to consult the following resources for additional information on this topic. While these are provided in the hope that they will be useful, please note that we cannot vouch for the accuracy or timeliness of externally hosted materials.

This page was originally published on

Try this guide to receive $100 at signup on a new account.

Your Feedback Is Important

Let us know if this guide made it easy to get the answer you needed.