Accessing NextCloud from WAN Topic is solved

Having issues with your DietPi installation or found a bug? Post it here.
Post Reply
fernandog
Posts: 4
Joined: Tue Mar 16, 2021 1:26 pm

Accessing NextCloud from WAN

Post by fernandog »

Hello. This is my first post. First of all, thank you very much guys for this great OS!

I'm trying to access the nextcloud in my RPi, but I can't.

I have installed nextcloud, generated the certificate, set the DDNS, and forwarded port 80 and 443.

Always seems working OK from my LAN. If I go to https://myddns/nextcloud, I get the login dialog.

When I go to http://myddns from WAN, I get a secure connection to the default page. BUT, if I try https://myddns/nextcloud I get "You can't access this website, ERR_CONNECTION_TIMED_OUT.

First guess was my "allowed domains" in config.php, but no. Here is my config.php

Code: Select all

<?php
$CONFIG = array (
  'passwordsalt' => 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx',
  'secret' => 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx',
  'trusted_domains' =>
  array (
    0 => 'localhost',
    1 => '*',
  ),
  'datadirectory' => '/mnt/dietpi_userdata/nextcloud_data',
  'dbtype' => 'mysql',
  'version' => '21.0.0.18',
  'hashingThreads' => 4,
  'memcache.local' => '\\OC\\Memcache\\APCu',
  'filelocking.enabled' => true,
  'memcache.locking' => '\\OC\\Memcache\\Redis',
  'redis' =>
  array (
    'host' => '/run/redis/redis-server.sock',
    'port' => 0,
  ),
  'overwrite.cli.url' => 'http://localhost/nextcloud',
  'dbname' => 'nextcloud',
  'dbhost' => 'localhost',
  'dbport' => '',
  'dbtableprefix' => 'oc_',
  'mysql.utf8mb4' => true,
  'dbuser' => 'oc_admin',
  'dbpassword' => 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx',
  'installed' => true,
  'instanceid' => 'xxxxxxxxxxxxxxxxxxxxxxx',
  'maintenance' => false,
);
Could you help me?
User avatar
Joulinar
Posts: 5115
Joined: Sat Nov 16, 2019 12:49 am

Re: Accessing NextCloud from WAN

Post by Joulinar »

Hi,

I created a guide in the past. Maybe you can have a look

viewtopic.php?p=22271#p22271
Pls let us know if a solution is working. This could help others if they hit by similar situation. Your DietPi Team
fernandog
Posts: 4
Joined: Tue Mar 16, 2021 1:26 pm

Re: Accessing NextCloud from WAN

Post by fernandog »

Hi! Thank you. This is the guide I followed to set up my installation.

As I've said, it is working from inside, but not from outside. Any guess?
User avatar
Joulinar
Posts: 5115
Joined: Sat Nov 16, 2019 12:49 am

Re: Accessing NextCloud from WAN

Post by Joulinar »

if your https://myddns/nextcloud is working inside the network, it doesn't seems to be an issue of Nextcloud server because it responding and accessible. Looks more something on the router and how stuf is forwarded to your device. Do you use anything inside your network like firewall that could influence the connection?

If the issue would be with allowed domains, you would be notified by Nextcloud. However it seems your not able to reach the server on port 443 at all from external
Pls let us know if a solution is working. This could help others if they hit by similar situation. Your DietPi Team
fernandog
Posts: 4
Joined: Tue Mar 16, 2021 1:26 pm

Re: Accessing NextCloud from WAN (SOLVED)

Post by fernandog »

Hello.

As always, you were right ;)

My ISP is blocking port 443, and because my webserver is redirecting port 80 to port 443, I could'nt access from outside.

So changing redirection in my router (8443->443) and using https://myddns:8443/nextcloud, fixed the issue.

Thank you very much
Post Reply