Swag Nextcloud Docker reach internal IP

    • Offizieller Beitrag

    only via local network (with an invalid certificate, but that doesn't bother me)

    Did you follow the macom guide? Do you have this line in your config.php file?:

    'overwrite.cli.url' => 'https://your.url/nextcloud',

    Or like this, if it is a subdomain:

    'overwrite.cli.url' => 'https://nextcloud.your.url',

    It's really not important, this already works. I'm just surprised it works like this for you locally.

    • Offizieller Beitrag

    When you're going to "myexternalip:443".. is this secured or are you just forwarding ports?


    If you read that whole post start to finish and do as I put, it should work just fine or you're having some other issue. I'm confused, because nowhere in that did I put anything about "externalip:443". Externally you should be using your subdomain, that's the whole point.

  • Did you follow the macom guide? Do you have this line in your config.php file?:

    'overwrite.cli.url' => 'https://your.url/nextcloud',

    Or like this, if it is a subdomain:

    'overwrite.cli.url' => 'https://nextcloud.your.url',

    It's really not important, this already works. I'm just surprised it works like this for you locally.

    I followed this guide from @KM0201


    Works like a charm. Then I started adapting the solution so my local traffic would stay local (according to tracert).


    So my config.php looks now like this:


    As I said, it works. The only little inconvenience is that internally I'm receiving a certificate error.


    When you're going to "myexternalip:443".. is this secured or are you just forwarding ports?

    Sorry that was just me being inprecise to depict the port situation. I'm always using the subdomain, both internally and externally.

    • Offizieller Beitrag

    As I said, it works. The only little inconvenience is that internally I'm receiving a certificate error.

    Now I see... I've never set up a cert internally. It always seemed pointless to me since it is only accessed internally (none of my services have internal certs, but all of them have external certs through swag).

    • Offizieller Beitrag

    As I said, it works. The only little inconvenience is that internally I'm receiving a certificate error.

    Ok, it's weird, but a little annoyance nothing more. I'm glad it works.

  • If you put my_external_name my_internal_ip into you hosts file, you will have the same name fpr nextcloud and hence a valid cert.

    No need to weak the nextcloud install at all.


    (If you have a local DNS forwarder, you can also put the external name with interal ip into the overides and be happy)

    If you got help in the forum and want to give something back to the project click here (omv) or here (scroll down) (plugins) and write up your solution for others.

  • If you put my_external_name my_internal_ip into you hosts file, you will have the same name fpr nextcloud and hence a valid cert.

    No need to weak the nextcloud install at all.

    That's what I did (the syntax is my_internal_ip my_external_name on Windows, but I guess that's what you mean). The cert is not valid, anyway (when called from the local PC).


    If you have a local DNS forwarder, you can also put the external name with interal ip into the overides and be happy)

    What do you mean by "local DNS forwarder"? Is it something that my router does? There is no DNS server in my network, I rely on my ISP. The only thing (that I know of) I can adapt is the hosts file (per client).

    • Offizieller Beitrag

    What do you mean by "local DNS forwarder"? Is it something that my router does? There is no DNS server in my network, I rely on my ISP. The only thing (that I know of) I can adapt is the hosts file (per client).

    There are two solutions.

    - Modify the client's hosts file. This is what you have done. For it to work you must modify this file on each client.

    - Create a DNS server. In this case, all clients will receive the IP configured for that domain.

  • That's what I did (the syntax is my_internal_ip my_external_name on Windows, but I guess that's what you mean). The cert is not valid, anyway (when called from the local PC).

    Can not understand why that is not valid. What reason does the browser show (click the lock)

    What do you mean by "local DNS forwarder"? Is it something that my router does? There is no DNS server in my network, I rely on my ISP. The only thing (that I know of) I can adapt is the hosts file (per client).

    My gateway has an unbound dns 'server', but PiHole would be perfect for you

    If you got help in the forum and want to give something back to the project click here (omv) or here (scroll down) (plugins) and write up your solution for others.

  • Can not understand why that is not valid. What reason does the browser show (click the lock)

    The pop-up displays "The certificate is invalid" and then (when clicking "show certificate"):

    "This certification authority root certificate is not trusted because it is not in the repository of trusted root certification authorities."

  • Arn#t you using letsencrypt certs for the internet access?

    This was the right hint. Until now I was bypassing the proxy (=Swag/letsencrypt). Now I changed the Swag port to 443 and it works without cert error both internally and externally!


    Thank you Zoki for staying persistent :)


    Now I finally understand this:

    You would see the service because it would enter through Swag on port 443.

    I just didn't expect Swag to behave differently depending on the port it's running on.

Jetzt mitmachen!

Sie haben noch kein Benutzerkonto auf unserer Seite? Registrieren Sie sich kostenlos und nehmen Sie an unserer Community teil!