Config custom domain with Linode object storage
2 min read
You can use your own domain for your Linode object storage:
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
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:
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.