NextCloud VM - How to set static IP?

,

Hello,

I downloaded the NextCloud VM and imported that as VirtualBox VM in my home PC. Everything went fine but it seems by default the VM is configured to fetch dynamic IP from my home router DHCP.

Virtual Box VM is configured as bridged network to unrestricted access to my home network.

I would like to set a static IP address for this VM.

My main purpose for nextcloud is to try and find an alternative to Google Photos for me and my familiy members & I am not that good with Linux, I did try to search and follow some guides on editing a yaml file but got stuck at editing the config file of NextCloud, as I am unable to locate the exact location.

Is there any easy way to edit the IP Address of the VM during installation to set it to use a static IP address?

Thanks.

Hi,

Please check this out:

https://docs.hanssonit.se/s/W6fMouPiqQz3_Mog/virtual-machines-vm/d/W6fMquPiqQz3_Moi/nextcloud-vm-first-setup-instructions

You could also just run the static IP script from console to get it all done automatically.

sudo bash /Var/scripts/menu.sh → Server Configuration → Static IP.

Hope it helps!

Hello,

Thanks for the reply.

Could you please tell me at which stage of installation process I am supposed to run this? Since once I start the VM, it goes into Auto Installation mode and runs through the installation / setup process without ever asking me to make selection of IP Address.

Now after it completes the installation, it has already done everything based on the IP it got from DHCP (as explained in that documentation link given by you).

At this stage, if I am trying to execute “sudo bash /Var/scripts/menu.sh” in VM, it is throwing error that file doesn’t exists.

Capture

Second alternative is to setup the DHCP server MAC / IP binding.

It worked that way, however, that’s problematic for me as I can’t move the VM to somewhere else as it will be depended on that specific DHCP server or otherwise, everywhere else I need to have access to DHCP for IP / MAC binding.

Can’t I set the network IP at Ubuntu / NextCloud itself?

I wonder why “sudo bash /Var/scripts/menu.sh” isn’t working !!

Thanks.

Update 1:

I found installing nextcloud via snap is much easier for my need as I can set a static IP while installing ubuntu server on VM. Thanks.

Are you running the latest VM from here?

I don’t think so since menu.sh is default in the last 3-ish versions.