How to host static website files with DreamObjects

This article uses the new DreamObjects cluster of ''. If you have an older DreamObjects account and have not migrated your data yet, your hostname may need to point to ' instead. Please review the following migration article for further details.

You can configure a DreamObjects bucket to serve static web pages created with HTML, CSS, and JavaScript. This allows you to host an entire website that is simple to build and very inexpensive.

Static web pages are usually HTML pages instead of being dynamically built by a web application such as WordPress or framework such as Django. There are a lot of tools that help generate and maintain static web pages: the site StaticGen maintains a list of open source static site generators you can use to create the files to upload to your new DreamObjects website bucket.

This tutorial covers how to serve a static website from a DreamObjects bucket, but doesn’t cover how to create the files for the static website itself.

Make sure you have a working installation of S3cmd (version 1.6 or greater) before proceeding.

Creating the bucket

The name of the bucket must be the same name of the DNS entry for the website. For example, if your website is, name the bucket

[user@localhost]$ s3cmd mb s3://
Bucket 's3://' created

Creating the website for the bucket

Once the bucket is created, use s3cmd to configure the bucket as a website. The option ws-create takes many arguments. In this example, the default index page is configured:

[user@localhost]$ s3cmd ws-create --ws-index index.html s3://
Bucket 's3://': website configuration created.

You can also configure a default error page, using the –ws-error argument for the ws-create command. Read the full S3cmd man page for more details.

Check the results of the command with ws-info — it should look like the following example:

[user@localhost]$ s3cmd ws-info s3://
Bucket s3:// Website configuration
Website endpoint:
Index document:   index.html
Error document:   None

s3cmd configuration needs website_endpoint set to output this value correctly. If you use the default, things will still work, but the printed output here will be

Setting the policy for the bucket and upload the static files

At this point, the bucket is ready and all you need to do is upload the HTML files, JavaScript, CSS, images, and any videos you may have in your static website. From the root folder of your website, upload these files with the sync command, setting the files public -P and recursively -r.

[user@localhost]$ s3cmd -Pr sync . s3://

This process takes awhile, depending on the size of your site and the upload bandwidth. Once it completes, visit the website endpoint with your browser (in the example, You should see the content of your index.html file.

Support for HTTPS will be added in the future.

Creating the DNS entry

As a last step, you can create a more attractive name for your site, such as Go to the (Panel > 'Domains' > 'Manage Domains') and add a custom DNS record to the domain. Pick CNAME and insert

The endpoint for website is while the API endpoint for DreamObjects is

As soon as DNS information propagates, your site is reachable in your browser at

Did this article answer your questions?

Article last updated PST.