Installation
Please be aware that audius-docker-compose will soon no longer be supported.
Read the Migration Guide at the bottom of this page to upgrade.
Click here for legacy documentation.
This guide describes how to run Audius services on a single machine via Docker Compose. The repository of Docker Compose files can be found on GitHub.
On a VM that meets the minimum requirements from above run:
bash <(curl https://raw.githubusercontent.com/AudiusProject/audius-docker-compose/main/install.sh)
During installation there will be prompts for required environment variables. The variables are:
Creator Node
creatorNodeEndpoint- The DNS of your content node. If you haven't registered the service yet, please enter the url you plan to register.delegateOwnerWallet- Address of wallet that contains no tokens but that is registered on chain, used to sign JSON responses from serverdelegatePrivateKey- Private key associated withdelegateOwnerWalletspOwnerWallet- Wallet that registered (or will register) the content node on chain
If you're using an externally managed Postgres DB please see this section
Discovery Node
audius_delegate_owner_wallet- Address of wallet that contains no tokens but that is registered on chain, used to sign JSON responses from serveraudius_delegate_private_key- Private key associated withaudius_delegate_owner_wallet
If you're using an externally managed Postgres DB please see this section
More options
For more advanced configuration options or migrating from Kubernetes check out the Advanced Setup Guide
Overview
Installing and managing Audius Nodes is (in most cases) a 3 step process.
- Install
audius-ctl - Edit the configuration file
- Run your Audius Nodes
Install audius-ctl
Get started by opening a terminal on a local machine, this can be any computer, such as a laptop or desktop.
Run the following command to install the controller utility, audius-ctl
curl -sSL https://install.audius.org | sh
checkout the code on GitHub
Edit the Configuration File
Next you will need to edit the configuration file. Run the following command to get started:
audius-ctl config edit
Configuration Details
The configuration file will be pre-populated with the required fields. Enter your information into each field for each Audius Node you will be running.
network:
deployOn: mainnet
nodes:
creator-1.example.com: # <--- THE URL OF YOUR CONTENT NODE
type: creator
privateKey: abc123 # <--- UNIQUE PRIV KEY USED BY THIS NODE TO SIGN RESPONSES
wallet: 0xABC123 # <--- UNIQUE WALLET ADDRESS OF ABOVE PRIV KEY
rewardsWallet: 0xABC123 # <--- ADDRESS OF WALLET HOLDING STAKED TOKENS
discovery-1.example.com: # <--- THE URL OF YOUR DISCOVERY NODE
type: discovery
privateKey: abc123 # <--- UNIQUE PRIV KEY USED BY THIS NODE TO SIGN RESPONSES
wallet: 0xABC123 # <--- UNIQUE WALLET ADDRESS OF ABOVE PRIV KEY
rewardsWallet: 0xABC123 # <--- ADDRESS OF WALLET HOLDING STAKED TOKENS
More Info
| field | description |
|---|---|
type | either creator or discovery |
privateKey | private key associated with the wallet |
wallet | Address of wallet that contains no tokens but that is registered on chain, used to sign JSON responses from server |
rewardsWallet | Wallet that registered (or will register) the Audius Node on chain |
Run Your Audius Nodes
With the configuration file setup correctly, the final command to run is:
audius-ctl up
This command does a few things:
- Loops over every Audius Node specified
- Connects to each Virtual Machine via ssh
- Checks that the required Audius Node software is installed
- If not found, runs the installer
- Starts the Audius Node
Additional Commands
Get help, and view all of the available commands by running the following command:
audius-ctl --help
> audius-ctl --help
CLI for provisioning and interacting with audius nodes
Usage:
audius-ctl [command] [flags]
audius-ctl [command]
Available Commands:
completion Generate the autocompletion script for the specified shell
config view/modify audius-d configuration
devnet Spin up local ethereum, solana, and acdc chains for development
down Spin down nodes and network in the current context.
help Help about any command
infra Manage audius-d instances
jump Open a shell into the audius-d container running on a host.
register Register nodes on ethereum (only works for local devnet)
restart Fully turn down and then turn up audius-d.
status test audius-d connectivity
statusbar Run status bar [n/a]
up Spin up the audius nodes specified in your config, optionally specifying which hosts.
Flags:
--debug Print debug logs in console
-h, --help help for audius-ctl
-v, --version Display version info
Use "audius-ctl [command] --help" for more information about a command.
Migration Guide
This portion of the guide is only for Node Operators that setup Audius Nodes using
audius-docker-compose.
Migrating an existing Audius Node to the new audius-d architecture
Stop Existing Nodes
For each Node to be migrated, you will need to ssh into the Virtual Machine, disable auto upgrade, and down the Node. The workflow and required commands are as follows:
-
ssh into Virtual Machine
-
disable auto upgrade
audius-cli auto-upgrade --remove
- Down the Audius Node
audius-cli down
-
log out
-
Repeat with each Node.
Configure Nodes
From here, the guide is the same as though you were creating new Nodes from scratch. Head back up to
the audius-cli installation step to get
started.
Migration Variable Mapping
Node Operators migrating existing Nodes will be familiar with the legacy variables for each Node
type. See the mappings below to correctly use existing keys from a override.env file in a new
configuration file.
-
Content Node Variables
delegateOwnerWallet-->walletdelegatePrivateKey-->privateKey
-
Discovery Node Variables
audius_delegate_owner_wallet-->walletaudius_delegate_private_key-->privateKey