How to access nextcloud in other gadget? My set-up is windows 10 wsl ubuntu 20.04lts

I followed this tutorial ([Tutorial] Nextcloud on WSL2 (Windows 10 20H2)) and i successfully install owncloud. My only problem is i can’t access owncloud in other computer/gadgets. I’m total newbie here i might need some spoonfeeding on what specific command should i input. Attached is my config.php settings. I’m confused what ip to use since my pc ip is and if i use ifconfig it is inet . Thank you for your input.
$CONFIG = array (
‘instanceid’ => ‘’,
‘passwordsalt’ => '
‘secret’ => '
‘trusted_domains’ =>
array (
0 => ‘’,
‘datadirectory’ => ‘/var/www/nextcloud/data’,
‘dbtype’ => ‘mysql’,
‘version’ => ‘’,
‘overwrite.cli.url’ => ‘http://localhost’,
‘dbname’ => ‘nextcloud’,
‘dbhost’ => ‘localhost’,
‘dbport’ => ‘’,
‘dbtableprefix’ => ‘oc_’,
‘mysql.utf8mb4’ => true,
‘dbuser’ => '
‘dbpassword’ => ‘****’,
‘installed’ => true,
‘app_install_overwrite’ =>
array (
0 => ‘dropit’,
1 => ‘files_external_ipfs’,

Your other devices should be configured to connect to Nextcloud using your PC’s IP address. The ‘172.20…’ address is on a virtual network inside your PC, so the others don’t know how to reach it. The PowerShell script in the tutorial should make your computer pass on the connections from the other devices through to Nextcloud on that address.

Just to be sure things are working right, how are you currently accessing Nextcloud on your PC?
Do you enter (or localhost), or the address? Does it also work if you enter your PC’s IP address ( or your PC’s hostname instead?
If it doesn’t work on the PC’s address or hostname, you can add those to Nextcloud’s list of “names I might be called by” by editing your nextcloud.conf, like so:

That way, Nextcloud won’t say “you asked for, so how did you end up here!?”, and block any connections from other devices.

In the skript, do i need to change this:
$addr=‘’; into my ip address, $addr=‘’; ?

I am accessing it through localhost (http://localhost/index.php/login) and I cannot access it through other addresses. I tried this but still not working. I’ll try to work around these things mentioned.
‘trusted_domains’ =>
array (
0 => ‘’,
1 => ‘’,
2 => ‘localhost’,

I think that’s the address it should get, but you shouldn’t need to set it. ‘’ is shorthand for ‘listen on all addresses’, in this case.

The script is definitely what’s wrong/missing here. I’d recommend you find a way to tell whether it’s running properly - whether by copy/pasting it line-by-line into a PowerShell prompt, or by inspecting the traffic rules that are in place after it finishes running. If you can’t be sure it’s working, you can look up documentation for the commands in use or ask the author of the tutorial.