Skip to main content

Advanced Guide: Connecting with myst CLI

Take Full Control and Enhance Your MysteriumVPN Experience with myst CLI

Updated over a year ago

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:

myst cli

Once started your terminal window should change to the myst cli interface. To get help and see a list of possible commands execute:

help

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:

identities new

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:

identities list

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:

identities unlock 0x4570fe47a49af9ae9bd76f029818413ea18620000

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.

identities register 0x4570fe47a49af9ae9bd76f029818413ea18620000

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:

identities get 0x4570fe47a49af9ae9bd76f029818413ea18620000

It should output a few lines of text among them you should be able to find your balance:

[INFO] Balance: 6.900000MYST

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:

order currencies

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:

order create 0x4570fe47a49af9ae9bd76f029818413ea18620000 100 BTC

It's output should be similar to this:

[INFO] Order ID '6984004' is in state: 'pending' [INFO] Price: 0.000614 BTC [INFO] Pay: unknown unknown [INFO] Receive: 0.000608 BTC [INFO] Myst amount: 100.000000 [INFO] PaymentURL: https://pay.coingate.com/invoice/76cd2bfa-e1f2-42c6-ae7c-0972b15601ab

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:


order get-all

To inspect each order in more detail execute:

order get [ORDER_ID]

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

proposals

This command will output a list which is similar to this:

proposals Found proposals provider id: 0x773783463adb681ad67052213ae1ae204e32dab1 type: wireguard country: DE access policies: provider id: 0x80ec29bb58365aceb06be7558b05a789b9e6458a type: wireguard country: GB access policies: provider id: 0xfa7855e183c3474eddd9d3a0088d2b1abddde837 type: wireguard country: GB access policies: provider id: 0x09b3c5f0ecc61a28ea5cd91ac2b6edd4cd90f50c type: wireguard country: AU access policies: provider id: 0x0da444370166e0c2decb744122fcc2d07b8be4ce type: wireguard country: MD access policies: provider id: 0x2f4ec475c42677b2b37a8831de456c43cadda89b type: wireguard country: GB access policies: provider id: 0x770c9ad96fe1843068e6100451d3282ce67c3596 type: wireguard country: US access policies:

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:

provider id: 0x773783463adb681ad67052213ae1ae204e32dab1 type: wireguard country: DE access policies:

So we'll execute the connect command like this:

connect 0x4570fe47a49af9ae9bd76f029818413ea18620000 0x773783463adb681ad67052213ae1ae204e32dab1 wireguard

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:

disconnect

Check your connection status

To check your connection status you can execute:

status


Did this answer your question?