Migrating from Windows GUI installation to Docker CLI

Preparing the destination system

1. Check system requirements

2. Install Docker

On Windows we recommend to install version 2.1.0.5. We do not recommend using later versions as a lot of bugs have been reported.

3. The difference between the Windows GUI and the Docker CLI is where each system stores the data. The Windows GUI version stores data in the specified path specified in the storage.path option of the config file: "%ProgramFiles%\Storj\Storage Node\config.yaml", while the Docker version stores data in the subfolder called storage which is automatically (silently) added to the specified path through the --mount option.

For example, if the storage folder specified in the Windows GUI is D:\STORJ, then for the Docker version you should move the content of the D:\STORJ folder to the subfolder storage, i.e. D:\STORJ\storage.

The same applies for Linux/MacOS systems. How do we accomplish that?

We will use the D:\STORJ path of the source Windows system as an example. The destination path depends on OS:

Windows
Linux
MacOS
Windows

In Windows, we will use the same folderD:\STORJ and PowerShell as a terminal.

If you are moving the identity and data to the new Windows CLI host, you need to share the destination folder on that host and follow the guide How to migrate the Windows GUI node from one physical location to another?

We will assume that your Windows user is called user and it has full access to the D:\STORJ folder.

Please replace D:\STORJ with your actual path:

mv D:\STORJ D:\storage
mkdir D:\STORJ
mv D:\storage D:\STORJ\storage
Linux

In Linux, we will use the /mnt/storj/storagenodefolder, where/mnt/storj is the path to the statically mounted disk.

We will assume that your Linux host has IP address 192.168.1.68, the Linux user is called user and it has full access to the /mnt/storj/storagenode folder.

Please replace /mnt/storj with your actual path:

Open a terminal on your Linux system and execute:

mkdir -p /mnt/storj/storagenode/storage

To be able to copy the identity and data from Windows to Linux, we need to have a SSH server enabled on your Linux system. You can google how to do this for your specific Linux distro. For example, for a Debian-based OS it can be done as follows:

sudo apt update && sudo apt install ssh -y
MacOS

In MacOS, we will use the/Volumes/Storj/storagenodefolder, where /Volumes/Storj is the path where the disk is mounted.

We will assume that your MacOS host has IP address 192.168.1.69, the MacOS user is called macuser and it has full access to the /Volumes/Storj/storagenode folder.

Please replace /Volumes/Storj with your actual path:

Open a terminal window (you can find it with the global search function in your MacOS) and execute:

mkdir -p /Volumes/Storj/storagenode/storage

To be able to copy files from the Windows OS, we will use a SSH session to your MacOS. To accomplish this, you need to configure the remote access to your MacOS:

4. Setup port forwarding to your new system.

Preparing the source Windows system

The configuration steps are different depending on the destination OS.

Windows
Linux
MacOS
Windows

If your source and destination OSes are both Windows, you can use the integrated robocopy command-line utility to copy your files across the network or local system: How to migrate the Windows GUI node from one physical location to another?

Linux

Since your source OS is Windows, and the destination OS is Linux, you need to have some Linux-compatible utilities to migrate the identity and data.

We will use WSL and Ubuntu package:

MacOS

Since your source OS is Windows, and the destination OS is MacOS, you need to have some MacOS-compatible utilities to migrate the identity and data.

We will use WSL and Ubuntu package:

Copy identity and data from the Windows GUI storagenode

You can use this guide to migrate the identity and data to a different device: How do I migrate my node to a new device?

Windows
Linux
MacOS
Windows

We will assume that your identity is placed in the default location, i.e. %APPDATA%\Storj\Identity\storagenode

robocopy /MIR $env:AppData\Storj\Identity\storagenode D:\STORJ\identity

The storage data has already been migrated in the previous Preparing the destination system step.

Linux

We will assume that your identity is placed in the default location, i.e. %APPDATA%\Storj\Identity\storagenode

Run an Ubuntu shell, which you have installed in the Preparing the source Windows system step above, and run the command:

rsync -aP /mnt/d/Users/user/AppData/Roaming/Storj/Identity/storagenode/ [email protected]:/mnt/storj/storagenode/identity/

Since you are migrating to Linux, you can still continue running the source Windows GUI node, and while the migration is happening, run this command in the Ubuntu shell to migrate the data:

rsync -aP /mnt/d/STORJ/ [email protected]:/mnt/storj/storagenode/storage/

When the command has completed, run it again a few more times, until the difference is negligible, then stop the Windows GUI storagenode from the elevated Powershell:

Stop-Service storagenode
Set-Service storagenode -StartupType Disabled

Now return to the Ubuntu shell and execute rsync one last time:

rsync -aP --delete /mnt/d/STORJ/ [email protected]:/mnt/storj/storagenode/storage/
MacOS

We will assume that your identity is placed in the default location, i.e. %APPDATA%\Storj\Identity\storagenode

Run an Ubuntu shell, which you have installed in the Preparing the source Windows system step above, and run the command:

rsync -aP /mnt/d/Users/user/AppData/Roaming/Storj/Identity/storagenode/ [email protected]:/Volumes/Storj/storagenode/identity/

Since you are migrating to MacOS, you can still continue running the source Windows GUI node, and while the migration is happening, run this command in the Ubuntu shell to migrate the data:

rsync -aP /mnt/d/STORJ/ [email protected]:/Volumes/Storj/storagenode/storage/

When the command has completed, run it again a few more times, until the difference is negligible, then stop the Windows GUI storagenode from the elevated Powershell:

Stop-Service storagenode
Set-Service storagenode -StartupType Disabled

Now return to the Ubuntu shell and execute rsync one last time:

rsync -aP --delete /mnt/d/STORJ/ [email protected]:/Volumes/Storj/storagenode/storage/

When the data migration is completed, you should remove the storagenode Windows GUI version from the source Windows.

If you did not remove the Windows GUI storagenode instance, it could be automatically started by storagenode-updater service resulting in two copies of the same node in the network. It will be disqualified within a hour because it will not have all pieces since after the migration.

Running storagenode in Docker

Now you can run the storagenode container following this guide: Storage Node.