I
Immich•2y ago
Greg

setting IMMICH_API_URL_EXTERNAL

set the IMMICH_API_URL_EXTERNAL in env to IMMICH_API_URL_EXTERNAL=/12345 looking at the log for immich-web i see
docker logs immich_web
Listening on 0.0.0.0:3000
[hooks.server.ts]:handleError Not found: /12345/api
[hooks.server.ts]:handleError Not found: /12345/.well-known/immich
[hooks.server.ts]:handleError Not found: /12345/oauth/config
[hooks.server.ts]:handleError Not found: /12345
[hooks.server.ts]:handleError Not found: /12345/api
[hooks.server.ts]:handleError Not found: /12345/oauth/config
[hooks.server.ts]:handleError Not found: /12345/api
[hooks.server.ts]:handleError Not found: /12345/.well-known/immich
[hooks.server.ts]:handleError Not found: /12345/oauth/config
[hooks.server.ts]:handleError Not found: /12345/oauth/config
[hooks.server.ts]:handleError Not found: /12345
docker logs immich_web
Listening on 0.0.0.0:3000
[hooks.server.ts]:handleError Not found: /12345/api
[hooks.server.ts]:handleError Not found: /12345/.well-known/immich
[hooks.server.ts]:handleError Not found: /12345/oauth/config
[hooks.server.ts]:handleError Not found: /12345
[hooks.server.ts]:handleError Not found: /12345/api
[hooks.server.ts]:handleError Not found: /12345/oauth/config
[hooks.server.ts]:handleError Not found: /12345/api
[hooks.server.ts]:handleError Not found: /12345/.well-known/immich
[hooks.server.ts]:handleError Not found: /12345/oauth/config
[hooks.server.ts]:handleError Not found: /12345/oauth/config
[hooks.server.ts]:handleError Not found: /12345
and the mobile iOS fails when i try https://my.domin.com/12345
10 Replies
Alex Tran
Alex Tran•2y ago
IMMICH_API_URL_EXTERNAL should not be touched unless you have a very custom setup
Greg
GregOP•2y ago
hi Alex.. i am trying to secure my cloudflare tunnel with a WAF where i could check if the url contains a key.. the /api url could be /dsbfsdijfnbsiodfbsdiufb and it would check if this was included and allow connection i entered /12345 to test how can i use this env key so i can set my own custom url path? seems just setting that key does not work
Alex Tran
Alex Tran•2y ago
Are you thinking of using path for your reverse proxy? like yourdomain.com/immich?
Greg
GregOP•2y ago
yes
jrasm91
jrasm91•2y ago
You need to configure your reverse proxy to rewrite that custom path to /api and leave all the env settings unchanged.
Greg
GregOP•2y ago
so get rid of the IMMICH_API_URL_EXTERNAL change and leave blank? oh well Cloudflare doesnt allow the free plan to do regex replace to remove key string from url but i guess the IMMICH_API_URL_EXTERNAL doesnot work or buggy
Alex Tran
Alex Tran•2y ago
I think it isn't designed to serve this purpose 🤔
Greg
GregOP•2y ago
i thought it would have set the url path const endpoint = process.env.IMMICH_API_URL_EXTERNAL || '/api'; if set use that else set it to api but i found this export const api = new ImmichApi({ basePath: '/api' }); so its not setable in the env @Alex can the docker compose link a custom nginx conf to the proxy ?? I edited the default.conf.template with a new rewrite for a custom path like /8256a3343c4204b7 instead of /api and it seems to be working fine.. biut i bet when the docker pull updates i will lose the change.. So looking for a way to link a local nginx default.conf file that the proxy will use even after updates
bo0tzz
bo0tzz•2y ago
You should use your own separate reverse proxy

Did you find this page helpful?