Moved homes and now Nextcloud is broken

I moved a few weeks ago and have finally got the time to figure out what’s going on with my Nextcloud jail. I have been unable to get into my Nextcloud using its internal IP address, or the domain I used to have.

I eventually resolved to just re-installing using danb35’s script. I used this opportunity to update my internal IP and domain as well. I updated the config file to these new addresses and set up the new Cloudflare domain for everything. The install script says I completed it successfully, but no worky.

I’ve reloaded Caddy. I did this thing:

iocage exec nextcloud /root/remove-staging.sh

I have also restarted my entire TrueNAS server. I’m unsure what’s going on anymore and seeking any sort of help. Let me know what sort of screenshots you need for more information. Please and thank you!!

When you enter the jail and type

sockstat 

Can you see caddy running?

Definitely seems like it…

image

So what probably happened is that the domain you used is still configured in your nextcloud config.php file, and will need to be adjusted.

can you share the config.php file?
Remove sensistive info.

Its at /usr/local/www/nextcloud/config/config.php

…huh…I used to have one because I had edited it to the new domain. It’s not there anymore after a new scripted install…

image

That’s weird. Is this a completely new install?

Or did you install overtop of your existing data?

Deleted and reinstalled the jail again…here’s the nextcloud-config

Here’s the nextcloud/config/config.php:

I’d run it again. Also share your nextcloud-config file if you want.

Deleted and reinstalled the jail again…here’s the nextcloud-config

Here’s the nextcloud/config/config.php:

Looks good. Is your domain resolving to the proper IP?

Nope, and that might be my own fault being an absolute noob to web dev and cloudflare.

But I can’t even get to the log in from my internal IP…

To do that you need to change three values inside the config.php file

overwritehost should be your IP
overwritehostprotocol should be http for port 80
overwritecliurl should be your IP

Then in the caddy file at /usr/local/www/Caddyfile change the site block to read

:80 {
nextcloud contents
}

Instead of having your domain

I’m not too sure where that should be written…sorry

edit: changed image

Right where it says moultonhome.com

Just remove that and write :80

And probably now you’ll have to reroll your DNS token as it is visible in the screenshot.

grabbed the wrong screenshot…buggers…

I’ll come back to this tomorrow…yes, I’ve re-rolled the API. (thankfully I learned how to do that already haha)

So, going to retry doing a from scratch install. What is the best way to do the delete? I have been going to Jails > nextcloud > delete jail. Should I also delete the iocage for it in the pool?

Delete the datasets you created for it and recreate them as per the instructions on GitHub.

I’m still running into the same problem…I can’t even get into the initial splash page to try to log in - including locally in my browser…