It can be an ip address, if you have a static ip. If you’re planning to host this on the open internet and have a dynamic ip (home internet is most likely for this), or static and don’t want to pay for a top level domain you can use a service like noip.com for a free address like “test.ddns.net”
You can also change this after the initial setup in Nextcloud’s config.php as well as as additional domain names/ip addresses that can reach the server.
and just to get this right, if i want to acess it outside of my lan, i cant use my ip? i dont think my ip changes, has been the same as long as i remember
so then do I just put in my IP into that field? and I'm guessing this can just changed later? I'd like to finish setup without spending money, and get a domain later
On FreeBSD the config is located in "/usr/local/www/nextcloud/config/config.php", I'm unsure about Linux I haven't set it up for that. But, in the config you will see a marker for "trusted domains," I've set mine up for local DNS, zero-tier and local IP setup and it looks like this:
Edit: You can see here more info on the config file. Per that documentation on Linux it should be under "/var/www/nextcloud/config/config.php"
Also of note, for internal IP addresses you should set the server to a static IP on your router, that's how I know my server will always be 192.168.50.30. If you're using home internet (not a VPS or business line) you're pretty much guaranteed to have a dynamic IP for public facing connections. For that I like noip.com because they have an app that will auto-update this so you can use the free domain name without needing to know the IP address that will change every few days. Duckdns also does this if memory serves though I think they just had a bash script you ran for this.
Find in your install the config.php it will listed trusted domains (or ips) and you can add as many as you want. I’ll find my config file here in a bit and paste that part of it as an example