<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[OAuth Connection With Nextcloud Not Working]]></title><description><![CDATA[<p dir="auto">Hi everyone,</p>
<p dir="auto">I was trying to connect n8n with nextcloud , hosted on the same VM as n8n itself.<br />
I'm forwarding both port 443 &amp; 80 to this VM.</p>
<p dir="auto">When trying to fulfill the last step of the OAuth Verification there is an error on the last step, probably coming from a forwarding issue.</p>
<pre><code>{"code":0,"message":"Unable to connect to xx.xx.xx:443","hint":"","stack":"ConnectionError: Unable to connect to xx.xx.xx:443\n    at TLSSocket.onError
</code></pre>
<p dir="auto">There were no issues connecting the Nextcloud Cloudron Instance with the n8n Desktop App, so I assume this issue is soley based on some forwarding problem within cloudron/nginx.</p>
<p dir="auto">If anyone has an idea how solve this, please let me know <img src="https://forum.cloudron.io/assets/plugins/nodebb-plugin-emoji/emoji/android/1f642.png?v=c3aa4c12b7e" class="not-responsive emoji emoji-android emoji--slightly_smiling_face" style="height:23px;width:auto;vertical-align:middle" title=":)" alt="🙂" /></p>
]]></description><link>https://forum.cloudron.io/topic/7196/oauth-connection-with-nextcloud-not-working</link><generator>RSS for Node</generator><lastBuildDate>Thu, 05 Mar 2026 17:12:26 GMT</lastBuildDate><atom:link href="https://forum.cloudron.io/topic/7196.rss" rel="self" type="application/rss+xml"/><pubDate>Sun, 12 Jun 2022 15:31:54 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to OAuth Connection With Nextcloud Not Working on Tue, 14 Jun 2022 09:21:58 GMT]]></title><description><![CDATA[<p dir="auto">Since Hairpin NAT was kind of a pain in the a** to set up, I decided to go for DNS route in the end.<br />
The following solution made it possible to connect to the domains/containers that are hosted on the same machine.</p>
<ul>
<li>
<p dir="auto">Create a file in the /etc/unbound/unbound.conf.d/ directory e.g. randomfilename.conf</p>
</li>
<li>
<p dir="auto">Add a line for every domain that you want to resolve internally with the internal VM IP (e.g. 192.168.1.1)</p>
</li>
</ul>
<pre><code>server:

  local-data: "domain1.xx.com. IN A INTERNAL_VM_IP"
  local-data: "domain2.xx.com. IN A INTERNAL_VM_IP"
  local-data: "domain3.xx.com. IN A INTERNAL_VM_IP"
</code></pre>
<ul>
<li>Restart Unbound DNS Server via "systemctl restart unbound"</li>
</ul>
<p dir="auto">Hopefully this helps someone who runs into the same problem.<br />
<a class="plugin-mentions-user plugin-mentions-a" href="/user/girish" aria-label="Profile: girish">@<bdi>girish</bdi></a> Thanks for your help!</p>
]]></description><link>https://forum.cloudron.io/post/49563</link><guid isPermaLink="true">https://forum.cloudron.io/post/49563</guid><dc:creator><![CDATA[mabaker]]></dc:creator><pubDate>Tue, 14 Jun 2022 09:21:58 GMT</pubDate></item><item><title><![CDATA[Reply to OAuth Connection With Nextcloud Not Working on Tue, 14 Jun 2022 16:12:35 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/mabaker" aria-label="Profile: mabaker">@<bdi>mabaker</bdi></a> thanks! I have put your notes in our docs - <a href="https://docs.cloudron.io/troubleshooting/#hairpin-nat" target="_blank" rel="noopener noreferrer nofollow ugc">https://docs.cloudron.io/troubleshooting/#hairpin-nat</a> .</p>
<p dir="auto">I have to clean up that troubleshooting section a bit, but that's a task for another day...</p>
]]></description><link>https://forum.cloudron.io/post/49573</link><guid isPermaLink="true">https://forum.cloudron.io/post/49573</guid><dc:creator><![CDATA[girish]]></dc:creator><pubDate>Tue, 14 Jun 2022 16:12:35 GMT</pubDate></item><item><title><![CDATA[Reply to OAuth Connection With Nextcloud Not Working on Tue, 14 Jun 2022 09:21:58 GMT]]></title><description><![CDATA[<p dir="auto">Since Hairpin NAT was kind of a pain in the a** to set up, I decided to go for DNS route in the end.<br />
The following solution made it possible to connect to the domains/containers that are hosted on the same machine.</p>
<ul>
<li>
<p dir="auto">Create a file in the /etc/unbound/unbound.conf.d/ directory e.g. randomfilename.conf</p>
</li>
<li>
<p dir="auto">Add a line for every domain that you want to resolve internally with the internal VM IP (e.g. 192.168.1.1)</p>
</li>
</ul>
<pre><code>server:

  local-data: "domain1.xx.com. IN A INTERNAL_VM_IP"
  local-data: "domain2.xx.com. IN A INTERNAL_VM_IP"
  local-data: "domain3.xx.com. IN A INTERNAL_VM_IP"
