Migrating from Windows GUI installation to Docker CLI

Preparing the destination system

Step 1. Understand Prerequisites

CLI Install

If your Windows doesn't support WSL2 we recommend to install version 2.1.0.5. We do not recommend using later versions with Hyper-V 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 path specified in the storage.path parameter of the configuration 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.

The same applies for the orders folder. In the Windows GUI version it's stored in the installation location ("%ProgramFiles%\Storj\Storage Node\orders" by default), the docker version stores orders alongside with data in the data location.

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 orders should be moved from the "%ProgramFiles%\Storj\Storage Node\orders" to the D:\STORJ\orders.

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:

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

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

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?

Then, Step 3. Setup Port Forwarding

Preparing the source Windows system

The configuration steps are different depending on the destination OS.

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?

If your source and destination is the same Windows, stop and disable storagenode service to avoid disqualification. Execute in the elevated PowerShell:

Stop-Service storagenode
Set-Service storagenode -StartupType Disabled
Stop-Service storagenode
Set-Service storagenode -StartupType Disabled

And rename folders to use with docker. Please replace D:\STORJ with your actual path (PowerShell):

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

Copy identity, orders and data from the Windows GUI storagenode

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

We will assume that your identity is placed in the default location, i.e. %APPDATA%\Storj\Identity\storagenodeand you used the default setup location, i.e. orders are located there: "C:\Program Files\Storj\Storage Node\orders"

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

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

Now move orders to the data location:

robocopy /MIR /MOVE "$env:ProgramFiles\Storj\Storage Node\orders" D:\STORJ\orders
robocopy /MIR /MOVE "$env:ProgramFiles\Storj\Storage Node\orders" D:\STORJ\orders

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.

Previous
Migrating from Docker CLI to a GUI Install on Windows