Linux Guide
How to run Mysterium dVPN on Linux
Introduction
Mysterium node comes with a built-in command line tools which can be used to connect to other nodes and use our dvpn service.
It has been tested on:
- Raspbian 9/10
- Debian 9/10
- Ubuntu 18.04/20.04
- Pop_os 20.04
If you're running a different linux distribution, you can still download the tool and try to configure the dVPN.
Installation
Install Mysterium Node
There are two ways to install Mysterium node.
On Debian/Ubuntu systems you can use Aptitude and execute:
If for some reason that fails, or you can't do that we also provide an installation script written in bash which can be downloaded and executed using this command:
In addition to downloading and installing our Node using either of these commands will also install additional required dependencies like WireGuard if you don't have them already.
Configure the Services
After installation is complete two services are created:
- mysterium-node.service
- mysterium-consumer.service
By default mysterium-node.service will be automatically started. It allows you to use both consumer and provider features.
Running in consumer only mode
If your plan is to use our node as a regular VPN client for data consumption a few additional steps have to be taken. The previously mention mysterium-node.service has to be stopped and replaced with mysterium-consumer.service.
By default, services are controlled using systemctl. A detailed guide on how it works can be found here.
To enable consumer only mode you will have to execute these commands in order:
Checking node health
After keeping the default mysterium-node.service or replacing it with the consumer service you should make sure everything actually started and is working. That can be done using systemctl status [service-name] for example:
In case of service failing to start you can try and restart it using systemctl restart [service-name].
If your mysterium.node service is still refusing to start you can report an issue to our support team which will help you figure it out as best as they can. Application logs can be found using journalctl -u [service-name].
Basic: Connect using myst commands
After getting your node up and running you should be almost ready to connect. In this section we'll go through the steps required to do that.
This section will touch on two commands myst account and myst connection together with their subcommands.
These two commands expose the most basic and user-friendly way to use your terminal in order to connect to the dVPN. For more advanced user guide please follow the section below which explains how to use myst cli.
How to use the commands
As mentioned above we'll use two commands and their subcommands:
- myst account
- myst connection
In order to read more about them you can execute them with a help flag like this:
This also works for any sub-commands.
Each command has an output, if the output does not start with [ERROR] or [WARNING] consider that command a success.
Initial setup
Register a new identity
Command: myst account register
We will need to create and register an identity which is required in order to identify yourself in the network.
This can be done by executing:
Depending on the network you're using, you might need to top up your balance to finish your registration, if that is the case after executing the above command you'll get an output which asks you to do so. For that just follow the below instructions on managing your balance.
Inspect your identity
Command: myst account info
If the above command passed without any errors, you can now view your account information using:
This will display the identity you're using, it's balance and other important information like your registration status.
Managing your balance
Managing your balance is essential as you must have some amount of MYST (MYSTT while in Testnet) tokens in order to use the dVPN.
Creating a topup request
Command: myst account topup
Topping up is done using the topup sub-command. It expects a few flags to be passed together with your request:
- amount ( Amount of tokens you want to top up in to your account )
- currency ( Currency you want to use when paying for your top up )
For the example lets say we'll top up 100 MYST while paying in BTC in that case we'd execute the command like this:
If everything is completed without errors, the output should be similar to this:
You will now need to follow the PaymentURL in order to complete your top up request.
Inspecting your last topup
Command: myst account info
To inspect your last top up, see it's state and PaymentURL you can execute:
Connecting to other nodes
Connecting to other nodes will require us to use the connection command and it's subcommands.
Listing available exit nodes
Command: myst connection proposals
To list the available exit nodes, you have to view proposals which can be done by executing:
The output should be similar to this:
Now all you have to do is pick a node from this list, copy it's Identity field and continue to the next step.
Note: This command also comes with a few flags which can act as filters. To view them use the --help flag at the end of the command.
Connecting to a proposal
Command: myst connection up
For simplicity lets say we picked Identity: 0x6b3dfae79ef37495c84f8de590503f54d8a597ce and will now connect to it using the up sub-command.
That can be done by executing:
This might take a few seconds and after that you should see a message [CONNECTED].
There is a possibility that the proposal you picked, cannot accept your connection in that case you should try the other proposals.
Managing your connection
Disconnecting
To disconnect you can execute:
See connection information
To see your connection information you can execute:
Advanced: connect using myst CLI
myst cli is a tool that is more advanced than the basic myst commands used for connecting. While in some ways it's similar to connection and account commands gives greater control for an end user alongside some additional features in turn sacrificing some convenience.
To get familiar with myst cli follow the below steps which detail initial set up and use of the Mysterium dVPN using the cli.
How to use the CLI
To start open your terminal and execute:
Once started your terminal window should change to the myst cli interface. To get help and see a list of possible commands execute:
Each command has an output, if the output does not start with [ERROR] or [WARNING] consider that command a success.
Commands can be autocompleted using the tab key on your keyboard.
Initial setup
If you've never used mysterium dVPN you'll have to create, unlock and register your identity. Go ahead and fire up the cli application and follow the steps below.
Create a new identity
Command: identities new
In order to identify yourself in the network you must have an identity, to create it execute the following command in the cli:
This command will create you a new identity which you can use. It will be printed to your terminal, but in case you want to check it out later you can do that will the following command:
Unlock the new identity
Command: identities unlock [identity]
In order to use the created identity it has to be unlocked first.
Unlocking has to be done every time we launch the myst cli and want to use the created identity.
For the sake of simplicity let's say we've received an identity: 0x4570fe47a49af9ae9bd76f029818413ea18620000, which we'll use in all later steps.
To unlock it we'd have to execute:
Register your identity
Command: identities register [identity]
After creating and unlocking the identity it must be registered so that Mysterium services are aware about it and it's balance, to do that execute the identities register command.
Managing your balance
Managing your balance can be done using the order commands in the myst cli. You must have some amount of MYST in your balance in order to use the dVPN.
Check balance information
Command: identities get [identity]
In order to get information about your identity you can execute:
It should output a few lines of text among them you should be able to find your balance:
If your balance is not 0 and don't want to top up you can skip further to the Connecting to other nodes.
Adding balance
Command: order create [identity] [amount] [pay currency]
To add additional MYST to the balance a payment order has to be created.
To get the full list of currencies which can be used to pay execute:
Let's say that for example for our identity: 0x4570fe47a49af9ae9bd76f029818413ea18620000 we would like to add 100 MYST paying with BTC.
We would execute the order command like this:
It's output should be similar to this:
To finish your order and receive the requested MYST navigate to the provided PaymentURL and complete your order.
Checking order history
To check your whole order history execute:
To inspect each order in more detail execute:
Connecting to other nodes
Connecting to other nodes on the network is easy using the cli.
Listing possible exit nodes
Command: proposals
To list all possible exit nodes can be done using the proposals command
This command will output a list which is similar to this:
Connecting to a proposal
Command: connect [consumer-identity] [provider-identity] [service-type]
The last step that is left is to actually connect. First make sure your identity is unlocked, instructions on how to do that are in the Initial setup section.
First lets explore the connect command. It accepts three arguments which are required.
- "consumer-identity" which is your identity that you created using the identities new
- "provider-identity" which you can get from the proposals command
- "service-type" which you also get from the proposals command typically wireguard
So lets say our identity is 0x4570fe47a49af9ae9bd76f029818413ea18620000 and we'll connect to proposal:
So we'll execute the connect command like this:
It should take a few seconds to connect and once it finishes you're done, you can now use the internet as if you're in a different location.
Managing your connection
Disconnecting
To disconnect from a node you can execute:
Check your connection status
To check your connection status you can execute: