Moved homes and now Nextcloud is broken

Did you configure with a domain or an IP?

If you chose a domain, then you can only access using that domain, so it needs to resolve to your IP publicly and locally.

The way you say that makes it sound like it’s something in my Cloudflare setup…but I can’t figure out what’s wrong with how I’ve set that up either…

This is my nextcloud-config setup:

JAIL_IP=“192.168.50.253”
DEFAULT_GW_IP=“192.168.50.1”
POOL_PATH=“/mnt/NAS”
TIME_ZONE=“America/New_York”
HOST_NAME=“example.com
DNS_CERT=1
DNS_PLUGIN=“cloudflare”
DNS_TOKEN=“gibberish”
CERT_EMAIL="you@yourdomain.com"

When you visit your hostname, it has to resolve to the IP you specified for your jail.

So when you ping your hostname from your computer, does it end up at that IP?

If not you can either edit your hosts file on your computer, or set your DNS in your router so it resolves your domain to the local IP.

So I have my domain host name set to my router’s WAN IPv4. My router is set to port forward 80,443 to my jail’s internal IP.

I can ping my host name, but I’m not getting my router’s WAN IP as a return. So it might be stuck in Cloudflare?..

Probably.

Is the “Orange Cloud” option turned on or off next to your cloudflare entry? Make sure it’s off, and the cloudflare is only doing DNS.

If you want to have it be faster locally, I’d set my router to resolve the domain to the local IP of nextcloud.

The “Orange Cloud” was definitely turned on…

Redoing a fresh install again…let’s see if that was the magic button haha.

So, did another install and set the domains to DNS only. Few hours later, it worked randomly when I checked. Gave me the splash page and said something about groupfolders being incompatible.

Then I lost cell service for a moment, and when it came back I no longer had anything. Even now now that I’m home it doesn’t work either.

Do you have a static IP on your router?

No, but it hasn’t changed. Still the same as what Cloudflare has the domain configured to look at.

From your computer, what IP is returned when you ping your domain? Is it the correct one? The public IP? Or the local IP?

Had to pause my router’s DNS for my domain to resolve to the jail’s internal IP.

Now when pinging my domain, it’s going to my router’s WAN IP with no problem.

Turned off port forwarding and now I’m getting this error. Is this part normal?

Yes. That is the staging certificate.

Once you’ve confirmed it’s working, you can run the “remove-staging” command.

Nevermind, it sent me to my router’s login splash page…

Is the port properly forwarded? It should end up on your nextcloud page.

Does your router have some sort of redirect rule that redirects ports 80 and 443 to your router?

Turned port forwarding back on. It sends me to my internal IP I set for the jail, but with this web error.

I have the router set to send ports 80,443 to the nextcloud jail IP.


Got hit with a 3hr wait for being so new haha.

I am able to get past the “warning untrusted site, are you sure you wanna continue?” pages. Then it’s back to the error page above…

Can you share your current caddyfile and config.php?

nextcloud/config/config.php file:

$CONFIG = array (
‘passwordsalt’ => ‘gibberish stuff’,
‘secret’ => ‘more gibberish’,
‘trusted_domains’ =>
array (
0 => ‘localhost’,
1 => ‘mydomain.com’,
2 => ‘192.168.50.253’,
),
other more stuff below

Here’s the Caddyfile:

debug

    acme_ca https://acme-staging-v02.api.letsencrypt.org/directory
    email mine@protonmail.com
    # default_sni mydomain.com
}
mydomain.com {
    root * /usr/local/www/nextcloud
    file_server
    log {
            output file /var/log/mydomain.com.log
    }

    php_fastcgi 127.0.0.1:9000 {
            env front_controller_active true
    }

    tls {
            dns cloudflare gibberishhere
    }

    header {

I also want to see the more stuff…