Hi all, going to apologize right off the bat, as I’m sure this is a super simple question. I’m super new to Linux in general, as well as Apache.
I followed a guide last night to install NextCloud 11.02 on Linux Mint 18. The setup went great, and everything worked. When asked for the IP address it assigned itself one via DHCP on my local network at home, which was fine. I’m planning to put this on a dedicated server machine but just wanted to play with it beforehand. So anyway it defaulted to 10.0.0.7.
Then I went to my college campus and was going to show my professor, but I figured the server IP address was going to be wrong so I went to try to update it to whatever IP my laptop got assigned there.
I looked in all the config files I could find and updated the IP address to the one my laptop was assigned but couldn’t get it to work. So I thought maybe it was just the schools router’s blocking access, but when I came home I switched everything back to 10.0.0.7 still can’t get it working.
The files I altered were:
I’ve tried looking through the documentation but haven’t found anything yet. Any help would be great, or pointing me toward the right resources! Trying to learn as much as I can!
For what you’re trying to do, I’d highly recommend a sandboxed VM instead installing in your laptop just like any other app. In this case you can give the machine a static IP within the virtual network as if it were a server.
I wrote an article here for doing so on Ubuntu 16.04 within KVM: http://joshmorel.github.io/install-nextcloud-dev-vm.html
The following articles in the series shows a) how to route traffic through your laptop so other clients can sync can interact with the sandbox VM, b) how to deploy to a production server.
Thanks for the advice. I won’t really ever need to actually carry it around on my laptop with me having the server running from there. I just wanted to play around with it before I put it on the server where I’ll set up a static IP for it and everything.
I’ll check out your article but I figured that just updating the local IP address would be pretty straight forward and was curious in case I ever was forced to do that with a server that was all ready set up.
Were my thoughts on changing those config files going in the right direction and maybe I missed one or two locations? Or is changing the server IP address something that can’t really be configured multiple times per install?
I came across a similar problem when installing Nextcloud on my Android Phone as a “pocket server” (via Gnuroot Debian). Nextcloud basically needs a fixed IP so that you can also configure the clients to connect to it. However it is easily possible to have it work with multiple different fixed IPs just by adding all those in the config file. I think you can even put a range of IPs there, but of course it would be difficult to configure the clients for that.
In my case I have it working on 192.168.43.1 as this is the default IP on Android when sharing the internet connection via WiFi (thus all computers connected to that hot-spot can use this IP) and 127.0.0.1. for local access from the android device.
Hmmm, so can you think of any reason why I went from having a working configuration at home on my local network, to then not having a working config after I came home and reset everything back to how it was?
When you say “the config file” which one is that where you’d actually go about changing the IP address at?
The 3 I have listed in my OP are all the ones that had my local IP but when I changed them all back I couldn’t get to the Nextcloud login page
Not sure, did you double check the IP that the DHCP assigned? Normally that changes after the DHCP lease expires. It’s better to configure your router to always assign the same IP to your Nextcloud machince then.
I never touched the Apache config files, only the Nextcloud as otherwise the login page will complain about an untrusted domain if I remember correctly.
Yeah I did, the PC got the same address assigned to it when I came back. I was noticing in some places that it said it had a “remote address” as 10.0.0.6 (one off from the PCs IP) wasn’t sure what that was about so I didn’t touch it.
Could you post what your nextcloud config file looks like? I actually ended up wiping out my Linux install yesterday for something else and I can’t remember off the top of my head what that one looked like
Maybe one of the differences is that my Debian provides a “html” directory in which all web-apps can be placed without having to modify the Apache2 config files. I remember this wasn’t the case on a Ubuntu server I used a while ago. In my specific case I am not overly concerned about security as it isn’t a public instance, so I just put 127.0.0.1 and 192.168.. into the “trusted_domains” part of the Nextcloud config.
Edit: stars/asterisks are not displayed in this forum it seems. The above is 192.168.“star”.“star”
Hmm well I was on Linux Mint, which I’m pretty sure is based on Ubuntu. Still learning all this. But correct me if I’m wrong, there’s a specific html folder on this too right? Like /var/www/html/nextcloud?
Yes mint is Ubuntu based.
Last time I worked with an Ubuntu system there was only /var/www/ and pages there had to be added as enabled sites under the Apache2 config folders. This is not the case for the /var/www/HTML folder on this Debian system, but I am a bit vary about possible security implications of this.