# Domain change nextcloud

**URL:** <https://help.nextcloud.com/t/domain-change-nextcloud/248102>\
**Category:** ℹ️ Support\
**Tags:** server\_migration, nc32, translation\
**Created:** [August 14, 2026, 5:34am UTC](https://help.nextcloud.com/t/domain-change-nextcloud/248102 "2026-08-14T05:34:43Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![gusto](https://help.nextcloud.com/letter_avatar/gusto/32/5_5575768a8748004e209b776fc1b2916d.png) [@gusto](https://help.nextcloud.com/u/gusto)\
**Post date:** [August 14, 2026, 5:34am UTC](https://help.nextcloud.com/t/domain-change-nextcloud/248102/1 "2026-08-14T05:34:43Z")

</div>

> **Support intro**
>
> ## Sorry to hear you’re facing problems. 🙁
> 
> _The community help forum ([help.nextcloud.com](http://help.nextcloud.com)) is for home and non-enterprise users. Support is provided by other community members on a best effort / “as available” basis. All of those responding are **volunteering their time to help you.** _
> 
> **If you’re using Nextcloud in a business/critical setting, paid and SLA-based support services can be accessed via [portal.nextcloud.com](http://portal.nextcloud.com) where Nextcloud engineers can help ensure your business keeps running smoothly.**
> 
> ## Getting help
> 
> In order to help you as efficiently (and quickly!) as possible, please fill in as much of the below requested information as you can.
> 
> **Before clicking submit** : Please check if your query is already addressed via the following resources:
> 
> - [Official documentation](https://docs.nextcloud.com) (searchable and regularly updated)
> - [How to topics and FAQs](https://help.nextcloud.com/c/how-to-faqs/9)
> - [Forum search](https://help.nextcloud.com/search)
> 
> (Utilizing these existing resources is typically faster. It also helps reduce the load on our generous volunteers while elevating the signal to noise ratio of the forums otherwise arising from the same queries being posted repeatedly).

## The Basics

- Nextcloud Server version _32.0.6_
- Operating system and version _debian 13_
- Web server and version Apache/2.4.66 (Debian)
- Reverse proxy and version nginx version: nginx/1.26.3
- PHP version 8.4.16

I haven’t found many instructions on domain translation and nextcloud doesn’t officially support this.

Nextcloud works fine on the domain (fictional) [123.abc.com](http://123.abc.com)  
The directory with nextcloud is stored in  
`/var/www/html/123.abc.com`  
The data directory is connected to another location  
The new domain (fictional) [123.def.org](http://123.def.org) exists  
I can configure reverse proxy and apache

**My goal**  
Move documentroot to a new location (or change the directory name). This shouldn’t be a problem, just a single mv command is enough.  
`/var/www/html/123.def.org`  
The database will remain untouched.

I know that it is important to edit config/config.php  
I only see this to edit

```auto
'trusted_domains' =>
array (
0 => '123.abc.com',
),

'overwrite.cli.url' => 'http://123.abc.com',

```

Is it possible that this is how my procedure would work??

---

<div class="post-metadata">

**Author:** ![wwe](https://help.nextcloud.com/user_avatar/help.nextcloud.com/wwe/32/72963_2.png) [@wwe](https://help.nextcloud.com/u/wwe)\
**Post date:** [August 14, 2026, 6:54am UTC](https://help.nextcloud.com/t/domain-change-nextcloud/248102/2 "2026-08-14T06:54:37Z")

</div>

if you are using reverse proxy you must update it as well. TLS certificates and all related stuff, if you setup federated/trusted Nextcloud it requires attention as well.

In the past I changed the domain of my docker installation without frictions (but I’m the only user without any clients there 😛 ) I would recommend to duplicate the reverse proxy config to a new domain and add new trusted domain to your config as first step, but keep old domain active in the reverse proxy and as trusted domain for some time.. later review reverse proxy logs and analyze if there are still connection to old domain, analyze one by one and once there are no more (relevant) connections you can setup http redirect or decommission the old one.

I believe the biggest problem in domain change is not technical but rather “organisational”. switching domain requires reconfiguration of all clients, if there are shares all of them become invalid etc.. Integrations with external systems like Office etc need adjustments.. at the end it’s more or less the same procedure as you have to follow when you are [Migrating to a different server — Nextcloud 34 Administration Manual](https://docs.nextcloud.com/server/stable/admin_manual/maintenance/migrating.html) #server_migration

---

<div class="post-metadata">

**Author:** ![gusto](https://help.nextcloud.com/letter_avatar/gusto/32/5_5575768a8748004e209b776fc1b2916d.png) [@gusto](https://help.nextcloud.com/u/gusto)\
**Post date:** [August 14, 2026, 8:18am UTC](https://help.nextcloud.com/t/domain-change-nextcloud/248102/3 "2026-08-14T08:18:52Z")

</div>

I am also the only client for my nextcloud.  
I have a domain on [changeip.com](http://changeip.com).  
A lot of free dns servers offer third-level domains for free and these are then abused for phishing.  
That’s why many DNS providers block them.  
I now have my own second-level domain and I want to put nextcloud there as a subdomain.  
I’m not afraid to set up a reverse proxy server (that’s not a problem). Apache2 (where nextcloud runs) is also no problem. There you just need to change the documentroot and servername (+ a few directives).  
However, I’m worried that something will break after these changes.  
However, nextcloud and everything else runs on LXC, so before any change, a backup is enough and I can test.

I’ve already changed a few domains for wordpress this week and it was without any problems.  
I think that nextcloud could also create some kind of tool for various migrations, etc.

---

<div class="post-metadata">

**Author:** ![Kerasit](https://help.nextcloud.com/user_avatar/help.nextcloud.com/kerasit/32/78080_2.png) [@Kerasit](https://help.nextcloud.com/u/Kerasit)\
**Post date:** [August 14, 2026, 11:00am UTC](https://help.nextcloud.com/t/domain-change-nextcloud/248102/4 "2026-08-14T11:00:21Z")

</div>

Hi.

Honostly, it should not be that hard to do a domain change.

Start with adding the new domain as a trusted domain, and make a new Lets Encrypt certificate for the new domain, and change the lines in your webserver that points to the certificate, to point to the new one. That should about everything you need to do on the Nextcloud itself.

Start with this:

```auto
'trusted_domains' =>
array (
0 => '123.abc.com',
1 => 'NewDomain.dom',
),

'overwrite.cli.url' => 'http://NewDomain.dom',

```

Then issue a new certificate.

**If you do not use a reverse proxy that terminates your https**

Comment out the current lines in your enabled https config under sites-enabled of Apache2:

#SSLCertificateFile /etc/letsencrypt/live/123.abc.com/fullchain.pem  
#SSLCertificateKeyFile /etc/letsencrypt/live/123.abc.com/privkey.pem

and add:

SSLCertificateFile /etc/letsencrypt/live/NewDomain.dom/fullchain.pem  
SSLCertificateKeyFile /etc/letsencrypt/live/NewDomain.dom/privkey.pem

Change:  
\<VirtualHost \*:443\>  
ServerName [123.abc.com](http://123.abc.com)

to  
ServerName NewDomain.dom

**If you use a reverse proxy to do the https**  
Change the ServerName in your apache config for the sites-enabled:

ServerName [123.abc.com](http://123.abc.com) to ServerName NewDomain.dom

And then change the certificate used for the port 443 connection in your reverse proxy and update any domains mentioned to the new one.

---

<div class="post-metadata">

**Author:** ![gusto](https://help.nextcloud.com/letter_avatar/gusto/32/5_5575768a8748004e209b776fc1b2916d.png) [@gusto](https://help.nextcloud.com/u/gusto)\
**Post date:** [August 14, 2026, 7:13pm UTC](https://help.nextcloud.com/t/domain-change-nextcloud/248102/5 "2026-08-14T19:13:04Z")

</div>

It seems that according to the instructions I set at the beginning it went fine.  
The only problem that occurred is that office is not working.  
I have my self hosting collabora online. Nextcloud shows that the connection is fine, but the office document is not loading.  
I have to look at the logs tomorrow

Edit

Office won’t load because it was blocked in the web browser. Now everything is fully functional
