Encore

Stay in touch

Product updates and engineering deep-dives.

DiscordGitHubYouTube

© 2026 Encore

Product
Encore PlatformEncore Platform
Encore.tsEncore.ts
Encore.goEncore.go
InstallInstall
PricingPricing
Customers
Case StudiesCase Studies
ShowcaseShowcase
Book a DemoBook a Demo
Resources
DocsDocs
Example AppsExample Apps
Demo videoDemo video
ArticlesArticles
GitHub ReleasesGitHub Releases
Systems Operational
Company
AboutAbout
Swag ShopSwag Shop
ContactContact
JobsJobs
PressPress
SecuritySecurity
Legal
TermsTerms
Privacy PolicyPrivacy Policy
Data Processing AgreementData Processing Agreement
Enterprise SLAEnterprise SLA
← All articles

Public Object Storage Buckets + R2 Support

Launch Week Day 2

Dec 10, 2024
3 Min Read
Marcus Kohlberg
← All articles
Dec 10, 2024

Public Object Storage Buckets + R2 Support

Launch Week Day 2

Marcus Kohlberg
3 Min Read

It's Day 2 of Launch Week and we're back with another launch...

Encore.go and Encore.ts now support Public Object Storage Buckets

Today we're launching Public Buckets, an extension of our recently released Object Storage primitive for Encore.go and Encore.ts. This feature simplifies working with public-facing file storage directly in your application code and adds CDN support for optimal content delivery.

How Object Storage works in Encore

Encore lets you integrate infrastructure as type-safe objects in your application code. Whether you're creating a database, a Pub/Sub topic, or an Object Storage bucket, it's as easy as writing a few lines of code.

Example

To create a bucket in Encore.go you define it as a constant within a service:

package user import "encore.dev/storage/objects" var ProfilePictures = objects.NewBucket("profile-pictures", objects.BucketConfig{ Versioned: false, })

That's it! Encore sets up the infrastructure automatically when you run your app locally.

For manual cloud deployments, you just provide a runtime configuration and Encore handles the rest.

Using Public Buckets for simple file sharing

Encore now supports creating public buckets where objects can be accessed directly via HTTP/HTTPS without authentication. This is useful for serving static assets like images, videos, or other public files.

To create a public bucket, set Public: true in the BucketConfig.

Here's how to do it in Encore.go:

var PublicAssets = objects.NewBucket("public-assets", objects.BucketConfig{ Public: true, })

Once configured as public, you can get the public URL for any object using the PublicURL method:

// Get the public URL for an object url := PublicAssets.PublicURL("path/to/image.jpg") // The URL can be used directly or shared publicly fmt.Println(url) // e.g. https://assets.example.com/path/to/image.jpg

For manual cloud deployments, you just need to provide a provide a base url in the runtime configuration, and Encore handles the rest.

When deploying with Encore Cloud it will automatically configure the bucket to be publicly accessible and configure CDN for optimal content delivery, using:

  • Cloud CDN when using Google Cloud
  • AWS CloudFront when using AWS

With Public Buckets, Encore makes managing object storage and public file access simple, powerful, and fully type-safe.

Simple testing in the Development Dashboard

Encore's Development Dashboard makes testing very simple. Call your endpoints, such as the list endpoint, to view and trace requests and get detailed insights. Traces provide insights including file uploads and bucket queries, helping you debug and optimize.

Encore Cloud now supports Cloudflare R2

Encore Cloud now supports Cloudflare R2 as an object storage provider. R2 can often be a cheaper alternative to AWS S3. This is great for anyone looking to save costs on object storage, while getting access to a global CDN.

To use Cloudflare R2, select it on the Create environment page in the Encore Cloud dashboard. If you have an existing environment, contact us to enable it. (Self-serve is coming soon!)

Join the Live stream

Watch today's live stream at 14:00 CET for an in-depth walkthrough and a live Q&A session.

Try it yourself

If you're already using Encore, update using encore version update.

If you're new to Encore, install using the instructions below and then create an example app using encore app create.

macOS
Windows
Linux
Brew
$ brew install encoredev/tap/encore

If you have questions or just want to hang out with other Encore developers, join our community on Discord.

Contents
Encore.go and Encore.ts now support Public Object Storage Buckets
How Object Storage works in Encore
Example
Using Public Buckets for simple file sharing
Simple testing in the Development Dashboard
Encore Cloud now supports Cloudflare R2
Join the Live stream
Try it yourself
Encore

Automated infrastructure for humans and agents

Let agents build and validate features with real infrastructure in the dev loop. Encore automatically provisions infrastructure, from local dev to production in your cloud on AWS/GCP.

Get started
Encore

This blog is presented by Encore, automated infrastructure for humans and agents. Let agents build and validate features with real infrastructure in the dev loop, from local dev to production in your cloud on AWS/GCP.

Like this article? Get future ones straight to your mailbox.

You can unsubscribe at any time.

Related Articles

Development
08/18/26 / 15 Min Read
Development
08/18/26 / 15 Min Read
We rebuilt the Linux microVM stack on Apple Silicon
Maybe we should have just moved everyone to Linux.
Ivan Cernja
Development
07/28/26 / 5 Min Read
Development
07/28/26 / 5 Min Read
Your SQS consumer can hang forever by default
The AWS Rust SDK ships no request timeout by default, so one SQS receive on a dead connection can hang a whole consumer with nothing in the logs.
Ivan Cernja
Development
07/21/26 / 8 Min Read
Development
07/21/26 / 8 Min Read
Sandboxing an agent's code isn't the same as trusting it
A sandbox keeps an agent's code contained. It can't tell you the code is correct, which for backend code is the harder problem.
Ivan Cernja