Forem Creators and Builders 🌱


Posted on

Amazon S3 with CloudFront custom domain

Hi! Before installing forem on digitalocean, I set up an Amazon S3 bucket, CloudFront and a custom domain for image links. The link should look like this:

But when I started installing Forem, I found out that there was no variable in the configuration file to pass the link. Default bucket link is used only.


Is there a way to use a custom domain for image links or use links from CloudFront? Thank you!

Top comments (3)

varhal profile image

Any ideas?

ellativity profile image
Ella (she/her/elle)

Hey @varhal thanks for your patience while we asked the engineering team to explore this question for us. The best answer we got is that right now this can't be done easily, and definitely not something we can support you to do with our current architecture.

However, if you'd like to request this as a feature, we welcome you to open a GitHub Discussion to share your use case and what you'd need to make this happen.

pandeybk profile image
Balkrishna Pandey • Edited

@ellativity is right here, if you look at the forem codebase,

There is a variable called IMGPROXY_ENDPOINT but if you set env to production it will seek for a /image context on the same domain where the forem is deployed. I found this hardway. I was trying to use the aws cdn, but because of this limitation I was not able to do it.

The way I am doing it right now is, deploy image proxy and set ingress path /image and use nginx ingress controller (I am using kubernetes so if you are not familiar with ingress concept, its a nginx reverse proxy controller support k8s ingress rule out of box).