Skip to content

Commit

Permalink
- Clarify installation options and methods
Browse files Browse the repository at this point in the history
- Prevent mixing import and skip wallet settings
  • Loading branch information
hsoerensen committed Feb 3, 2024
1 parent e109b20 commit 01acd78
Show file tree
Hide file tree
Showing 4 changed files with 55 additions and 40 deletions.
37 changes: 37 additions & 0 deletions docs/installation/installation-advanced.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# Installation - Advanced

This page contains advanced installation instructions for Voi Network.
Most users should use the [standard installation method](./installation.md).

## Installing Without Wallet Setup (advanced)

!!! warning
For separate wallet management, install Voi without wallet setup.
This advanced feature is not recommended for most users.
Instead, opt for new user setup or existing account import.

If you want to install without including wallet setup, set the **VOINETWORK_SKIP_WALLET_SETUP** environment variable to
**1** and run the installation script:

```bash
export VOINETWORK_SKIP_WALLET_SETUP=1
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/VoiNetwork/voi-swarm/main/install.sh)"
```

## Setting a Custom Telemetry Name as Part of Installation (advanced)

!!! info
This is an advanced feature intended for automation, and is **not required** before telemetry can be used.

During installation, you will automatically be prompted to set a custom telemetry name if not set already.
If you prefer to set a name through the environment, you can do so by setting the
**VOINETWORK_TELEMETRY_NAME** environment variable to your desired name.

This would typically be done if you are automating the installation process.

```bash
export VOINETWORK_TELEMETRY_NAME="my_custom_telemetry_name"
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/VoiNetwork/voi-swarm/main/install.sh)"
```

A custom telemetry name can be combined with other environment variables.
47 changes: 7 additions & 40 deletions docs/installation/installation.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
# Setting up a new Voi Node


## New to Voi

!!! tip
Start here if you are new to Voi and want to set up a new Voi node.
During the process, you will be asked for a few details to set up your node, and where we have automated as much as possible.
Use this method if you are new to Voi and want to set up a new node.
During the process, you will be asked for a few details to set up your node,
and where we have automated as much as possible.

To set up a new Voi node, run the following command:

Expand All @@ -15,13 +14,11 @@ To set up a new Voi node, run the following command:

## Using an Existing Account/Address with Mnemonic

!!! tip inline end
For migrating with an existing account or mnemonic to Voi Swarm, follow this option.
After installation, [update your name and GUID](../../updating/telemetry/#getting-your-telemetry-status)
for health rewards if setting up on a new server.
For installing with an existing account or mnemonic to Voi Swarm, use this method.
After installation, [update your name and GUID](../../updating/telemetry/#getting-your-telemetry-status)
for health rewards if setting up on a new server.

If you have an existing account/address with a mnemonic that you want to use, set the **VOINETWORK_IMPORT_ACCOUNT**
environment variable to **1** and run the installation script:
To import your account and set up a new Voi node, run the following command:

```bash
export VOINETWORK_IMPORT_ACCOUNT=1
Expand All @@ -30,33 +27,3 @@ export VOINETWORK_IMPORT_ACCOUNT=1

???+ info
Post-installation steps for migrating from a D13 based setup can be [found here](../migrating.md)

## Installing Without Wallet Setup

If you want to install without including wallet setup, set the **VOINETWORK_SKIP_WALLET_SETUP** environment variable to
**1** and run the installation script:

```bash
export VOINETWORK_SKIP_WALLET_SETUP=1
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/VoiNetwork/voi-swarm/main/install.sh)"
```



## Setting a Custom Telemetry Name as Part of Installation (advanced)

!!! info
This is an advanced feature intended for automation, and is **not required** before telemetry can be used.

During installation, you will automatically be prompted to set a custom telemetry name if not set already.
If you prefer to set a name through the environment, you can do so by setting the
**VOINETWORK_TELEMETRY_NAME** environment variable to your desired name.

This would typically be done if you are automating the installation process.

```bash
export VOINETWORK_TELEMETRY_NAME="my_custom_telemetry_name"
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/VoiNetwork/voi-swarm/main/install.sh)"
```

A custom telemetry name can be combined with other environment variables.
10 changes: 10 additions & 0 deletions install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -534,6 +534,16 @@ if [[ ! (${operating_system_distribution} == "ubuntu" || ${operating_system_dist
abort "This script is only meant to be run on Debian or Ubuntu."
fi

if [[ -n ${VOINETWORK_SKIP_WALLET_SETUP} && -n ${VOINETWORK_IMPORT_ACCOUNT} ]]; then
echo "VOINETWORK_IMPORT_ACCOUNT and VOINETWORK_SKIP_WALLET_SETUP are both set. This is not supported at the same time."
echo ""
echo "To import an existing account, set VOINETWORK_IMPORT_ACCOUNT=1 and unset VOINETWORK_SKIP_WALLET_SETUP."
echo ""
echo "Your Voi and Via are linked to your account. Wallets are created automatically if needed."
echo "Voi Swarm doesn't support wallet import."
abort "Exiting the program."
fi

if [[ -n ${VOINETWORK_SKIP_WALLET_SETUP} && ${VOINETWORK_SKIP_WALLET_SETUP} -eq 1 ]] || [[ -n $VOINETWORK_HEADLESS_INSTALL ]]; then
headless_install=1
fi
Expand Down
1 change: 1 addition & 0 deletions mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,7 @@ nav:
- System requirements: installation/system-requirements.md
- Prerequisites: installation/prerequisites.md
- Installation: installation/installation.md
- Installation (advanced): installation/installation-advanced.md
- Uninstall: installation/uninstall.md
- Updating:
- Updating package: updating/swarm-update.md
Expand Down

0 comments on commit 01acd78

Please sign in to comment.