Option to change the IP address for the server



  • Re: Update the Server URL
    This topic is rather old, that’s why I open a new one.

    I use DAVx5 to sync my Android phone with my Windows notebook in a local network. On the notebook there is a Radicale server. That works fine as long as the devices are in my own Wifi network with a not changing IP address of the notebook.

    As soon as I am somewhere else in a different Wifi network my notebook has a different IP address. For these situations I need to change the IP address of the server. The server itself does not change nor do the address book or the calendar themselves, not on the phone nor on the notebook, only the IP address is different. So there is no danger of any data chaos.

    So I very much endorse an option to change the IP address. As long as DAVx5 does not offer such an option, is there a way to do it manually (on a rooted phone)?


  • developer

    Hi,

    @bege said in Option to change the IP address for the server:

    Re: Update the Server URL
    This topic is rather old, that’s why I open a new one.

    Please also see https://forums.bitfire.at/topic/1066/update-the-server-url – the arguments are still valid, nothing has changed about changing the URLs.

    I use DAVx5 to sync my Android phone with my Windows notebook in a local network. On the notebook there is a Radicale server. That works fine as long as the devices are in my own Wifi network with a not changing IP address of the notebook.

    My recommendation is to use a host name. Wouldn’t that be a solution?

    So I very much endorse an option to change the IP address. As long as DAVx5 does not offer such an option, is there a way to do it manually (on a rooted phone)?

    There are many URLs involved at different places (another reason why it’s not easily possible to change the URL). In theory, you can change the URLs in the DAVx5 database (DAVx5 directory / files / databases / the only one which is there), plus in the DAVx5 address book accounts user data (Android account database), plus in the calendars in the respective columns (Android calendar storage provider).

    I’m sure that it would take much more time than to delete the account and add it with the new host name again, which should take about ~ 1 min (for me, it takes about 5 sec, but I’m used to testing), and if you forget only one entry, everything may behave inconsistently.



  • @rfc2822 said in Option to change the IP address for the server:

    My recommendation is to use a host name. Wouldn’t that be a solution?

    Thank you very much for your answer.
    I have little knowledge about networks, so I was quite happy to get server and sync working. I only know to address the server via IP address. What would be the host name in a local network?
    And can the server on the computer also be accessed that way via hotspot on the computer or phone without a Wifi network?

    … and if you forget only one entry, everything may behave inconsistently.

    Okay, I forget about that.


  • admin

    @bege on the router you can designate a certain name to an IP address like 192.168.0.10 -> “myserver” - then you can use “myserver” to connect to DAVx5 and if the IP address ever changes the name will still be the same if you then point the new IP address to “myserver” again.

    This name can be used instead of the IP address fom all devices that are in the network of the router.



  • @devvv4ever said in Option to change the IP address for the server:

    @bege on the router you can designate a certain name to an IP address like 192.168.0.10 -> “myserver” - then you can use “myserver” to connect to DAVx5 and if the IP address ever changes the name will still be the same if you then point the new IP address to “myserver” again.

    This name can be used instead of the IP address fom all devices that are in the network of the router.

    In the network at home I only have access to the repeater my devices are connected to, not to the router. In the repeater I cannot change the name.
    But in this network the IP of the notebook does not change, so I don’t need it here. The problem is when I am with my notebook and phone at different places. There I usually don’t have acces to the router anyway.

    I more often edit the contacts and events on the phone rather than on the notebook.
    Scenario: I am traveling, have edited some entries, come to a place with Wifi network and want to sync with the notebook. How do I get the changes to the notebook?


  • admin

    You have to synchronize it to the server first and the notebook has to synchronize it from the server. For your scenario, you could install a VPN to your home network - but also for that you’d need to have access to the router…



  • @devvv4ever
    Thank you for your answer.
    Does that mean that in my case I can use DAVx5 with a server on my notebook only in my home network?


  • admin

    @bege in your specific configuration yes, because in a different wifi you are most likely getting a different IP address and even if you get the same you are maybe not allowed to be connected to from other devices (like your phone with DAVx5) in this network (for example this would be the case if you’re in a free wiFi in some Café or so).



  • @devvv4ever
    Thanks.
    😢



  • @rfc2822 said in Option to change the IP address for the server:

    I’m sure that it would take much more time than to delete the account and add it with the new host name again, which should take about ~ 1 min (for me, it takes about 5 sec, but I’m used to testing), and if you forget only one entry, everything may behave inconsistently.

    Just to complete this thread: This gives new IDs to the contacts and renders contacts connected to events and templates e.g. in BusinessCalendar2 useless. Looks like DAVx5 is only for people who are always online with a web-server.


  • developer

    @bege said in Option to change the IP address for the server:

    Looks like DAVx5 is only for people who are always online with a web-server.

    Indeed, that’s what it’s designed for. But you can use it only in WiFi, too. Just be sure that you have working host names.

    The problem is when I am with my notebook and phone at different places. There I usually don’t have acces to the router anyway.

    What don’t you just create a WiFi with your notebook and use this WiFi from your phone? Or, the other way, create a WiFi on your phone (tethering) and then connect with the notebook to this WiFi?



  • @rfc2822 said in Option to change the IP address for the server:

    What don’t you just create a WiFi with your notebook and use this WiFi from your phone? Or, the other way, create a WiFi on your phone (tethering) and then connect with the notebook to this WiFi?

    That is what I actually do already! I connect the phone with the hotspot of the notebook because that is much faster than the Wifi network. But the hotspot IP did not work, only the IP of the notebook in the Wifi network. Your answer prompted me to check this again. Probably it was a missing firewall rule. Now it works! I use the hotspot of the notebook because that IP and therefore the server address remains the same (192.168.137.1), the IP of the phone changes with every new connection to the hotspot.

    So thank you very much for addressing this!

    (How) can I add the “solved” tag to this thread?



Similar topics

  • 6
  • 2
  • 2