Contabo Object Storage

Contabo Object Storage is S3 compatible and a good choice if you have a lot of viewers and a small budget, because there are no data transfer fees. You only have to pay for the storage capacity, starting at $2.49/month for 250 GB. Outbound traffic is routed through Cloudflare CDN. The data center is located in EU-Central. Other locations will be available soon.

Create a Bucket

  1. Go to Object Storage (Buckets)
  2. Click “Create Bucket”
  3. Enter a bucket name and confirm with “Create Bucket”
  4. On the “Quick Action” column click the share button and enable the “Make public” option

After that it should look like this:

Configure Owncast

Navigate to the “S3 Storage” page.

  • Endpoint:
    See Bucket URL column without path!
    (e.g. https://eu2.contabostorage.com)
  • Access Key and Secret Key:
    Take from Account > Security & Access > S3 Object Storage Credentials (https://new.contabo.com/account/security)
  • Bucket: Your Bucket name (e.g. owncast-demo)
  • Region: Endpoint subdomain (e.g. eu2)
  • Serving Endpoint:
    Click again on the share button of your bucket and take the public URL.
    (e.g. https://eu2.contabostorage.com/de0eb80beb7f432590520366121b0ef0:owncast-demo)
  • Force path-style: Needs to be enabled!

Create an expiration policy

You should expire old HLS segments on your Bucket, because the storage capacity is limited. Unfortunately, Contabo does not offer this setting via the interface. Therefore you need to use a command line tool to configure your S3 compatible bucket.

Here we use S3cmd.
Make sure you have Python and pip installed!

Setup S3cmd

  • Install S3cmd: pip install s3cmd
  • Start configuration: s3cmd --configure
  • Enter Access Key and Secret Key
  • Region: Leave empty (just hit enter)
  • S3 Endpoint: Use only the domain without path and protocol!
    (e.g. eu2.contabostorage.com)
  • DNS-style: Same as S3 endpoint only with /%(bucket) at the end
    (e.g. eu2.contabostorage.com/%(bucket))

Set Lifecycle

  • Create a file called lifecycle_policy.xml with the following contents:
      <LifecycleConfiguration>
      <Rule>
      <ID>delete-all-objects</ID>
      <Prefix></Prefix>
      <Status>Enabled</Status>
      <Expiration>
      <Days>1</Days>
      </Expiration>
      </Rule>
      </LifecycleConfiguration>
      
  • Run s3cmd setlifecycle lifecycle_policy.xml s3://YOURBUCKETNAME
  • Run s3cmd info s3://YOURBUCKETNAME and you should see Expiration Rule: all objects in this bucket will expire in '1' day(s) after creation. If so, you are now ready!