</code></pre>
<ul>
<li>Restart Unbound DNS Server via "systemctl restart unbound"</li>
</ul>
<p dir="auto">Hopefully this helps someone who runs into the same problem.<br />
<a class="plugin-mentions-user plugin-mentions-a" href="/user/girish" aria-label="Profile: girish">@<bdi>girish</bdi></a> Thanks for your help!</p>
]]></description><link>https://forum.cloudron.io/post/49563</link><guid isPermaLink="true">https://forum.cloudron.io/post/49563</guid><dc:creator><![CDATA[mabaker]]></dc:creator><pubDate>Tue, 14 Jun 2022 09:21:58 GMT</pubDate></item><item><title><![CDATA[Reply to OAuth Connection With Nextcloud Not Working on Mon, 13 Jun 2022 18:13:10 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/girish" aria-label="Profile: girish">@<bdi>girish</bdi></a> Understood. Proxmox is acting as a router via internal IPTables.</p>
<p dir="auto">I'm going to give this config a go and see if it works, before I try fiddling around with DNS settings</p>
<pre><code># Internet
 $IPTABLES -t nat -A PREROUTING -i $INTERNET_IF -p tcp -m tcp --dport 80 -j DNAT --to-destination $WEB_SERVER1:80
 $IPTABLES -t nat -A PREROUTING -i $INTERNET_IF -p tcp -m tcp --dport 443 -j DNAT --to-destination $WEB_SERVER1:443
# VMNET - specify dest otherwise all traffic is redirected to this VM which we don't want
 $IPTABLES -t nat -A PREROUTING -i $INTRANET_IF -d $PUBLIC_IP  -p tcp -m tcp --dport 80 -j DNAT --to-destination $WEB_SERVER1:80
 $IPTABLES -t nat -A PREROUTING -i $INTRANET_IF -d $PUBLIC_IP  -p tcp -m tcp --dport 443 -j DNAT --to-destination $WEB_SERVER1:443
# Host
 $IPTABLES -t nat -A OUTPUT -d $PUBLIC_IP -p tcp -m tcp --dport 80 -j DNAT --to-destination $WEB_SERVER1:80
 $IPTABLES -t nat -A OUTPUT -d $PUBLIC_IP -p tcp -m tcp --dport 443 -j DNAT --to-destination $WEB_SERVER1:443
