2 IP addresses for same account issue

Hello, guys. Im using lastest 0308 dev version on android. I have 2 accounts attached localIP:port (@home) and PublicIP:port (@out-internet) - autoupload function is trying to upload to both accounts. Is there a way to set to use only 1 connection/account.

also ways how its can try 1st of 2nd and use only one available - like other clients do?


Easiest is to use a hostname and to set via DNS which IP is used. Public DNS gives the public ip, your local dns resolver gives your local ip.

dont think so…how you want to set DNS ? on each device separately?

In your home network (therefore I referred to your local dns resolver)?

local DNS resolvers are provider DNS
dont think u can set what resolves to what in router
on Windows machine in host file is useless…

Here is how I solved this:

  • Public IP(cloud.example.com) points to router (with dyndns). router forwards port to cloud-server
  • Private IP (cloud.example.com) points to cloud-server (with local dns)

Maybe this is what @tflidd tried to explain

1 Like

Well lets say even if i have DynDNS (or other public DNS service)…i would need to set this on my router (not every router has this option) mine has, but i dont have public IP from provider (im on his local LAN) so i cant set DynDNS

I have just few ports open from ISP

so at home i use IP
outside https://port.isp.com:5555 if i use this address at home it wont work.

Even when i tried to open port and use it for DynDNS it didnt worked out.

For example on android torrent client “Transmission” you set account wit some IP and then you can set also Alternate IP, always one of those works and i dont have to worry about other settings.

hope is more clear now :slight_smile: Thanks

@mario this should not happen, right? The auto upload should always upload to the account where the folder was configured?

@Dave_KILLER have you set up the folder (e.g. camera) in both of your accounts? Then this would explain why it is getting uploaded to both accounts.

I think he’s talking about using two different IPs, not two different NC accounts. But yea… this should not happen.

We currently don’t really handle multiple IPs/networks well.

Yes both accounts have the same folder - how else i can upload same pictures to the same destination?

Thats why im asking for the “alternate IP” within one account

That means you can connect from outside your LAN to your nextcloud instance, right? How you achieve this is not important to answer your initial question.

What you have to do next is to reference https://port.isp.com:5555 to in your LAN. By doing so, https://port.isp.com:5555 will also work at home. This is what a self hosted local DNS can do for you. In addition you would need to share this information to all devices in your LAN. If you set your self hosted DNS as first DNS in your DHCP-Server this will work out. :wink:

heh thanks for the tip…but to use one app from Nextcloud i need to run my own DNS server? :smiley: thank you , but no.

Well i think this is a good suggestion for app feature…not very complex to add.

Not out-of-the-box but works

@Dave_KILLER Please mark the issue as solved, if you are convinced by the solutions proposed to you.

its not solved… running own DNS server to use your NextCloud app is not solution.
This way is better to use google cloud for pictures, works everywhere…but limited capacity
Or i might try OwnCloud

You’re more than welcome to try ownCloud. We’ll eventually come to this issue as well since it’s hidden somewhere in our bug tracker I believe.

If you wish to speed it up, you are more than invited to contribute.

well since ive installed Next cloud 5-6months ago on my NAS - Auto upload feature wasnt working on the App…so i tried up and then, now i realized its finally working, but im still bit limited to use it.

Thats why need to stick with gdrive or try owncloud (havent yet, as i thought you have have it all ready :wink: )

Not a DEV so cant really contribute…just test and report.

thanks anyway will check in few months again

Appreciate all the testing and reports of course - we wouldn’t be where we are without good folks like you. And while we’d like to fix all the bugs, we have to prioritize - and 1.5 is really really near with huge improvements (including a completely rewritten auto upload) and bugfixes.

sure keep up good work , will wait some while longer but afterwards i can finally have everything working and stored at home :slightly_smiling_face: Thanks!

Often, you have a resolver on your router. Some models provide manual modifications. You could run you own resolver on your next cloud server (e.g. unbound) and populate the dns address via dhcp. It’s also useful to block adds and tracking domains.

With some routers you can even use the public IP on the local network without any tricks with your DNS.
On owncloud you will have the same problem because it is a network issue. A different router firmware could help.

With google, you have to upload everything to a remote server. You could as well run a next cloud setup on a real server or vserver you can rent for a couple of bugs a month.

Other idea: you run your NC only in your local network and connect to it from remote first via VPN.