# Successfully moved to a new server!

**URL:** <https://forum.yunohost.org/t/successfully-moved-to-a-new-server/37467>\
**Category:** Tutorials\
**Tags:** migration, english\
**Created:** [June 21, 2025, 7:27am UTC](https://forum.yunohost.org/t/successfully-moved-to-a-new-server/37467 "2025-06-21T07:27:06Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![gcollin](https://forum.yunohost.org/user_avatar/forum.yunohost.org/gcollin/32/7127_2.png) [@gcollin](https://forum.yunohost.org/u/gcollin)\
**Post date:** [June 21, 2025, 7:27am UTC](https://forum.yunohost.org/t/successfully-moved-to-a-new-server/37467/1 "2025-06-21T07:27:06Z")

</div>

ple relentlessly adding features to #yunohost and supporting apps, I managed to move my self-hosted family site to a new server !

**The situation**  
I am happily hosting the photos, emails and documents of my family into a server managed by #yunohost.

I am doing this to keep control of everything that matters to me, avoid seeing my personal content being used wrongfully, and as well avoiding the risk of losing everything in case my account gets banned or locked by the gafams.  
To be honest, I am doing this as well because as an IT guy, it’s quite fun to do it 🙂

I’m leveraging an online server in a public hosting company, and installed Debian & yunohost there. Then installed yunohost managed apps I needed. On top of that, I’ve migrated a few of my projects (dont-code, cac-proxy, ng-xtend ) to yunohost and I’m maintaining mongo-express as well.

Sadly, this server is limited in disk size (only 1TB) and speed (only HDD, no SDD). So I decided to migrate everything to a new, more powerful server.

**What do I manage through yunohost ?**  
There is enough material for another thrad, but after trying various solutions, I found yunohost was really covering my needs, especially the handling of multiple domains and subdomains, the number of already packaged applications and the fact that yunohost manages the full lifecycle of an application, including upgrades & backups.

So, what apps do I have installed ?

_Nextcloud_  
It’s the main application here, taking care of photos/videos, all documents, private or shared amongst the family. This can be detailed in another thead but basically with Memories plugin, the Nextcloud mobile apps, the linux Nextcloud client, onlyoffice / collabora office, great support for sharing, this is good enough to replace Google drive & Google Photos.  
I have around 300GB of pictures / videos there, which are automatically synchronized into my laptop (realtime backup) and backup into another server every week (thanks to yunohost backup features).

_Email:_  
I bought my own domain name, and yunohost simply enable me to use it for my emails and the ones for my family. Thanks to it’s comprehensive Diagnostic tool, it helps you configure properly domain records and avoid any issues with spam.  
I was scared a bit scared at first to use my own email domain, but didn’t face any issues or rejections. Now it’s my main email account.

_OnlyOffice_  
_Collabora Online_  
I couldn’t decide which application to use for editing documents, so I installed both. They are very well integrated with Nextcloud, all documents are stored in it, can be shared, and so on…

_Sogo_  
For my emails, yunohost runs Imap / pop3 server by default so I most of the time use k-9 mail on my smartphone (it works very well), but I wanted to be able to use a webmail as well. Hence I installed Sogo in yunohost and it immediatly worked with multiple users and email accounts. Simple, nice and it works well !

_Borg Backup_  
This one is crazy ! I bought a small online backup disk, with borg server installed there, and thanks to the yunohost integration with Borg, I automatically backup all my apps every week there.  
Borg only stores the modifications, so the backup size stays manageable. And Yunohost backups each application separately, hence you can restore them one by one.

_Adguard Home_  
My home is now using Adguard as a “ad-less” dns server, effectively blocking a lot of them. My wifi router is connected to it, and around 30% of the domain name requests are being cancelled by Adguard.

_Matomo_  
For my opensource projects, dont-code and ng-xtend, I found Matomo is very good at providing statistics. It’s a great replacement of Google Analytics.

_Cors-proxy_  
A small proxy I’ve developed and migrated to yunohost. It is used to bypass cors barriers and connect one web application to another server. I’m using it to get prices of shops for the Dont-code commerce application.

_Dont-code services_  
A set of Java developed services allowing Dont-code web applications to manage projects and their data in a Mongo database. I have installed multiple instances of them, each mapped to a different domain.

_MongoExpress_  
With it you can access your Mongo database, which I’m using for Dont-code project & data. This is another application I’m maintaining for yunohost.

_Monitorix_  
Keep monitoring your server, displays any kind of graph you need, and alerts you when something goes wrong. Very nice utility.

_Several static websites_  
I have several static websites installed as well, thanks to “my web app” application in Yunohost. Each are managed independently with their own sftp access, backups

**How to migrate them to the new server ?**

Despite all the help provided by #yunohost, you need a bit of planification for the migration to be successfull.  
Neither do you want to lose emails or photos of any of your family members, nor lose backups. Additionally, you want to keep the nextcloud mobile app working with the new server, and so on…

In a nutshell, the overall process I followed was this one:

- First, configure the router to NOT use your adguard instance anymore. You don’t want to lose internet access in the middle of the migration !
- Enable SFTP access to your admin user in the source server. This is done in the user configuration panel of yunohost admin. You’ll use this to transfer backups to the new server.
- Then, install yunohost in the destination server. Run the postinstall configuration with a random domain name, and the same admin user / password account. This will be replaced by the system restore, but that will simplify a lot the migration.
- Backup / restore system settings
  - In yunohost admin interface, go to Backup / Local / new local backup. Here uncheck everything except “system config”.
  - Once the backup done, you should see it in /home/yunohost.backup/archives directory.
  - From the new server, SFTP to the old server, and simply copy this archive at the same location
  - Then in the new server admin console, you’ll see the backup. Just restore it.
  - I then restarted the new server, I’m not sure it was necessary, but I found it safer.

- Now you’ll see the new server have all users, domains configured !  
But the domains are still mapped to the IP address of the old server, so everything is still run by the old server. It’s only when changing the dns info in your domain registrar that the new server will be used.

The good thing is that you can switch any domain independently, allowing for a progressive upgrade. The only difficulty is with the emails, if you are receiving them from multiple domains, there may be some errors while a domain is migrating.As it’s just a family server, I thought it was ok with some hiccups on emails.

- You can then do the same migration / restore with the accounts data (home/users) of your users. I know during the migration nobody in my family will update files in their home directories, so it was safe to do it without particuliar precautions. This can be much more tricky if you have unknown users.
- Then, I migrate applications by domain / subdomain
  - For each app in a single domain/subdomain, backup them up locally using yunohost
  - SFTP them to the new server
  - Restore them in the new server
  - Change the DNS settings in your registrar to the IP address of the new server.

This works well for most of applications, where between the backup / restore and the dns change takes effect, you have almost no data written. But for emails and Photos, you don’t want to lose anything, so you need to take extra steps.

- For emails:  
You can control when you send emails, but anyone can receive emails at anytime. If the old server is receving emails during the migration / restore process, then you may loose them.  
To avoid this, I just stopped the email service in the old server:

- For photos:  
This one was the scariest, as I needed to move 300GB of data and migrate Nextcloud at the same time, with multiple applications connected to it (Nextcloud mobile apps, my laptop realtime backup…)  
Thankfully, both Nextcloud, yunohost and borg backup helps you there !

- Last step:  
Not to be forgotten! The server is backs up to a Borg instance, and you have to make sure it’s still working.

**Conclusion**  
In less than a few hours (spanning over a week-end), I could just migrate all my apps and data to a new server, with everything working again (but faster !).  
This required some IT knowledge, even when everything goes smooth (which was not the case for Nextcloud), but overall this was much easier than expected.

And knowing I could get support from the yunohost community very quickly, made me confident to start this journey. I wanted to avoid this unless I was really in trouble, and let them work on their incredible solution !

I’ll be happy to precise some unclear points if asked to, but I hope this post-migration thread will help people running their yunohost services.

---

<div class="post-metadata">

**Author:** ![GoustiFruit](https://forum.yunohost.org/user_avatar/forum.yunohost.org/goustifruit/32/4281_2.png) [@GoustiFruit](https://forum.yunohost.org/u/GoustiFruit)\
**Post date:** [June 21, 2025, 2:51pm UTC](https://forum.yunohost.org/t/successfully-moved-to-a-new-server/37467/2 "2025-06-21T14:51:26Z")

</div>

Thanks for detailing the whole process. I’m bookmarking this, will be helpful one day.

---

<div class="post-metadata">

**Author:** ![celinems](https://forum.yunohost.org/letter_avatar_proxy/v4/letter/c/b3f665/32.png) [@celinems](https://forum.yunohost.org/u/celinems)\
**Post date:** [June 23, 2025, 12:40am UTC](https://forum.yunohost.org/t/successfully-moved-to-a-new-server/37467/3 "2025-06-23T00:40:11Z")

</div>

Same here. Thanks a lot!

---

<div class="post-metadata">

**Author:** ![wbk](https://forum.yunohost.org/letter_avatar_proxy/v4/letter/w/e0b2c6/32.png) [@wbk](https://forum.yunohost.org/u/wbk)\
**Post date:** [February 12, 2026, 7:32pm UTC](https://forum.yunohost.org/t/successfully-moved-to-a-new-server/37467/4 "2026-02-12T19:32:49Z")

</div>

Thanks for taking the time to elaborately describe the steps you took during the migration! I’m sure that especially the note on Unicode characters in the Memories app will come in handy in the future.

I’d like to add, that Yunohost has a built in feature to assist in migrations. The process looks the same as above, but with some tweaks:

- On the new server:
  - Install Debian
  - Install Yunohost: `curl https://install.yunohost.org | bash`
  - \*Do not run `postinstall`\*when the system tells you

- On the old server, run a full backup:
  - Not only apps or only system, but both. Via CLI: `yunohost backup create`
  - Take note that some apps (Nextcloud comes to mind) _do not_ take data backups (so the app and config, but no photos). There’s info about that on the forum and in the documentation.

- Copy the backup to your new server: `scp /home/yunohost.backup/archives/20260211-223700.* root@newserver.tld`
- On the new server, instead of `yunohost postinstall`, run the restore of your backup:
  - 

```auto
yunohost backup restore 20260211-223700

```

- DNS
  - Can be changed by hand
  - But if your DNS provider is supported, you can have Yunohost do the work for you
  - You won’t be able to conveniently log in to your server via the domain name until after certificates are set up, use the IP instead to access the admin panel.

When using it, take note of downtime or updates to the old server while migrating, as described above. I’d put the old server in maintenance mode / offline mode just before making the backup

Email infrastructure is quite robust: it was designed and built before spam existed, but also before people (and servers) were online 24/7. Emails will be kept by sending mail servers for a couple of days; they will retry delivering the mail a n umber of times.

Happy Yunohosting!
