Woke up this morning and felt another explainer comin’ on. As ever, I’m as new to this as most people here so this is just scrabbled together from my experience and from perusing the forums, so please suggest corrections / amendments and additions.

This thread A vault in my home also contains plenty of discussion on this topic and I have duplicated some things here just to have it all in one place.

Update 19 April: there is currently no active test network so you can’t run a vault at present.

What is a vault?

A vault is a store for encrypted file chunks that’s located on your computer, making it part of the SAFE network. Eventually vaults will be used to manage Safecoins, but that’s not ready yet. You don’t need to run a vault to use other aspects of SAFE, just as you don’t need to run a web server to browse the internet.

Why run a vault?

You want to contribute to the project by helping MaidSafe debug the network and / or you are curious as to how it works.

Where is the vault located?

On windows machines it’s C:\Users\ [your_name]\AppData\Local\Temp\safe_vault_chunk_store and for Linux it’s /tmp/safe_vault_chunk_store by default. You can change this location by editing the configuration file safe_vault.vault.config, e.g. changing "chunk_store_root" : from null to Path\to\your_directory

How much space does it take?

5GB by default (although only half of this will be used). You can change this figure by editing the configuration file safe_vault.vault.config and changing "max_capacity": 5368709120 to another figure.

What does a vault look like?

Not much. There is no GUI. On a terminal screen after a successful start-up you will see a readout that includes information about your node (e.g. bc49cf), the section of the network it’s in (eg 101), what type of data chunks are being stored on your machine (Immutable, Appendable, etc), and how much storage space they are using.



If you look at the safe vault chunk store in a file explorer you can see the chunks.



That’s really all there is to see, so don’t invite the neighbours around especially.

What do I need to run a vault from home?

A reasonably fast internet connection with upload speeds of more than 6Mbps. There are loads of free test sites, e.g. http://beta.speedtest.net.

A reasonably powerful CPU.

Probably you’ll need admin level rights to your operating system and router too.

What are the alternatives?

Don’t run a vault Or if you really want to run one use a free virtual server from AWS or Vultr or another cloud provider.

OK, now what?

You’ll need to set up UPnP or port forwarding on your router. Here are instructions for setting up port forwarding on a BT router (I couldn’t get uPnP to work by the way). With other routers External and Internal ports might be called WAN and LAN. The IP address you need is your machine’s internal IP address. Type ipconfig in a terminal and note the IPv4 address of the wireless or Ethernet adaptor as appropriate. Some routers make it easy by inputting this automatically, or displaying the name of your machine instead of the IP.

If you have a BT router then go to 192.168.1.254.



Click on Advanced Settings then click on Firewall / port forwarding. Enter your router admin password and select Port Forwarding. You then need to create a new port forwarding rule for TCP Port 5483. My setup is shown here.



Done that, now what?

Download the vault from here and unzip it. Navigate to the extracted folder safe_vault_v0.xxxx and double click on the safe_vault.exe (Win) or type ./safe_vault (Linux). The program will start in a terminal.

And then?

If all goes well you’ll see something like



After which the network will test your upload speed / CPU for 300 seconds. So long as you pass the tests you’re in .

If all doesn’t go so well the program will close and the terminal screen will disappear (Windows). You’ll probably see something like this on the terminal screen (Linux) or in the log file (Windows). There may be other error messages too.



Troubleshooting

The terminal window closes after a few seconds (Win), or displays some message about being unable to bootstrap / connect (Linux).

Have a look in the log files (called node-string_of_numbers.log) in the safe_vault_v0.xxxx folder and look for the relevant error message. It will probably be similar to the one above.

Probable cause is a Windows / Linux firewall on your machine blocking traffic, or an antivirus program stopping it. This is where it gets complicated as each setup is different. You’re on your own.

Good luck!

Other causes include a VPN running (turn it off while you connect) or a proxy preventing direct access to the Internet.

Also, some routers / ISPS seem to block SAFE traffic, so try editing the configuration file safe_vault.crust.config, changing "force_acceptor_port_in_ext_ep": false to true .

The resource proof test fails

Even if you are sure your bandwidth and CPU are up to the task sometimes the test just fails. You’ll get an appropriate error message in the terminal / log. The answer here is to try again, perhaps switching off other connected devices first.

As @southside notes below, sometimes if you just keep trying it eventually it will go through, as the connectivity issues may be at the network end rather than local. So before you drive yourself nuts fiddling with router and firewalls etc give it a few tries first.