Skip to main content

What Is My Nextcloud Server Address?

by
Last updated on 3 min read

What Is My Nextcloud Server Address?

Your Nextcloud server address lives in the config.php file on your server, usually at /var/www/nextcloud/config/config.php.

What’s Happening

Your Nextcloud server address is wrong in config.php when clients suddenly stop connecting after network changes.

Nextcloud keeps its base URL in config.php. When that address goes stale—after a router swap, ISP change, or domain move—mobile apps and browsers can’t reach the server anymore. You’ll often see “server not found” or “unable to connect” errors. The system won’t fix this on its own, so you usually have to step in.

How do I find my Nextcloud server address?

Run occ config:list from your Nextcloud server’s /var/www/nextcloud folder to print the current server URL.

This command spits out your full config, with lines like overwritehost => 'cloud.example.com' or overwrite.cli.url => 'https://cloud.example.com'. Those values tell Nextcloud where to point for every connection. If the printed URL is wrong, you’ll need to edit config.php. Want to double-check? Just run sudo cat /var/www/nextcloud/config/config.php instead.

Why isn’t my Nextcloud server address updating?

Your Nextcloud clients cling to the old server address in their caches, so changes don’t take effect right away.

Mobile apps, desktop clients, and browsers squirrel away the server URL to speed up future logins. When the real address changes, those cached values keep sending everyone to the wrong place. Clearing the app cache—or reinstalling the client—usually fixes it. DNS can also be slow to catch up; give it up to 48 hours for full propagation.

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. Peek at the current settings with the Nextcloud CLI tool:
    sudo -u www-data php /var/www/nextcloud/occ config:list
    Look for overwritehost and overwrite.cli.url to confirm what Nextcloud thinks is the right address.
  4. Open config.php in a text editor:
    sudo nano config.php
    Change the relevant lines, for example:
    'overwritehost' => 'new.cloud.example.com',
    'overwriteprotocol' => 'https',
    'overwrite.cli.url' => 'https://new.cloud.example.com',
    
  5. Save the file (Ctrl+O, Enter, Ctrl+X in nano).
  6. Restart your web server so the changes stick:
    • Apache:
      sudo systemctl restart apache2
    • Nginx:
      sudo systemctl restart nginx

If This Didn’t Work

  • DNS still acting up? Clear your device’s DNS cache:
    • Windows:
      ipconfig /flushdns
    • macOS/Linux:
      sudo dscacheutil -flushcache; sudo killall -HUP mDNSResponder
  • HTTPS certificate warnings? Drop the new certificate into your OS trust store or update it in your reverse proxy (Nginx, Traefik, etc.).
  • Mobile app still throwing tantrums? Uninstall and reinstall it, or wipe its cache through your device settings.

Prevention Tips

  • Store the server URL in environment variables inside config.php so future updates are a breeze.
  • Back up config.php every week to avoid losing your settings to a typo.
  • Turn on overwrite.cli.url so command-line tools always hit the correct host.
  • Lower DNS TTL to 300 seconds 48 hours before moving domains—this keeps downtime to a minimum.

Running a dynamic IP? Plug in a dynamic DNS service like No-IP so your address stays reachable without manual tweaks.

Edited and fact-checked by the TechFactsHub editorial team.
David Okonkwo
Written by

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?