</code></pre>
]]></description><link>https://forum.cloudron.io/post/49530</link><guid isPermaLink="true">https://forum.cloudron.io/post/49530</guid><dc:creator><![CDATA[mabaker]]></dc:creator><pubDate>Mon, 13 Jun 2022 18:13:10 GMT</pubDate></item><item><title><![CDATA[Reply to OAuth Connection With Nextcloud Not Working on Mon, 13 Jun 2022 17:43:58 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/mabaker" aria-label="Profile: mabaker">@<bdi>mabaker</bdi></a> With no hairpin routing, you have to set it up so that the DNS resolves to the local VM IP for all queries from inside your private network. i.e <code>n8n.domain.com</code>  should resolve to the internal VM IP when queried from inside your LAN but should be your external IP when queried from outside.</p>
<p dir="auto">Does your router allow adding DNS entries or do you use a custom DNS server internally? If so, the idea would be to configure unbound to forward all DNS to your router and the router simply responds with internal IP.</p>
]]></description><link>https://forum.cloudron.io/post/49528</link><guid isPermaLink="true">https://forum.cloudron.io/post/49528</guid><dc:creator><![CDATA[girish]]></dc:creator><pubDate>Mon, 13 Jun 2022 17:43:58 GMT</pubDate></item><item><title><![CDATA[Reply to OAuth Connection With Nextcloud Not Working on Mon, 13 Jun 2022 17:04:18 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/girish" aria-label="Profile: girish">@<bdi>girish</bdi></a> That indeed seems to be the issue which I'm currently trying to solve somehow via IPTables. Unbound is running. I'm NATing the VMs on this machine.</p>
<p dir="auto">I could find some resources on "Split-DNS" but I'm not sure if this is possible with the current unbound / nginx setup.</p>
<p dir="auto">If you happen to have any other workarounds to solve this, please let me know.</p>
]]></description><link>https://forum.cloudron.io/post/49524</link><guid isPermaLink="true">https://forum.cloudron.io/post/49524</guid><dc:creator><![CDATA[mabaker]]></dc:creator><pubDate>Mon, 13 Jun 2022 17:04:18 GMT</pubDate></item><item><title><![CDATA[Reply to OAuth Connection With Nextcloud Not Working on Mon, 13 Jun 2022 16:11:24 GMT]]></title><description><![CDATA[<p dir="auto">The other could also be that unbound is not running. Can you please check Services -&gt; unbound and that it is green?</p>
]]></description><link>https://forum.cloudron.io/post/49519</link><guid isPermaLink="true">https://forum.cloudron.io/post/49519</guid><dc:creator><![CDATA[girish]]></dc:creator><pubDate>Mon, 13 Jun 2022 16:11:24 GMT</pubDate></item><item><title><![CDATA[Reply to OAuth Connection With Nextcloud Not Working on Mon, 13 Jun 2022 16:10:38 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/mabaker" aria-label="Profile: mabaker">@<bdi>mabaker</bdi></a> Are you hosting in an internal network / home? If so, this has to do with lack of <a href="https://en.wikipedia.org/wiki/Network_address_translation#NAT_loopback" target="_blank" rel="noopener noreferrer nofollow ugc">hairpin routing</a> most likely.</p>
]]></description><link>https://forum.cloudron.io/post/49518</link><guid isPermaLink="true">https://forum.cloudron.io/post/49518</guid><dc:creator><![CDATA[girish]]></dc:creator><pubDate>Mon, 13 Jun 2022 16:10:38 GMT</pubDate></item><item><title><![CDATA[Reply to OAuth Connection With Nextcloud Not Working on Sun, 12 Jun 2022 18:30:02 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/girish" aria-label="Profile: girish">@<bdi>girish</bdi></a></p>
<p dir="auto">Thanks for the quick reply!</p>
<p dir="auto">Result of curl: Connection refused. This happens with all apps and terminals.</p>
<p dir="auto">No App and Terminal is able to connect via curl to another domain hosted on the same machine.</p>
]]></description><link>https://forum.cloudron.io/post/49497</link><guid isPermaLink="true">https://forum.cloudron.io/post/49497</guid><dc:creator><![CDATA[mabaker]]></dc:creator><pubDate>Sun, 12 Jun 2022 18:30:02 GMT</pubDate></item><item><title><![CDATA[Reply to OAuth Connection With Nextcloud Not Working on Sun, 12 Jun 2022 17:28:43 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/mabaker" aria-label="Profile: mabaker">@<bdi>mabaker</bdi></a> try a <code>curl https://xxxx</code> from a <a href="https://docs.cloudron.io/apps/#web-terminal" target="_blank" rel="noopener noreferrer nofollow ugc">Web terminal</a> of n8n and see if that works.</p>
]]></description><link>https://forum.cloudron.io/post/49490</link><guid isPermaLink="true">https://forum.cloudron.io/post/49490</guid><dc:creator><![CDATA[girish]]></dc:creator><pubDate>Sun, 12 Jun 2022 17:28:43 GMT</pubDate></item></channel></rss>