Windows Storj node best practices Wiki

I’m trying to compile a little list of some easy to follow best practices for running a Storj node on Windows. None of these steps are mandatory to run a node, but following them helps to rule out potential causes of error, which can be quite a big deal in the long run.

These tips do mostly not depend on each other, so feel free to only follow the ones you deem worthy :wink: This list is not sorted by relevance.

1. Set up time sync

  • Windows does automatically sync its system time periodically, but it is best to use an external software to sync system time more frequently
  • download the NetTime tool from https://www.timesynctool.com/
  • install and set up with your favorite NTP server (or just stick to default settings)
  • make sure the tool is being ran on Windows startup

2. Allocated space overhead
in progress

3. Disable write caching on HDDs

  • when an unexpected power off occurs (e.g. due to a power outage or someone tripping over your node’s power cable), data that is still in your HDD cache or Windows write cache will be lost, which can lead to data corruption
  • disable both hardware and software write cache as follows:
    – right click the drive with your node data on it in Windows Explorer and select “Properties”
    – go to “Hardware”, then “Properties” again (at the bottom)
    – click “Change Settings” to have the “Policies” tab appear
    – uncheck all the caching options
    – save and quit
    hdd_cache_german

4. Move identity files into data directory (to prevent starting with faulty data and getting DQed)

  • when your node starts up without read access to the data directory, it will fail audits and get DQed
  • this might happen when your node data resides on an external drive that is disconnected, but your identity files are still readable because they sit on the internal system drive
  • putting your identity files inside the node data folder prevents the node from starting in case the destination is not accessible
  • when moving your identity files to another location, you have to edit the config.yaml to reflect for that change

5. Set up external online status monitoring (e.g. uptimerobot)

  • you can use an external service to check if your storage node is online
  • a tool like UptimeRobot will check if your node’s network port is open and notify you if that is not the case
  • create an account on https://uptimerobot.com/ (this is not a reflink) and set up node monitoring like so (I use the free option of receiving a Telegram message when the node goes offline):
  • another neat monitoring software to check out is Uptime Kuma, which you can host yourself if that is your cup of tea

6. Avoid USB connections whenever possible

  • while USB connected HDDs work well for scenarios where you plug in the drive and then do copy actions (e.g. backing up files), the connection is often not stable enough to be connected 24/7
  • if you aren’t running your storage node on a limited device like a Raspberry Pi with no SATA ports, you should always prefer connecting drives directly to the motherboard via SATA
  • when still using USB drives, make sure that any power saving options for those drives are disabled in Windows

7. Configure your computer to automatically boot unattended after a power failure

  • the storage node software for Windows runs as a service, so it will start whenever your computer boots Windows - even when you are not logged on
  • however, you should make sure your computer automatically starts after being shutdown unexpectedly (note that this only helps when your PC is being powered off, not when being send into standby!)
  • in your PC’s UEFI/BIOS setup, look for an option called “Power state after power loss” or similiar and enable it:
  • some computers will not boot to Windows when there is no keyboard attached to them - most of the time this can also be fixed by a UEFI/BIOS setting
  • you can test if your machine boots up after a power outage by doing the following:
    – shut down the computer
    – remove the power cable from the PSU (or use the hard power switch on the PSU)
    – wait 10 seconds
    – plug the PSU power cable back in (or use the hard power switch on the PSU)

8. Do not use exchange addresses for payout

  • this has been said a lot, so you might already know it is best to avoid using crypto exchange addresses to receive your Storj payouts :slight_smile:
  • use a wallet capable of ERC-20 token handling and direct your payouts there
  • configure the payout address in your node’s config.yaml by modifying the following section:
#operator wallet address
operator.wallet: 0x11111111111111111111
  • keep backups of the private keys to your address

9. Configuring Windows power saving settings

  • to prevent the computer from going to sleep (thus stopping node operation), disable automatic stand-by in Windows power settings
  • you have to do so for each individual power plan you intent to use

10. log redirection and logrotate


I would love more ideas from you guys, also if someone wants to write up a more detailed explanation of any of those sections that i can edit into the post, that’d be great :slight_smile:

Also, please point out any grammar/formatting/other mistakes so I can fix 'em.

Imho such a list has the potential to go into the official documentation as an extra step after the basic storage node setup.

9 Likes
  1. Switch to Debian with cinnamon. Cinnamon will make the transition easy and Debian is the perfect OS for running a storage node. Are you able to switch? If not the following guide will help you to get the best results out of a Windows storage node but even with all these settings, a Debian node would still be better.

  2. If you have to use external USB drives disable power-saving mode. Oh and you have to modify the power saving settings of your windows OS in general right? Otherwise, it will go into hibernate after some idle time.

  3. Maybe opt in zkSync? It is not a must-have but the operator should know that the option exists.

  4. Email alerts with Grafana? How difficult would that be on Windows?

Best would be to order the list by priority. Email alerts should be right under the uptime robot.

  1. Logrotate. Yes it also works under Windows.

  2. Disable atime? Is that possible with Windows?

3 Likes

This would require a reinstall of my entire machine including Chia, CPU miner, GPU miner…so it might not be for everyone (including me) :wink:

I will consider this when doing the write-up about USB connections :+1:

This is ofc a lower priority, but I might add it in later on.

I would love someone else writing about this.

Will add that asap.

I don’t even know what that’s supposed to be :smiley:

Thanks for your input, mate!

1 Like

disable indexing of the drive used for Storj?

3 Likes

While I don’t do that myself, I might also add it in.

Thank you!

On the 5 Windows machines I checked, drive indexing for data drives has been switched off by default :slight_smile:

i had recently problems, so i configured the windows service to restart after 2minutes more than the checking interval of uptimerobot, so it get the downtime registered when sleeping and missing the alarm.
eg: restart after 23 min and uptimerobot checks every 21 min. so i could minimize the data loss after 4h offline.
automatic updates are not affected by this, an continue normaly. (restart service after 1min maybe to short)

i think storj took recently care of that situation. correct me if im wrong, please :innocent:

1 Like

I think so too, but I do not know if older nodes automatically had their identity files moved.

There is now 1min checks if the storage space is read and writeable. Otherwise node shuts down.

Von meinem/meiner Galaxy gesendet

2 Likes

I have this active actually. The indexing on the HDD i mean. What happens if i turn it off? Never thought about this option.

Turning off drive indexing prevents Windows from creating a file index for faster file search.

Since you do not really need to use the Windows search in your Storj directory, turning it off can free up some system ressources. However, this is only advisable if you use a designated drive for Storj.

1 Like

By default, I turn off indexing on every PC with Windows I lay my hands on. Who needs that useless thing? Also Cortana…

Make exclusions in Windows Defender for your Storj folders or by process name.

1 Like

Have there ever been any known problems regarding Defender?

None that I have experienced. I had several nodes running with it turned on until recently without any issue. Given the number of disk reads/writes, numbers of files, file walker and other Storj disk operations, I didn’t want to contribute any further disk I/O from Defender or Windows indexing the drive.

What do You mean by " 4. Move identity files into data directory" ?

By default, In Windows GUI (aslo in docker earlier i belive?)
the files are in “C:\Users<YourUserNameHere>\AppData\Roaming\Storj\Identity”

Do You mean i should move that inside to “D:\Storj”, wheres all the storage files are?
Or I’am putting the node’s life in danger? i had this like that from 2019, didn’t know thats so crucial, lol, good to know!
Mayby some official comment, confirmation about that part from Storj Inc. please?
Or in 2023 it is obsolete, and mayby node wont start if no access to D:\Storj?

I can move that! and change entry in config.yaml:

“identity.cert-path: C:\Users<YourUserNameHere>\AppData\Roaming\Storj\Identity\storagenode/identit.cert”
and
“identity.cert-path: C:\Users<YourUserNameHere>\AppData\Roaming\Storj\Identity\storagenode/idntity.key”

is that all to change?

Also i have question to " 3. Disable write caching on HDDs"

Is this apply also to Windows disc, often SSD, because on "C:\Program Files\Storj\Storage Node" there is folder “orders” with “.v1” files also some “revocations.db”

I had “Enable write caching on the device” OFF (unchecked) on both C: and D:
Just the C: had always "Better performance(default) ON (checked)

“Better performance” and “write caching” is best for all drives, including Storj drive. “Quick removal” is for usb sticks and external drives that you remove often.
You should disable write caching if you don’t have an UPS. If you have UPS, maybe is better to let it ON. Is there for a reason, increases drive performance.
Moving identity files to storage drive is not a must, is just a good practice advice. In case of drive failing with the identity, you loose the identity files, if you don’t have a backup. If they are located on storj drive, and the drive fails, it dosen’t matter, because you loose the node anyway. And I think you should put there all the files except one, mentioned at identity generation.

1 Like

And since the majority of users do not have a UPS, the default recommendation is disabling write cache.

If you have a UPS, you probably know what you’re doing and need advice like this anyway :slight_smile:

This i pretty much a relict back from the time when Storj did not check for the accessibility of your data drives. Back then, you could get disqualified for starting up a node that could not see its blob folder. This does not longer occur, so I might remove this tip from the wiki…

No, this advise here simple because of

and this become useful when you decided to reinstall Windows but forgot to backup your identity for example. It also useful if you have more than a one node: you do not need to guess where is their data if drive letters have changed (it’s happen relatively often with an external disks).

1 Like