0xBF
0xBF

0xBF

Config custom domain with Linode object storage

0xBF's photo
0xBF

Published on Jul 23, 2021

2 min read

You can use your own domain for your Linode object storage:

Step 1

Create a bucket, make sure your label is the same as the domain you are going to bind. For example, if you want to access your files under s3.example.org, then in the label, you should put s3.example.org.

Screen Shot 2021-07-23 at 16.01.59.png

Step 2

Now you have your bucket, now you just need to put your own domain's SSL certificate. Click your bucket, then go to the "SSL/TLS" tab:

Screen Shot 2021-07-23 at 16.03.37.png

Then copy your cert and key file's content into those 2 boxes.

If you don't have SSL cert yet, you can use the acme.sh tool to generate one. Once generated, you can put the fullchain.cer content into the "Certificate" field, and put the s3.example.org.key content into the "Private Key" field.

Now you are all set, upload some file, your file url by default will be under linode's domain, like "s3.example.org.us-east-1.linodeobjects.com/.." . The page may show "Your connection is not private", because Linode only SSL cert for *.us-east-1.linodeobjects.com, but not sub sub domain.

So 2 ways to access your file:

  • Change the protocol to http:// to view the file, or
  • View the file under your own domain, like "s3.example.org/test.jpg"

How to auto renew cert

Since the cert you put usually have an expire date, if you want to auto renew the cert, you could use acme.sh + Linode Object Storage API, for example, every time when acme.sh finished a renewal, you could call Linode's API to auto delete the current one then upload the new one.

Reference

 
Share this