Cannot access API from external URL in android mobile app
I have troubles accessing immich API from the android mobile app.
Here is the relevant entry in my Caddyfile:
Here is the relevant .env line
IMMICH_API_URL_EXTERNAL=https://immich.domain.com
immich.domain.com/api/server-info/ping
and
my.docker.host.ip:2283/api/server-info/ping
both gladly 😄 respond
{"res":"pong"}
What am I missing?9 Replies
When I use
my.docker.host.ip:2283/api
as the server endpoint URL in the android mobile app it works.
I have a local DNS server and on my LAN I can ping
https://immich.bb/api/server-info/ping
which responds with {"res":"pong"}
in a web browser.
However, the Android mobile app says could not connect to server.Is it a self signed certificate?
is the IMMICH_API_URL_EXTERNAL needed? I used Immich with Caddy before and didn't need that environment variable and my mobile app worked fine
It is only needed if you host the API on a separate domain and machine than the web.
Pretty much all, except the rare few (complicated) it is not needed. Most of the time it is used incorrectly.
also @TastesLikeShit just checking that you're putting the /api in the app's server endpoint? i believe you can't just put in the subdomain alone
That api url env var is wrong and you shouldn't need to set it at all
If you put just the domain into the app, it will use that env var to figure out where the api is, if it's not set then it will use /api by default which is what you want
self-signedfor local domains, I believe so. Which is why I need this in my caddyfile
but for external domain they arent self signed.
I don't need it, everything on the same docker host 🙂
Okay I will try without the env var when I recover my pi 😅
I was uploading using the IP from app and pi died somehow, can't get it to boot again 😦
My guess is that when a video was uploaded (first) it started encoding, my pi was overclocked so either temp or voltage soft break or hard break something... 😬
Would it be less ambiguous if we change the word "external" in the
example.env
and in docs to something more explicit to hint that it is only relevant when something is hosted on a separate machine?Environment Variables | Immich
Docker Compose
Self signed won't work with the mobile app