Why would we want to use ZeroTier?
ZeroTier has two main advantages. Firstly, it allows two computers on different networks to "see" one another without the need to configure the associated routers. The second advantage is that the communication between computers takes place using IP addresses normally reserved for private networks—that means the actual address and port of the computer are not visible to other users, thereby greatly enhancing security.
There are any number of ways in which you might choose to use a ZeroTier connection with your SOLO, but this tutorial uses one typical situation as a case study.
Case study: the International Astronomers Club
The International Astronomers Club is a group of hobby astronomers, based in several countries, who have come together to purchase a telescope housed at a remote observatory in Spain.
They have just installed their CloudWatcher and SOLO, which is connected to the telescope's network with the IP address 192.168.178.53. The group accesses their telescope's network from their home countries via the single IP address of the telescope hosting facility, 123.123.123.123, and the SOLO has been allocated port number 12345.
In order to view the output of the SOLO, each member types 123.123.123.123:12345 into their web browser. This works well, but several members of the group are concerned that revealing the IP address and port number of the SOLO may attract the attention of hackers, so they decide to install ZeroTier on their SOLO. The following sections describe the steps they take.
Registering a network with ZeroTier
You may be a bit daunted at the prospect of creating a network with ZeroTier, but don't worry—the whole procedure should take less than five minutes. Just follow these steps:
- To begin, go to the home page of ZeroTier at zerotier.com.
- Click on Sign Up to reach the sign-up screen.
- Create an account, or log in using one of the options on the right. This will lead you to the Create Network page.
- Click on Create A Network.
- Congratulations! You've created your first network. It was as easy as that.
Before going any further, take a moment to note that your network can have up to 50 members (more are available with a paid option). Also note the Network ID and the Name—we'll come back to these later. For now, click on the light grey area to reach the next screen.
- At the top of the page you can see the Network ID again in two places. This is the most important thing to note, so take a screenshot or photo, as you'll need this number to allow your devices to join the network. Think of the Network ID as a form of password: it defines the network but, unlike a password, it cannot be changed. Only give the Network ID to people you trust!
When you create a network, ZeroTier allocates a random name—in this example it has been changed to reflect the name of the group in the case study. You can add a description if you wish. You will probably want to leave the Access Control set to Private, although this can be set to Public if required. Finally, scroll down to the Advanced section.
- The default IP address range would work, but for simplicity it's suggested you change it to one of the 10.xxx.xxx.* ranges (the top row), as illustrated. This is sufficient for all users of the free account, as it gives 256 possible addresses and the free account is limited to 50 users.
The IP address range will be the address visible when you use ZeroTier, and we'll come back to it later on. For now, when you're ready, move on to the next section.
Installing the ZeroTier software on the SOLO
It's time to install the ZeroTier software on the SOLO. The following steps may seem a little complicated if you are not used to working with Unix-style commands. The SOLO is, in fact, an optimised Linux computer. If you are used to working with Linux, that's great; otherwise, simply type in the commands exactly as described. You can always search for the meaning of the commands if you are unsure what you are doing, and if you really get stuck, just drop a line to support@lunaticoastro.com and we'll be there to help you.
- To start, you'll need a terminal program. This example uses the Windows PowerShell command prompt, but any terminal program will do. Right-click on the Windows icon and select Windows PowerShell.
- Enter the command
ssh solo@IPaddress-of-your-SOLO:
- Enter the password
cloudwatcher.
- The SOLO ships with the disk write-protected. It is important to make the disk writeable with the command
rootrw.
Do not proceed unless this step has been carried out.
- Now enter the command:
curl https://install.zerotier.com | sudo bash
The command is taken from the download section of the ZeroTier website. If you go there, you'll see that the command looks a little different and begins with
curl -s. The "-s" tells the SOLO to install the package "silently" (without text)—this means you won't see any error messages. The most likely error is that the drive is still write-protected; if so, repeat the previous step.
At this point ZeroTier should be installed on your SOLO. Now comes the moment of truth: connect to the ZeroTier network created earlier, using the Network ID (you did note it down, didn't you? If not, no need to worry—simply log into your ZeroTier account and you'll be directed to the page with your network listed).
- Type the command:
sudo zerotier-cli join Your-Network-ID. If you've been successful, you should be rewarded with a screen like this:
Activating the SOLO with ZeroTier
So far, three things have been done:
- Created a network with ZeroTier.
- Installed the ZeroTier software on the SOLO.
- The SOLO has joined the ZeroTier network.
You might be tempted to think we're finished, but there are a few more steps to go. When using ZeroTier, it's not enough to join a network—every user must also be authorised to use it. To do this, go back to the ZeroTier network and log in.
Click on the grey area to enter the Admin page and scroll down to the Members section. The SOLO will have appeared, allocated an address such as "d28af2bfa1". This isn't terribly useful on its own, so take the time to complete the short name and description—later, all of the devices of the International Astronomers Club will appear here, so it's very important to know which device is which. When you've done that, click Auth to authorise the SOLO.
You can see that on the left there is a green line next to the device, indicating that it has been authorised. To the right is the address that ZeroTier has allocated to the SOLO—this is now the IP address you will use to reach the SOLO on the ZeroTier network.
All that remains is to add at least one other device to the network. This is the subject of the next section.
Installing the ZeroTier software on the viewing device
We left our SOLO feeling rather lonely on the ZeroTier network—we need to add one or more devices so it has someone to talk to! At the moment, the International Astronomers can all view the SOLO web page using the IP address of the hosting facility and a port number: 123.123.123.123:12345. However, we want to use the number created in the previous steps: 10.147.18.61. If we type this into a web browser at this stage, nothing will happen—that's because we only have one device on our network. Each member of the International Astronomers Club has to install the ZeroTier software on the device they will use to view the SOLO web page.
The Download section of the ZeroTier website has links to software for the majority of current devices, from phones to desktop PCs, as well as, of course, SOLOs!
Due to the number of choices available, this document doesn't go into the specifics of configuring your device. Just remember that once you have installed the software, follow the equivalent of Steps 5 and 6 above (getting the network ID and joining the network).
Here is an example of an iPhone user viewing the SOLO using ZeroTier:
And that's it. Not too difficult! Enjoy using your CloudWatcher and SOLO with the added security and convenience of ZeroTier.
ZeroTier CLI commands
Here is a brief summary of the ZeroTier command-line interface (CLI) commands you can use with your SOLO.
Please note, all commands should be preceded by the word sudo. E.g. sudo zerotier-cli status
zerotier-cli status— Returns status of network.zerotier-cli join <Network ID>— Join the network with the given Network ID.zerotier-cli leave <Network ID>— Leave the network with the given Network ID.zerotier-cli listnetworks— List the current networks available on the SOLO.
