Skip to content

Umbrel - Migrate App

Migrate app from one Umbrel installation to another

NOTE: Easier to follow Umbrel - Backup and Restore then uninstall the apps you don't want on that machine

NOTE: Please copy lines one at a time

ON NEW Umbrel Instance

# Install Umbrel on new Machine
sudo apt-get update
sudo apt-get install curl
curl -L https://umbrel.sh | bash
# Login and create account
# Install app you wish to migrate from Umbrel App Store on new Machine


# Stop Umbrel on both machines
sudo ~/umbrel/scripts/stop

ON OLD Umbrel Instance

cd ~
app_name=nextcloud  # UPDATE

sudo ~/umbrel/scripts/stop
sudo su

app_name=nextcloud  # UPDATE
user_path=`pwd`
# zip folders up
cd $user_path/umbrel/app-data
sudo tar cvpzf $app_name'-umbrel-'$(date +'%m-%d-%Y-%H-%M-%S')'.tar.gz' $app_name
tar_path=`ls $user_path/umbrel/app-data/$app_name-umbrel*`
mv $tar_path $user_path

exit
cd ~
app_name=nextcloud  # UPDATE
sudo chown $USER:$USER $app_name*

# Verify backup exists
ls -al

ON NEW Umbrel Instance

# SCP the files over
remote_user=dentropy   # UPDATE
remote_pc=192.168.2.58 # UPDATE
app_name=nextcloud     # UPDATE
rsync -avzhe ssh --progress -I $remote_user@$remote_pc:~/$app_name* ~
# Use the following command if rsync does not work
# scp -r $remote_user@$remote_pc:~/$app_name* ~

# Make sure Umbrel is stopped
sudo ~/umbrel/scripts/stop

# Untar the files
tar_path=`ls ~/$app_name*`
tar -xvf $tar_path
sudo rm -rf ~/umbrel/app-data/$app_name
mv $app_name ~/umbrel/app-data


# Start Umbrel
sudo ~/umbrel/scripts/start

Fix Nextcloud

With nextcould you will have to go into the machine, change the permissions on the files

sudo docker exec -it nextcloud_web_1 bash
chmod -R 770 .
chown -R www-data .
exit

sudo docker cp nextcloud_web_1:/var/www/html/config .
sudo nano config/config.php

The IP address of the old machine to IP address of new machine

......
  array (
    0 => 'localhost',
    1 => 'rawdebian.local:8081',
    2 => 'not-enabled.onion',
    3 => 'rawdebian:8081',
    4 => '192.168.2.58', /* UPDATE THIS LINE*/
    5 => '10.21.0.1',
    6 => '172.17.0.1',
  ),
......
sudo docker cp ./config nextcloud_web_1:/var/www/html/
sudo docker exec -it nextcloud_web_1 bash
chmod -R 770 .
chown -R www-data .