Publishing docs — all chapters

What it is for

Object storage is cheap, and it scales without you thinking about it. Selfish uploads to Amazon S3 or to any service that speaks the same language: Cloudflare R2, Backblaze B2, DigitalOcean Spaces, MinIO and others.

Create a bucket and an access key in your provider’s console first. Then, in Site Settings → Publishing, set Publish Using to S3 Storage.

The bucket

FieldWhat to enter
BucketThe bucket’s name, for example my-site-bucket.
RegionThe bucket’s region, for example us-east-1. Use auto for Cloudflare R2.
EndpointLeave it empty for Amazon S3. For other services enter their endpoint host: <account-id>.r2.cloudflarestorage.com for R2, s3.us-west-004.backblazeb2.com for B2, and so on.
Path PrefixOptional. Publishes the site under a folder inside the bucket, for example blog.

The access keys

FieldWhat to enter
Access Key IDThe key’s ID from your provider, for example AKIA….
Secret Access KeyThe secret that goes with it. It is stored in the Keychain only.

Use a key limited to just this bucket. It needs to list, read, write and delete objects there, and nothing else. If a device were ever lost, that is all the key could touch.

Serving the site

Storage holds the files. You choose how readers reach them.

Then set Site URL to that address.

ADDRESSES WITHOUT .HTML

If you turn on addresses without .html, a post lives at /posts/my-post/. Amazon S3 shows a folder’s address only with static website hosting turned on, or behind a CDN set to add index.html. Selfish reminds you when you switch it on.

What a publish does

For a themed “Page not found” page, point your bucket’s or CDN’s error document at 404.html.

Problems? See Troubleshooting.