OFFLINE Will it be a Quicky? (run 4)

Don’t we already have an install script? :slight_smile:

Btw, if you wanted to write a Powershell script, we need one for a native Windows installation.


You mean ?

This is a wee wrapper that got out of hand… I’ll put it up on github later but something like this so far


# script to set up comnet - community testing for the SAFE network


# get the latest versions

# make paths configurable

# add warnings

# if we set the same port for everyone, what happens?

# write a Powershell script to set up a Linux VM for Windows users

echo "================================================================================================"

echo "This script is only for 'vanilla' linux systems on standard x86-64 PC hardware"



PUBLIC_IP=$(echo `curl -s`)

NODE_PORT= #TO DO if we set the same port for everyone, what happens?











echo "This script will install comnet - community testing for the SAFE network"

echo "comnet files will be installed in "$SAFE_ROOT

echo "log files will be stored in "$LOG_DIR_PATH

#echo "data files will be stored in "$DATA_DIR_PATH



echo "Your public IP address is " $PUBLIC_IP


# clean up from last testnet

rm -rf $SAFE_ROOT

if [ -d "$TMP_DIR" ]; then rm -Rf $TMP_DIR; fi

# grab latest sn_node and prepare it for use

mkdir $TMP_DIR && cd $TMP_DIR

wget -q $SN_NODE_ASSET

#TO DO add code to extract the current version nos

tar xvzf sn_node-0.51.7-x86_64-unknown-linux-musl.tar.gz

mv sn_node sn_node-0.51.7

chmod +x sn_node-0.51.7

chown $USER:$USER sn_node-0.51.7

# get sn_cli


curl -so- | bash

mkdir -p $NODE_BIN_PATH

cp /tmp/comnet/sn_node-0.51.7 $NODE_BIN_PATH/


# Use a symlink so it is easy to keep various versions of sn_node around to easily switch if req'd

#Or maybe not? - skip the symlinks to KISS

ln -s sn_node-0.51.7 sn_node

# set up the network

safe networks add comnet $COMNET_CONN_INFO

safe networks switch comnet

safe networks

safe networks check

# Add a node

$NODE_BIN_PATH/sn_node \

--skip-auto-port-forwarding \

--log-dir $LOG_DIR_PATH \

--public-addr $PUBLIC_IP:$NODE_PORT

What happens if several nodes attempt to connect to one section at the same time all with the same port no?
I need to study the existing a bit closer perhaps.

1 Like


If you were going to write a Powershell script, you could write one to do a native Windows installation, rather than setting up a VM. We need to support native Windows installations, that’s a big missing piece just now. You could PR that to the main repo.

1 Like

Also btw, the node install command is fixed in the recent release, so there’s no need to set that up ‘manually’ any more.

If you wanted to have different versions of the node, there’s also an argument on the install command for specifying the path.


I don’t want to write a Powershell script but I know one will be needed.
On the todo list for later today is to install Kali on my old Thinkpad so I’ll maybe dual-boot that if I can find a Win10 install .iso


Ok cool. All I’m saying is, it would be useful if the script installed sn_node directly on Windows, rather than setting up a VM, since that’s something we need for the main repo and it’s a scenario we should support. It’s a poor experience for Windows users if they need to setup WSL and whatnot.


so simply safe node install will automagically do whats req;d?

1 Like

Yeah, and there’s --node-path and --version arguments for that, if you wanted to have multiple nodes sit alongside each other, for whatever reason.


Indeed, thats why I need a Windows box lying around rather than reluctantly firing up a VM if I have no other choice than to sully my soul interacting with M$ windows


On second thoughts perhaps we should forget about that just to KISS?
This is to be a script for a relative n00b to quickly and relatively painlessly get as far as PUT/GET cat and dog on the community nets

Of course, having declared all those vars at the top, if you chose not to accept the defaults it could be quite flexible. But anyone who needs that flexibility probably doesnt need this script… Hmmm


I absolutely agree with this. Many things are out there in principle - fancy installers for multiple platforms, auto-completion, graphic design for telephones, documentation, and what have you. It’s just that in practice they don’t work, or are out of date.

The reality is forum members can’t even put/cat a little .gif and/or have a network stay up for more than a couple of hours. We need something practical and working, no matter how small. “Hello world!”, ping network.


I was pondering this same thing recently: create a few VMs in QubesOS for a local network and use a VPN to give each a different IP. Presumably it would just be a matter of putting those IPs into the config file @chriso? (In case you’re not familiar with it, QubesOS allows you to run independent VMs on the same desktop OS).

1 Like

Yeah, quite possibly. I’ve no idea how the network deals with that kind of virtualised networking though. Does it work ok when you run nodes from more straight forward VMs?

I’ve not tried it for a while TBH. It used to be OK - mostly - back in the day

1 Like