Nextcloud is gone

Hello Community,

i have a serious problem.
My installation of nextcloud is not working any more. It seems, that it does not be there anymore…

The setting:
I have a ubuntu 20 server with apache running. I installed nextcloud via snap. Everything worked fine for more than a year.
A month ago i have moved to a new place and had to move the server too.
That was the first time i had the server shut down ever.

In the new network it took me some time to get the IP ready, but now i can access the server as it should be.

But when i try opening the webinterface of nextcloud i only get the apache-startpage.
I have looked in the storage of the server and can not find any folder or something named nextcloud in the htdocs-folder.

I am not an expert in this whole field, but i hope here is somebody that can help me.

Greetings
Alex

Hello,

First of all, I am no expert but this wouldn’t have worked to start with.

  1. Snap is a self contained package, it comes with it’s own apache, sql and such. There is no need for separate apache installation
  2. If you end up installing apache on that same system running snap nextcloud, it wouldn’t work since there will be port conflict between two apaches unless one of them I guess is running on non standard web port.

If it was working for you in the first setup location, either you had nextcloud working on a different port than 80/443 or your native apache was running on different port.

You should first check that.

Secondly, if that is something you are unable to figure out, first take a snap backup (using snap export command) of your nextcloud (move that backup to a separate disk/location) and then try to remove the native apache installation to see if that makes snap nextcloud working again.

If that is also not working, then simply remove everything, and fresh install Ubuntu and then snap nextcloud and use that previous backup to restore the entire snap backup. This should start working again from there you left it.

Thanks.

1 Like

Hello NaXal,

thank you for the answer.
I can not remember it properly, but ich think you are right. I think i do not have an own apache, but used the integrated version in snap.

I did not use different ports.

How can i make a snap backup?

Will my files be accessable after a total reinstall?

Where is the data storaged, when the folder on the apache is not there any more?

1 Like

Hello,

Since you are not sure, I guess first step is to check if the system is showing snap nextcloud installed or not.

Run following command as root sudo user,

snap list

02

Check that output to see if nextcloud is shown installed or not.

Thanks.

It is installed.

It’s Version 23.0.5snap1

Hello,

Snap is by default configured to update itself and as you may see from my output, the latest stable snap release is 24.0.3snap1.

Your is a bit behind. Is this server runs without active internet or did you manually changed any configuration to stop snap from updating itself?

Anyway, that is off topic, not related to you issue.

Check if snap nextcloud related services are running or not

snap services

Thanks.

The services are running:

Hello,

I am not an expert here, but nextcloud-fixer process should be inactive unless its working on updating or fixing something with snap nextcloud.

Refer here → nextcloud-snap/nextcloud-fixer at master · nextcloud-snap/nextcloud-snap (github.com)

What kind of system configuration you are having?

What is the htop output is showing? High system load?

If fixer is active, one should wait, on a lower end configuration computer or with slower internet, it may take some time to complete it’s work.

In case your system is running a decent configuration and your internet is fast enough and this fixer is stuck like that, I guess try to stop nextcloud snap and then restart it.

sudo snap stop nextcloud
sudo snap start nextcloud

Reboot the system if needed.

Check if that shorts it out.

Otherwise you may have to explore the possibility that you indeed have native apache installed.

Try running following commands with sudo

apache2 -v

Thanks.

Thanks for your help.

I have restarted the snap nextcloud but the fixer is still active:
grafik

The apache-command shows this to me:
grafik

I’m not shure if that’s good or bad…

1 Like

the only thing I know about snap is: it exists… soooo… my answer should be handled with care :wink:

anyways… you wrote that you moved to a new place. Most probably you got a new (internal) IP there. It might happen now that your snap is still configured to use your old (internal) IP from your last place. So this would be the first thing I would check and then maybe trying to adapt everything to the new (internal) address.

1 Like

Hello,

There is your first problem.

You are right in your first post, indeed you have two apaches running with same port.

So, first thing, change the default Nextcloud port.

sudo snap set nextcloud ports.http=81
sudo snap set nextcloud ports.https=444

Now you can access your nextcloud via new ports, like if you are using http then http://you.ip.address:81 or with SSL, its https://your.ip.address:444

Check if that is allowing you to access nextcloud.

For non technical users like me, who are not linux experts, Snap way feels the best way !!

Thanks.

Ok whereever this comes from…

I have changed the ports as you mentioned.

But i can still not access the nextcloud via browser…

How can i see if there is any problem with the ip?

I had to change the ip config in my new place, to get it connected to the router and access it via ssh…

Is there an option in the nextcloudsettings, that it only accepts connections from a special ip or something?

Hi,

Could you be bit more specific as what is the error?

404?

Since you have another apache running, it could be your firewall blocking those ports.

You can check your firewall status,

sudo ufw status 

If it is running, for the time being temporarily disable it for troubleshooting.

sudo ufw disable

Check if you are now able to access nextcloud with that new ports?

If are able to log in via SSH, at least it’s confirmed that you have the system in network with proper subnet and IP. New IP (trusted domain) can be added to nextcould later on. If it were an IP related issue, nextcloud will show it’s trusted domain warning page

Thanks.

P.S. Don’t forget to clear cache and cookies and temp file of your browser between different configuration attempts !! Close and restart the browser when trying again.

Ok we’re making progress. :grinning:

After a little certificate-error i could now access the nextcloud website…
Now it says that i have to change the trusted domain settings.

I have searched for a solution and found that this can be set in the config.php file.

I searched for this file and got this:
grafik

I tried the two files in the config-directories, but they are not writeable and do not contain any information about trusted domains…

What to do now?

Hello,

That is your natively installed Apache, it has nothing to do with NextCloud Snap. The Config file for snap is located at

/var/snap/nextcloud/current/nextcloud/config/config.php

You can’t manually edit that file for certain things in snap. You have to do it via snap command.

sudo nextcloud.occ config:system:set trusted_domains 1 --value=your.server.ip

That will update the config for you.

I am curios to know what got it running?

Thanks.

I’m not shure what made it work. I tried accessing with different browsers and after a while it worked. Maybe i was to quick or the server to slow…

With your help i managed to change the trusted domains and now i could log in to the website.

But it looks like the Database is three or more month old. I have made changes to files and also made new directories (with shares) in the last weeks before moving in the new place.
All this seems to be gone…

Is there a type of versioning or something like that?

Hello,

Is it working on the default 80/443 ports?

Thanks.

No it’s still the changed ports 81/444.

Thanks

Sorry to push the thread again…

Is there a solution how i can get my data from the last few weeks back?

The actual status of the data is some month ago.

Thank you for your help so far! :pray: