Node disk configuration


after succesfully compiling the api and node on the raspberri pi4, I’m the happy owner of a raspberry pi safe node. ( offline now, waiting for v4 )

The pi4 here has limited disk space : 32 Go as a sd card. My /home is on the sdcard.

My understanding is that the node files are stored in ~/.safe , so the node ends up with what is left on the sd card. ( cargo eats a lot of space for compilation, btw )

So, my question is : how would I specify a directory on an exernal drive ? I have a 500 gb usb3 disk that can stay mounted, but I don’t find a config file to specify where the node files go.
Or maybe simply tricking with a symlink ?

Thank you !


If you run sn_node directly, you can specify --root-dir parameter.
Do not know if it possible to do so with safe command.


We yet don’t have flags exposed in CLI so this can be achieved easily, moving all storage to a different place, using the components individually it’s possible I think but tedious at the moment I’d say.

I think your best option for now is to just mount your 500 gb usb3 disk on ~/.safe location ?


That sounds easy and effective


Hi @nice

I had a similar issue with my ubuntu VM. A symlink worked fine if you’d rather do that than hard mount the filesystem onto ~/.safe. In my case, I wanted the additional space to be available to other users, so it worked better to create a directory on the external disk and link to it than hard mount.


hi @futuretrack ! thank you for the input.
I like it , indeed, as it would permit to leave other parts of the dd available for other stuff.
I suppose that will be the solution for me.

1 Like

my start scripts looks like this:

  • 10MiB max capacity
  • the bootstrap node list might (will?) need an update to work with the next test net
  • only log level info (debug is the default if started from the safe executable, right?)
  • logs to stdout instead of a file (you could dump it into a file by adding >> node_logs to the command or calling the start script with it)
#!/usr/bin/env bash

RUST_LOG=info ./sn_node --root-dir /data-fast/sn_node --max-capacity 10485760 -h '["","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","",""]'

Small tip: instead of passing this long list of socket addresses you could use:

-h $(tr -d ' \t\n' < ~/.safe/node/node_connection_info.config)

where .safe/node/node_connection_info.config is the file downloaded from and normally used by clients.

EDIT: Corrected tr command:

  • can be launched from anywhere, not just the home directory
  • filter out spaces and tabs in addition to \n

I just found out this possibility:

--max-capacity $(numfmt --from auto 10Mi)

It is longer but clearer and less error prone. This is even more obvious with bigger sizes:

$ numfmt --from auto 2G

Who can check visually that the number of digits is right? In any case not me!

In Rust we can use 2_000_000_000 syntax to make it readable, but we cannot use it as a program argument.


I just noticed that the Gnome terminal can help. Highlighting a number and right-clicking shows you a calculation.

1 Like