# How to change Gateway IP Adress

**URL:** <https://help.nextcloud.com/t/how-to-change-gateway-ip-adress/182237>\
**Category:** 📦 Appliances (Docker, Snappy, VM, NCP, AIO)\
**Tags:** ncp\
**Created:** [February 20, 2024, 2:00am UTC](https://help.nextcloud.com/t/how-to-change-gateway-ip-adress/182237 "2024-02-20T02:00:58Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![wu\_muckl](https://help.nextcloud.com/letter_avatar/wu_muckl/32/5_5575768a8748004e209b776fc1b2916d.png) [@wu\_muckl](https://help.nextcloud.com/u/wu_muckl)\
**Post date:** [February 20, 2024, 2:00am UTC](https://help.nextcloud.com/t/how-to-change-gateway-ip-adress/182237/1 "2024-02-20T02:00:58Z")

</div>

Hello community,  
I cannot change the gateway IP Adress the Raspberry uses.  
My raspberry with Nextcloud on it has IP 192.168.1.212. The gateway (Router) is 192.168.1.1 but the nextcloudpi after boot has always 192.168.0.1. as gateway. It’s also shown in the web interface  
This is the output of ip route list after boot:

default via 192.168.0.1 dev eth0 src 192.168.1.212 metric 202  
192.168.0.1 dev eth0 scope link src 192.168.1.212 metric 202  
192.168.1.0/24 dev eth0 proto dhcp scope link src 192.168.1.212 metric 202

Then webinterface is very slow and Internet is not reachable. When I change the gateway via

sudo ip route delete default  
sudo ip route delete 192.168.0.1  
sudo ip route add default via 192.168.1.1 dev eth0 src 192.168.1.212 metric 202

its running very much better.  
Then the output is

default via 192.168.1.1 dev eth0  
192.168.1.0/24 dev eth0 proto dhcp scope link src 192.168.1.212 metric 202

I already tried to change the /etc/network/interfaces and also created a /etc/network/interfaces.d/eth0 but nothing is working. Please can someone tell me where nextcloudpi has the configuration for the used gateway?

---

<div class="post-metadata">

**Author:** ![tflidd](https://help.nextcloud.com/letter_avatar/tflidd/32/5_5575768a8748004e209b776fc1b2916d.png) [@tflidd](https://help.nextcloud.com/u/tflidd)\
**Post date:** [February 29, 2024, 8:32am UTC](https://help.nextcloud.com/t/how-to-change-gateway-ip-adress/182237/2 "2024-02-29T08:32:52Z")

</div>

There is the documentation here:

> [@Menu Configuration-Reference for Backups, Config, Networking, Security, System, Tools, Updates](https://help.nextcloud.com/t/menu-configuration-reference-for-backups-config-networking-security-system-tools-updates/126011#nc-static-ip-50):
>
> BACKUPS nc-backup-auto Perform automatic backups. How to enable: Navigate to nc-backup-auto in the TUI or the WebUI. Change ACTIVE to yes. Change DESTDIR to a desired location for the backups. Change INCLUDEDATA to yes (optional), to backup your data as well. Change BACKUPDAYS to the number of days to perform the backup. Change BACKUPLIMIT to the number of backups to be kept. If limit is reached, then the new backup will replace the older one. Click Run or Start. nc-backup Perfor…

It looks like by default it uses DHCP from your router, but you could use a static ip as well. If it is DHCP, it is your DHCP that provides the ip address and the gateway.  
Aren’t there option in the nc-\* commands? It is possible that they update the system files behind that, and if you change them as well, that can get a bit messy.

---

<div class="post-metadata">

**Author:** ![wwe](https://help.nextcloud.com/user_avatar/help.nextcloud.com/wwe/32/72963_2.png) [@wwe](https://help.nextcloud.com/u/wwe)\
**Post date:** [January 16, 2025, 8:44am UTC](https://help.nextcloud.com/t/how-to-change-gateway-ip-adress/182237/3 "2025-01-16T08:44:56Z")

</div>


