# Installing LocalServer as a mirror of MainServer which already hosted online

**URL:** <https://help.nextcloud.com/t/installing-localserver-as-a-mirror-of-mainserver-which-already-hosted-online/108515>\
**Category:** ℹ️ Support\
**Created:** [February 20, 2021, 8:14pm UTC](https://help.nextcloud.com/t/installing-localserver-as-a-mirror-of-mainserver-which-already-hosted-online/108515 "2021-02-20T20:14:17Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![mohd.jarmouzi](https://help.nextcloud.com/letter_avatar/mohd.jarmouzi/32/6_22734026db12803ebb3e059622ac3534.png) [@mohd.jarmouzi](https://help.nextcloud.com/u/mohd.jarmouzi)\
**Post date:** [February 20, 2021, 8:14pm UTC](https://help.nextcloud.com/t/installing-localserver-as-a-mirror-of-mainserver-which-already-hosted-online/108515/1 "2021-02-20T20:14:17Z")

</div>

Hello everyone.  
Hope everyone is well

I Have **MainServer** already installed and hosted Online i need to install **OfficeServer** to be a replica of The **MainServer**.

So Both servers Must have same users and same activities .

**senarios**

1- if USER1 is connected with the **MainServer** and he shared a large file to **USER5, USER6 and USER7**.  
so if these users are connected to **OfficeServer** they can receive the large file from **OfficeServer** over LAN and the **OfficeServer** tells the **MainServer** that the Large file is already received and downloaded by USER5, USER6 and USER7 so no need to download the large file again once they are outside the office and connected to MainServer .

2- if USER5 shared an EXCEL from OfficeServer to USER1 then the USER1 Can download it and make any changes on it from MainServer.

The main request is that All activities on any server is replicated on the other one.

**Note … MainServer is installed on (Webhost provider) … and OfficeServer installed on ubuntu server; both servers are using mysql database and OfficeServer has a public static IP address**

The purpose of this installation is to reduce the internet bandwidth usage so the users can download all shared files via LAN - from the LocalServer.

Please help me if this possible .

Best regards.

Mohammed Al-Jarmouzi

---

<div class="post-metadata">

**Author:** ![tflidd](https://help.nextcloud.com/letter_avatar/tflidd/32/6_22734026db12803ebb3e059622ac3534.png) [@tflidd](https://help.nextcloud.com/u/tflidd)\
**Post date:** [February 20, 2021, 11:57pm UTC](https://help.nextcloud.com/t/installing-localserver-as-a-mirror-of-mainserver-which-already-hosted-online/108515/2 "2021-02-20T23:57:02Z")

</div>

There is the concept of federated sharing: [Configuring Federation Sharing — Nextcloud latest Administration Manual latest documentation](https://docs.nextcloud.com/server/20/admin_manual/configuration_files/federated_cloud_sharing_configuration.html)

But it does not have a cache, the files remain on the file owner’s storage.

There are already a few topics about this:

> [@Mirroring of two nextcloud server](https://help.nextcloud.com/t/mirroring-of-two-nextcloud-server/52564):
>
> Hello Community, this is the first time, that I have a problem with nextcloud, that I can’t address myself. I want to mirror two instances of nextcloud on two different hardware servers in two different locations. Is this possible and in which way should I do this. Is federated cloud the right way or is there a different approach, that makes this easier to achieve? Thanking you in anticipation.

> [@Nexcloud server sync](https://help.nextcloud.com/t/nexcloud-server-sync/2165):
>
> How can I synchronize two nextcloud server together ?

> [@How to Sync two NextCloud Server from two different site with INTERNET/VPN connection not always available?](https://help.nextcloud.com/t/how-to-sync-two-nextcloud-server-from-two-different-site-with-internet-vpn-connection-not-always-available/101037):
>
> SCENARIO: two NextCloud servers in two different site connected in VPN through internet connection that is not always available, users read and write only on the server of their site. What can be the alternative to the procedure occ files:rescan to be able to synchronize also the data present only in the DB such as shares and permissions ? I searched in the forum and on the internet but there is talk of successful configurations only for clusters (MariaDB Galera and SyncThing) and load-balanc…

> [@LAN sync please](https://help.nextcloud.com/t/lan-sync-please/512):
>
> just like dropbox has, lan sync from one client to another so internet usage minimized. have a machine only turned on occasionally for specific items that I also sync, and if its been a bit sucks having to sync everything from server when client literally 4 feet away is already synced.

> [@Remote Server Replication](https://help.nextcloud.com/t/remote-server-replication/8205):
>
> Asynchronous replication is generally a pain and often a failure, but it is dead handy. This is not a HA or standard cluster method just a simple and raw method to replicate servers. Maybe just aimed at local Lan and public cloud replication of two servers, as I am aware the more you push this the more likely a replication conflict is likely to occur. It would be handy to be able to use the speed of a local lan with a local server and that replicates to a cloud server, depending where you con…

---

<div class="post-metadata">

**Author:** ![mohd.jarmouzi](https://help.nextcloud.com/letter_avatar/mohd.jarmouzi/32/6_22734026db12803ebb3e059622ac3534.png) [@mohd.jarmouzi](https://help.nextcloud.com/u/mohd.jarmouzi)\
**Post date:** [February 21, 2021, 2:07am UTC](https://help.nextcloud.com/t/installing-localserver-as-a-mirror-of-mainserver-which-already-hosted-online/108515/3 "2021-02-21T02:07:27Z")

</div>

Dear tflidd,  
thanks for your reply.

in my case if i go for Federation Sharing configured on MainServer then i will need my officeServer to be online 24 hours , if it goes off then the links of the shared files will be unavailable.  
users activiyies on the Federation Sharing over LAN wont be replicated on mainServer users activities.

the scenario on the bellow topic is what i need to do but its not solved yet ☹

# [How to Sync two NextCloud Server from two different site with INTERNET/VPN connection not always available?](https://help.nextcloud.com/t/how-to-sync-two-nextcloud-server-from-two-different-site-with-internet-vpn-connection-not-always-available/101037)

---

<div class="post-metadata">

**Author:** ![tflidd](https://help.nextcloud.com/letter_avatar/tflidd/32/6_22734026db12803ebb3e059622ac3534.png) [@tflidd](https://help.nextcloud.com/u/tflidd)\
**Post date:** [February 22, 2021, 5:06pm UTC](https://help.nextcloud.com/t/installing-localserver-as-a-mirror-of-mainserver-which-already-hosted-online/108515/4 "2021-02-22T17:06:39Z")

</div>

> [@mohd.jarmouzi](#):
>
> in my case if i go for Federation Sharing configured on MainServer then i will need my officeServer to be online 24 hours , if it goes off then the links of the shared files will be unavailable.

Well, I just showed you what is available now and there is more discussion of having a feature to cache data or even mirror servers. I don’t know if someone is working on this but I wouldn’t expect a solution soon. You could use other solutions to sync data, e.g. with syncthing and then use the synchthing sync storage as external storage to Nextcloud, so you can give others access via webinterface. Such solutions with other sync software and using as third-party storage in Nextcloud is probably the closest you can get at the moment.

---

<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:** [December 13, 2024, 6:53am UTC](https://help.nextcloud.com/t/installing-localserver-as-a-mirror-of-mainserver-which-already-hosted-online/108515/5 "2024-12-13T06:53:18Z")

</div>



---

<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:** [December 13, 2024, 6:53am UTC](https://help.nextcloud.com/t/installing-localserver-as-a-mirror-of-mainserver-which-already-hosted-online/108515/6 "2024-12-13T06:53:19Z")

</div>


