Skip to main content

Advanced Setup

Launching a new node from scratch

Setting environment variables

# to set individual environment variables
# valid service-names are "creator-node" or "discovery-provider"
audius-cli set-config creator-node
audius-cli set-config discovery-provider

# to set all the required environment variables for a service, use the --required flag
audius-cli set-config --required creator-node
audius-cli set-config --required discovery-provider

Creator Node

There are four required creator node environment variables, available in the creator node section here.

The full list of variables and explanations can be found here. Generally node operators will not need to modify any other environment variables.

External Creator Node Postgres

If you set an external Postgres url during setup you can skip this section.

If you did not set an external Postgres url during setup and you want to add one now, replace the db url by running:

audius-cli set-config creator-node
key : dbUrl
value : <db url>

Discovery Node

There are two required Discovery Node environment variables, available in the Discovery Node section here.

The full list of variables and explanations can be found here. Generally node operators will not need to modify any other environment variables.

External Discovery Node Postgres Instance

If you set an external Postgres url during setup you can skip this section.

The below is only if using a externally managed Postgres (version 11.1+) database:

audius-cli set-config discovery-provider
key : audius_db_url
value : <audius_db_url>

# If there's no read replica, enter the primary db url for both env vars.
audius-cli set-config discovery-provider
key : audius_db_url_read_replica
value : <audius_db_url_read_replica>

In the managed postgres database and set the temp_file_limit flag to 2147483647 and run the following SQL command on the destination db.

CREATE EXTENSION pg_trgm;

Launch

audius-cli launch creator-node

# or

audius-cli launch discovery-provider (--seed)

# Options:
# --seed
# Seeds the database from a snapshot. Required for first-time discovery setup.