Skip to main content

What Is My Nextcloud Server Address?

by
Last updated on 3 min read

Quick Fix:
Run occ config:list from the /var/www/nextcloud directory on your server. You’ll get the current server URL right away. If it’s wrong, edit config.php and restart Apache or nginx.

What’s Happening

Nextcloud stores its hosting address in config.php. When that address is wrong—maybe after a router change, ISP switch, or domain move—clients can’t connect. You’ll see errors like “server not found” or “unable to connect.”

How do I find my Nextcloud server address?

Run occ config:list from your Nextcloud server’s /var/www/nextcloud directory.

That command spits out your current server URL. Look for lines like overwritehost => 'cloud.example.com' or overwrite.cli.url => 'https://cloud.example.com'. If the address is wrong, you’ll need to update it in config.php.

Why isn’t my Nextcloud server address updating?

Your clients cache the old address aggressively.

That’s why mobile apps and browsers keep failing even after you fix the server. Clear the app cache or reinstall Nextcloud on your device. Also check if DNS hasn’t propagated yet—give it a few hours.

Step-by-Step Solution

  1. SSH into your Nextcloud server as root or with sudo:
    ssh admin@192.168.1.100
  2. Head straight to the config folder:
    cd /var/www/nextcloud/config
  3. Pull up the current config to see the base URL:
    sudo -u www-data php /var/www/nextcloud/occ config:list
    Scan for overwritehost => 'cloud.example.com' or overwrite.cli.url => 'https://cloud.example.com'.
  4. Open config.php in a text editor (I’m using nano here):
    sudo nano config.php
    Find the overwritehost and overwriteprotocol keys. Update them to match your new address, like this:
    'overwritehost' => 'cloud.example.com',
    'overwriteprotocol' => 'https',
    
  5. Save your changes (Ctrl+O, Enter, then Ctrl+X in nano).
  6. Restart the web server to make those changes stick:
    • Apache users:
      sudo systemctl restart apache2
    • Nginx users:
      sudo systemctl restart nginx

If This Didn’t Work

  • DNS still acting up? Flush DNS on your devices:
    • Windows machines:
      ipconfig /flushdns
    • macOS or Linux boxes:
      sudo dscacheutil -flushcache; sudo killall -HUP mDNSResponder
  • HTTPS errors won’t go away? Add the new certificate to your OS trust store. Or update the certificate in your reverse proxy (Traefik, Nginx, etc.).
  • Mobile app still throwing tantrums? Wipe its cache or reinstall Nextcloud. Those apps remember the old URL like it’s their job.

Prevention Tips

  • Centralize your URLs with environment variables in config.php. Future edits become way easier.
  • Back up config.php every week. Most breakages come from typos in this file.
  • Turn on overwrite.cli.url so CLI tools like occ always hit the right host.
  • Keep an eye on DNS TTL. Drop it to 300 seconds or lower 48 hours before moving domains—downtime shrinks dramatically.

Running Nextcloud on a residential ISP with a dynamic IP? Pair it with a dynamic DNS service like No-IP to dodge address drift. Honestly, this is the best way to keep things stable.

David Okonkwo
Author

David Okonkwo holds a PhD in Computer Science and has been reviewing tech products and research tools for over 8 years. He's the person his entire department calls when their software breaks, and he's surprisingly okay with that.

What Is The Difference Between 1 0 And 1 AWG?What Does AC Loss Mean On ADT System?