I
Immich•3y ago
Banthex

Set custom IP

Is there a way to change the IP from host to custom IP?
52 Replies
jrasm91
jrasm91•3y ago
What specific host are you wanting to change to a custom ip?
Banthex
BanthexOP•3y ago
currently on unraid it uses my server ip but i need to assign a custom ip for nginx proxy manager.
jrasm91
jrasm91•3y ago
What does "it" mean, I'm not sure I'm following. Did you deploy this with docker compose?
Banthex
BanthexOP•3y ago
docker compose and env file according to the immich guide for unraid
jrasm91
jrasm91•3y ago
To connect it to nginx proxy manager, I think you could add the nginx proxy mananger's docker network to immich and then use you just the service name + internal port. So npm would just be http://immich-proxy:8080
Banthex
BanthexOP•3y ago
ok i will search for a how to thanks
jrasm91
jrasm91•3y ago
npm and immich are running on the same machine, right?
Banthex
BanthexOP•3y ago
yes
jrasm91
jrasm91•3y ago
networks:
nginxproxymanager_default:
external: true

...
services:
...
immich-proxy:
networks:
- nginxproxymanager_default
networks:
nginxproxymanager_default:
external: true

...
services:
...
immich-proxy:
networks:
- nginxproxymanager_default
No description
jrasm91
jrasm91•3y ago
This is what I'm using.
Banthex
BanthexOP•3y ago
ok i will try it thanks
jrasm91
jrasm91•3y ago
Any luck?
Banthex
BanthexOP•3y ago
i have to search the point where to enter the code sniped im a self hosting beginner sorry 😄
jrasm91
jrasm91•3y ago
Haha no worries. That goes in the docker-compose file. So you should be able to go to the stack and hit "Edit Stack" somewhere.
Banthex
BanthexOP•3y ago
i know i just starting the server wont work a few days ago i just added the web ip:port to nginx and the subdomain worked. then i struggled with nginx had to reinstall it since then i could not get the subdomain online with immich
jrasm91
jrasm91•3y ago
for a custom domain to work you need two things setup correctly: 1. dns setup for the hostname to point at the right ip 2. service running on the right ip
Banthex
BanthexOP•3y ago
wo to a break here my npm has weired behavier now all my subdomains wont work anymore but i changed nothing
jrasm91
jrasm91•3y ago
sounds like a dns problem
Banthex
BanthexOP•3y ago
i try to fix it over weekend and will write feedback here is there something interesting its the fritzbox
jrasm91
jrasm91•3y ago
where is dns setup for your domain and subdomains?
Banthex
BanthexOP•3y ago
netcup routed to duckdns > fritzbox
jrasm91
jrasm91•3y ago
So it's a public domain?
Banthex
BanthexOP•3y ago
y the weired thing is sometimes the domains working sometimes not and i guess its a frotzbox related problem
jrasm91
jrasm91•3y ago
Does it work from your phone on mobile data (not your local network)?
Banthex
BanthexOP•3y ago
not local only external ip the ok now it works internal wtf
jrasm91
jrasm91•3y ago
What ip did you setup the domain with a public ip or private ip?
Banthex
BanthexOP•3y ago
i noticed that when i open ports i have to use the device name that the fixed ip saved in the fritz box is jupming around thats why i start the npm with my custom ip and then i can port forward to that ip and not my device name
jrasm91
jrasm91•3y ago
Does the device running npm have a static ip address? You can keep the same one after restarts or get a new one each time. If it's not the same then the port forwarding might be an issue when it restarts.
Banthex
BanthexOP•3y ago
no its a fixed ip, the problem is that im not sure about this cacheing thing with dns do i have to delete my firefox cache or restart my pc when i work with subdomains and reverse proxy? i always try it but seems not to help
jrasm91
jrasm91•3y ago
dns queries are cached so that can be a problem when troubleshooting sometimes.
Banthex
BanthexOP•3y ago
sometimes this makes my troubleshooting as beginner really hard xD
jrasm91
jrasm91•3y ago
Most systems have a way to clear dns cache though.
Banthex
BanthexOP•3y ago
im using ubuntu 22.10
jrasm91
jrasm91•3y ago
You aren't changing anything related to dns are you?
Banthex
BanthexOP•3y ago
no and sometimes i have a rebound error from my fritzbox
jrasm91
jrasm91•3y ago
dns should point from domain to your public ip. Fritzbox should port forward to your fixed ip.
Banthex
BanthexOP•3y ago
so it seems there is something in the routing from the router changes
jrasm91
jrasm91•3y ago
You can test the domain by nslookup immich.domain.com and make sure it points to your public ip.
Banthex
BanthexOP•3y ago
ah tanks
jrasm91
jrasm91•3y ago
You can test port forwarding by going off your local network and navigating to public ip:port or custom dns and it should go to the right internal ip.
Banthex
BanthexOP•3y ago
im always checking the domains with my smartphone and disabled wifi it shows me bad gateway what is good
jrasm91
jrasm91•3y ago
Yeah. Is that working?
Banthex
BanthexOP•3y ago
that means its routing to the npm
jrasm91
jrasm91•3y ago
Cool Do you see the same thing on local IP?
Banthex
BanthexOP•3y ago
yes
jrasm91
jrasm91•3y ago
So DNS is working, it's just npm is not sending it to the right place. Did you add the network stuff to the immich-server docker compose file?
Banthex
BanthexOP•3y ago
y to the bottom of the file
jrasm91
jrasm91•3y ago
It needs to go in two different sections
Banthex
BanthexOP•3y ago
oh xD
jrasm91
jrasm91•3y ago
The first part can go anywhere The part that says "immich-proxy" needs to added right under the "immich-proxy" section in the existing file
Banthex
BanthexOP•3y ago
ah tanks
jrasm91
jrasm91•3y ago
Or if you don't care. You can try ignoring all that stuff and setting the address in npm to the fixed IP of the server and port 2283.

Did you find this page helpful?