Reverse Proxy

I set up ente using docker compose. Now I'm trying to use NGINX for a reverse proxy. My NGINX-Config is attached. I can access media.domain.net without any issues. But if I try to create an account I get the error "Somethin went wrong". In the developer setings popup I tried using api.media.domain.net but it gave me this error: "NetworkError when attempting to fetch resource."
19 Replies
Ducky
Ducky3mo ago
I'm sorry, I couldn't find the answer in the documentation. -# 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 /docsearch
Ducky
Ducky3mo ago
🔍 Similar Solved Posts
Found some similar posts that might help:
📋 Check these out:
Niika
NiikaOP3mo ago
On the website it always shows "localhost:8080", I don't know why though
codedcosmos
codedcosmos3mo ago
Do you know how to use your browsers dev tools? Can you show the network tab and see what the rest response is? I am fairly sure I experienced the same issue
Niika
NiikaOP3mo ago
Sure! Here's the console output and the network tab.
No description
No description
codedcosmos
codedcosmos3mo ago
Yeah I definitely got the same thing I can't get back to you right away but I can get you my nginx config Its either that or a minio issue
Niika
NiikaOP3mo ago
Sure, that would be great. I don't know what minio does exactly though. btw, I just noticed that the museum container is listed as unhealthy. This are the only errors / warnings I can see in the log:
INFO[0000]offer.go:49 NewOfferController Skipping optional Black Friday offersopen : no such file or directory
INFO[0000]offer.go:53 NewOfferController Could not get Black Friday Offerunexpected end of JSON input
ERRO[0000]billing.go:91 parsePricingFile Skipping payment configuration, pricing data unavailable in config: open : no such file or directory
ERRO[0000]billing.go:91 parsePricingFile Skipping payment configuration, pricing data unavailable in config: open : no such file or directory
[GIN-debug] [WARNING] Running in "debug" mode. Switch to "release" mode in production.
- using env: export GIN_MODE=release
- using code: gin.SetMode(gin.ReleaseMode)
[GIN-debug] [WARNING] You trusted all proxies, this is NOT safe. We recommend you to set a value.
Please check https://pkg.go.dev/github.com/gin-gonic/gin#readme-don-t-trust-all-proxies for details.
INFO[0000]offer.go:49 NewOfferController Skipping optional Black Friday offersopen : no such file or directory
INFO[0000]offer.go:53 NewOfferController Could not get Black Friday Offerunexpected end of JSON input
ERRO[0000]billing.go:91 parsePricingFile Skipping payment configuration, pricing data unavailable in config: open : no such file or directory
ERRO[0000]billing.go:91 parsePricingFile Skipping payment configuration, pricing data unavailable in config: open : no such file or directory
[GIN-debug] [WARNING] Running in "debug" mode. Switch to "release" mode in production.
- using env: export GIN_MODE=release
- using code: gin.SetMode(gin.ReleaseMode)
[GIN-debug] [WARNING] You trusted all proxies, this is NOT safe. We recommend you to set a value.
Please check https://pkg.go.dev/github.com/gin-gonic/gin#readme-don-t-trust-all-proxies for details.
codedcosmos
codedcosmos3mo ago
Minio is a service for running object storage Its basically your database running in a docker container You need to allow accesses from a specific domain
Niika
NiikaOP3mo ago
How?
codedcosmos
codedcosmos3mo ago
I can't access the device I did it on until tomorrow sorry. But you might find my thread helpful https://discord.com/channels/948937918347608085/1393544918332342343/1393544918332342343 https://discord.com/channels/948937918347608085/1393544918332342343/1393544918332342343 Hmm, your nginx looks correct to me. I would check: * What does your museum.yaml look like? (Specifically your s3/b2-eu-cen/endpoint field) * Also is apps: correct in your museum.yaml? * What does your cors.xml look like? The other thing I would try is this:
docker compose exec minio bin/bash
mc alias set ente localhost:3000 <minio-user> <minio-secret>
mc admin config set ente api cors_allow_origin="*"
docker compose exec minio bin/bash
mc alias set ente localhost:3000 <minio-user> <minio-secret>
mc admin config set ente api cors_allow_origin="*"
Phi&Entropy
Phi&Entropy2mo ago
I’ve also got this setup with nginx, and I’m using a proxy for the Minio instance. I didn’t spot that in your nginx config, so maybe it’s just that causing the hiccup. As for Minio, I’d say Garage is a much better option!
YoungChief
YoungChief2mo ago
Definitely agree that Garage is a better option!!
Arbor
Arbor2mo ago
Could you elaborate why garage is a better option? I have a self hosted instance with minio running, would it make sense to switch?
Phi&Entropy
Phi&Entropy2mo ago
I did switch it was easy. Its better because it consumes less resources first, there is less controversy (minio has removed the UI or dashboard cant remember suddenly in one release). You can cluster it later, starts with one node and had high availability later given they are all s3 compatible high level switch recipe is to first setup up them both on different ports if its on the same host, create and permissions the buckets, then just use "rclone" to sync one bucket to the other (just make sure the ente server is down to avoid missing elements during sync) For me, the switch was more for the long-term viability of the self-hosting. I usually don’t like it when a project is a bit "hostile". Also, I didn’t like the way they version their releases. Using Docker pull to update, I was afraid I would pull something that would break everything one day. With Garage, the release versions are more familiar with major releases, etc.
YoungChief
YoungChief2mo ago
Yea, I'll add that they've been going quite corporate orientated for awhile I used to use Minio for my self hosted S3, but now I just use Garage
javathunderman
javathunderman2mo ago
Are there any docs on how to set it up with Garage? I'm trying to setup minio with an nginx proxy as well, and I keep running into issues
Phi&Entropy
Phi&Entropy2mo ago
I've just installed garage following their quick start guide, with one node for now. Then because they all follow the "S3 API" its just a matter of providing the right key and secret... you basically create the same buckets ente expects this is what I have in my museum config for s3
s3:
are_local_buckets: false
use_path_style_urls: true
b2-eu-cen:
key: garageKey
secret: garageSecret
endpoint: https://garage.yourdomain.blabla
region: garage
bucket: b2-eu-cen
s3:
are_local_buckets: false
use_path_style_urls: true
b2-eu-cen:
key: garageKey
secret: garageSecret
endpoint: https://garage.yourdomain.blabla
region: garage
bucket: b2-eu-cen
I now use Caddy for the reverse proxy but used to have nginx with minio I think nginx is better but I find their config too complicated for simple things the nginx config I had working with minio
server {
server_name minio.domain.com;
http2 on;
listen 443 ssl;
ssl_certificate /etc/letsencrypt/live/domain.com/fullchain.pem; # managed by Certbot
ssl_certificate_key /etc/letsencrypt/live/domain.com/privkey.pem; # managed by Certbot
include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot
ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot

# Allow special characters in headers
ignore_invalid_headers off;
# Allow any size file to be uploaded.
# Set to a value such as 1000m; to restrict file size to a specific value
client_max_body_size 0;
# Disable buffering
proxy_buffering off;
proxy_request_buffering off;

location / {
proxy_set_header Host $http_host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;

proxy_connect_timeout 300;
# Default is HTTP/1, keepalive is only enabled in HTTP/1.1
proxy_http_version 1.1;
proxy_set_header Connection "";
chunked_transfer_encoding off;

proxy_pass http://127.0.0.1:3200; # make sure to adapt to your config PORT
}
}
server {
server_name minio.domain.com;
http2 on;
listen 443 ssl;
ssl_certificate /etc/letsencrypt/live/domain.com/fullchain.pem; # managed by Certbot
ssl_certificate_key /etc/letsencrypt/live/domain.com/privkey.pem; # managed by Certbot
include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot
ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot

# Allow special characters in headers
ignore_invalid_headers off;
# Allow any size file to be uploaded.
# Set to a value such as 1000m; to restrict file size to a specific value
client_max_body_size 0;
# Disable buffering
proxy_buffering off;
proxy_request_buffering off;

location / {
proxy_set_header Host $http_host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;

proxy_connect_timeout 300;
# Default is HTTP/1, keepalive is only enabled in HTTP/1.1
proxy_http_version 1.1;
proxy_set_header Connection "";
chunked_transfer_encoding off;

proxy_pass http://127.0.0.1:3200; # make sure to adapt to your config PORT
}
}
javathunderman
javathunderman2mo ago
Hm, alright - I've been trying to get garage working with nginx, but I can't seem to get it to pass through the reverse proxy at least the initial setup for garage was pretty easy. I just can't seem to get it to play well with nginx I gave up and moved to caddy. That worked
stio_studio
stio_studio5w ago
How did you setup the reverse proxy? I can't get it to work with cloudflare tunnels

Did you find this page helpful?