How to set up CORS using cloudflare tunnel?
Hello! The answer to this may exist somewhere but I cannot seem to find it, and this is my first ever selfhost so I lack a lot of experience. I recently got my ente photos selfhost to work through cloudflare tunnels, however only grey squares show up where the photos and videos are meant to be (I uploaded to the 10gb limit using localhost before). My friend on a different network was also able to create an account, but cannot upload any photos. After some rummaging and looking at a different forum post, my issue seems to be a CORS error, as the people in the other forum post fixed their issues by chainging their CORS.json file. I don't know how to fix this though, I have looked at the ente help article but I don't think the AWS CLI is going to work here and I'm slightly confused about what it does, is there maybe a cloudflare alternative? I tried changing compose.yaml and museum.yaml but neither have fixed anything. Thank you in advance to any help provided!
Notes about setup
- I used quickstart method
- Minio is located on a separate drive in the server to the rest of the ente install (this does not seem to bother the localhost setup)
- Computer app and mobile app seem to work with the cloudflare tunnel when connected to the same network as the server, but stop working when connected to a different network/mobile data
8 Replies
If you are encountering CORS errors that prevent photo uploads, especially when using a Cloudflare tunnel, you will need to configure the CORS settings for your bucket.
You can start by creating a
cors.json file with the following content:
For enhanced security, consider modifying the AllowedOrigins field to specify the exact origins of your Ente web apps and Museum, rather than using a wildcard.
The documentation provides an example of how to update your bucket's CORS configuration using the AWS CLI. See https://ente.io/help/self-hosting/administration/object-storage#cors-cross-origin-resource-sharing for more details.
-# If your issue is resolved, feel free to use the /solved command to close this thread. If you'd like to ask me another question use /docsearchEnte Help
Configuring Object Storage - Self-hosting
Configure Object Storage for storing files along with some troubleshooting tips
🔍 Similar Solved Posts
Found some similar posts that might help:
📋 Check these out:
Searched 59 solved posts
I just want to post an update hoping someone can help me. I went to bed after posting this, woke up, realised I am meant to install amazon CLI, and I think I configured it correctly, however when putting the command in this error appears

what am I doing wrong exactly?
update: figured out what I was doing wrong but I now have a new error

is the access key not the key in museum.yaml?
Final update: I feel really dumb saying this, but the actual issue was that my endpoints in museum.yaml were not configured correctly. There was no issues with my cors.json file at all. To anyone else having the same issue in future, make sure the endpoints in museum.yaml point to your domain, not the localhost port. Set up subdomains to connect to port 3200
Thread marked as solved. It will be closed in <t:1762235797:R>.
This thread is now closed.