Comments (20)
No I get what you mean. If you install on a VPS as root, you don't get promoted and the script starts instantly, and the first thing it does is to overwrite the interfaces file.
I will change this behaviour.
from vm.
Not priority. Please make a PR. :)
Thanks for you issue!
from vm.
@oparoz Now when thinking about it, the VM scripts are designed to be installed on a clean system, and we overwrite it to get the correct variables for example $IFACE. So why save it?
from vm.
It's true that, because I didn't want everything to be managed by the script, I used it on a fresh install of Ubuntu server and that part of the script did not work and left the VM disconnected from the network.
Maybe there wouldn't have been a problem if we had booted the image, but since other things broke at install time, I'm just thinking that making a backup before touching critical config files isn't such a bad idea.
from vm.
Please explain further about the bug you found so that we can fix it. The VM is designed to fit ALL systems, but at the same time you have to mount it correctly (Bridged mode i.e.) for it to work.
Example: The VM uses ens33 as IFACE (network interface) when created by us, then you as a user downloads it and have another interface (let's say eth0), the script will fail with the ens33 IFACE so that's why we change it. In the install script we only check that the network is OK without changing anything as you probably use the install script to install the VM for the first time. In the startup script though (the one that is pre installed and run when the user boots the released VM for the first time) we do change the interfaces file becuase of the reason above and then test that the network is OK here: https://github.com/nextcloud/vm/blob/master/nextcloud-startup-script.sh#L42-L61
The "correct interface" is just the original interface on Ubuntu 16.04 with new IFACE, so that it breaks seems unlikley, and even if it did, you are not able to continue as we will stop you before any scripts are downloaded. That's by design. The scripts are fetching all the latest scripts from Github and it will break without them, but again - we test if your network connection is OK before running anything.
So where did it break?
from vm.
Maybe we should add more checks? @oparoz
from vm.
The interface was configured with a static IP and the script replaced the config with one which uses DHCP and that didn't work. That's how it broke.
I guess I could also write something which makes a backup of these files before trying to install NC...
from vm.
So you setup static IP address before you ran the script? Yeah, that won't work as that is not intentioned by design. Don't really know how to come around that issue as (again) the scripts installs on a completely fresh VM with no changes prior to the scripts are run.
Ofc, you can always make changes afterwards.
Any ideas on how to fix this?
from vm.
I think the easiest thing to do would be to simply ask.
- Test the network
- It works, go to the next step
- It doesn't offer a DHCP fix
You could take it further by showing a diff, but it's probably not worth it at this stage
from vm.
In 99% of the cases the IFACE is different than the one on the host that created the VM. What is your proposal, to ditch the fix we added some months back so that users don't have to retype the IP address in the interfaces file if they already set up static IP?
Sorry I'm not following here. Are you good in bash? Please make me a proposal :)
from vm.
JFTR:
Just as a few examples where we have have struggled with getting the correct IFACE and IP address in the past to fit as many of the useecases as possible. Right now I think it works great.
from vm.
Thanks for the references :)
For now, I'm just suggesting to make this step optional, just like the let's encrypt step. Some sysadmins will have the networking components under control and will only want to install Nextcloud.
from vm.
Problem is that requires more skills than I have right now, many if statements in each other.
- https://github.com/nextcloud/vm/blob/master/nextcloud-startup-script.sh#L42-L61
- https://github.com/nextcloud/vm/blob/master/nextcloud-startup-script.sh#L259-L305
Where to you propose for the fix to go in?
from vm.
Hmmm.... The steps which kill the network happened a lot earlier
https://github.com/nextcloud/vm/blob/master/nextcloud-startup-script.sh#L42-L46
But thinking about it, this will never work when using a remote console. So maybe there isn't any issues if the script runs until the end.
from vm.
Still it would be nice if those 2 steps could be grouped and made optional, like you did this step:
https://github.com/nextcloud/vm/blob/master/nextcloud-startup-script.sh#L332-L350
from vm.
Actually, that's another issue. Using a remote console will actually work as the IP isn't changed until the VM is rebooted even if you change it manually. In other words. if you started with an IP that IP will continue to server the VM until you reboot.
Scenario 1:
- You have set a static IP before you run the install scripts.
- The scripts resets that to a standard DHCP file. Probably the same as you started out with, exept a new IFACE
- You get a new chance to set the same static IP as you started out with.
- The IP will never change until you reboot anyway (users reported, didn't test it myself)
Scenario 2:
- You have DHCP before you run the install scripts.
- The scripts resets that to a standard DHCP file. Probably the same as you started out with, exept a new IFACE.
- You set a static IP when prompted with the interfaces file.
- The IP will never change until you reboot anyway (users reported, didn't test it myself)
So, resetting the connection won't matter even if you set a static IP to begin with, as you will get prompted with the interfaces file a second time, and then have the chance to recover your static IP. And as the IP doesn't change until you reboot anyway (service network restart doesn't work always, and not even ifdown and ifup sometimes), same goes for DHCP.
Also, the scripts wouldn't download at all without a working internet connection and you would be stopped before the script would even continue here: https://github.com/nextcloud/vm/blob/master/nextcloud-startup-script.sh#L48-L61
Are you following :)
from vm.
Point 4 makes the Let's Encrypt script fail if you manually edit any settings before the script is run.
from vm.
But sure, I could add a copy of the original interfaces file before the script make any changes, but after all it's just about adding like 6 numbers in the interfaces file as you are prompted here:https://github.com/nextcloud/vm/blob/master/nextcloud-startup-script.sh#L294 and have the possibility to add you specific IP again ...if that's what you mean?
from vm.
But then again, why make a backup if the user isn't even aware of that happening... Or are you thinking something like
echo "/etc/network/interfaces are now backed up before the script makes any changes to it"
echo "You can find the file here: /etc/network/interfaces_bak"
.... reset the interfaces file ...
from vm.
ping @oparoz --^ ?
from vm.
Related Issues (20)
- Netdata installation fails HOT 6
- Adminer not being maintained anymore HOT 10
- Realtek Driver Update HOT 1
- NextCloud VM installation error -Adminer HOT 1
- Fail2ban fails on Ubuntu 24.04 HOT 2
- Installation doesn't work on Ubuntu 22.04 HOT 2
- /var/log/nextcloud/audit.log is not rotating
- Multiple available Nextcloud updates potentially lead to reboot during update process HOT 10
- Upgrade from Nextcloud 28.0.6 to 29.0.1 results in security warning HOT 20
- Cron <root@cloud> which zfs-auto-snapshot > /dev/null || exit 0 ; zfs-auto-snapshot --quiet --syslog --label=frequent --keep=4 // HOT 8
- Apache server startup failed after running Activate TLS script (Ubuntu 22.04 / Nextcloud 29.0.2) HOT 16
- Bitwarden - Error when updating using bitwarden.sh script HOT 4
- Script is not accessible HOT 2
- proxmox install (vz restore 29.0 - HUB 8), python3-distutils no install candidate HOT 7
- Sorry but something went wrong. HOT 10
- nextcloud_install_production.sh now missing? HOT 5
- Is https://download.nextcloudvm.com supposed to be online? HOT 9
- I'm "always welcomed" if accessing freshly installed NC via Proxy - Thus can't access NC itself. HOT 8
- broken link in readme HOT 1
- One or more mimetype migrations are available HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from vm.