cardano up is a command line utility for managing Cardano services. cardano-up allows you to use a command line utility to install Cardano service by using docker images.
This guide further explains how cardano-up works, managing packages and commands you can use.
The cardano-up command consists of multiple subcommands. You can list all subcommands by running cardano-up with no arguments or with the --help option.
$ cardano-up
Usage:
cardano-up [command]
Available Commands:
completion Generate the autocompletion script for the specified shell
context Manage the current context
down Stops all Docker containers
help Help about any command
info Show info for an installed package
install Install package
list List installed packages
list-available List available packages
logs Show logs for an installed package
uninstall Uninstall package
up Starts all Docker containers
update Update the package registry cache
upgrade Upgrade package
validate Validate package file(s) in the given directory
version Displays the version
Flags:
-D, --debug enable debug logging
-h, --help help for cardano-up
-v, --verbose Show all available versions of packages
Use "cardano-up [command] --help" for more information about a command.
🛑 In order to install a package and interact with it we need to add ~/.local/bin to your $PATH by adding the following to your shell RC/profile to make any commands/scripts installed readily available
export PATH=~/.local/bin:$PATH
To install a package, we run cardano-up install (Package Name) for this example cardano-node
Contexts are used to allow you to install multiple copies of the same package with different network configurations side by side. They allow you to do things
such as running a preprod and mainnet Cardano node on the same machine, or even have multiple preview Cardano node instances running different versions
of the node.
Commands such as install, uninstall, and list work in the active context. You can use the context command to change the active context or manage available contexts.
The context subcommand manages contexts. It has subcommands of its own for the various context-related functions.
Create a new context with a given name, optionally specifying a description and a Cardano network. We use the -n flag to specify the Cardano network and the -d flag to give it a description
✅ In this sample we name our new context dev and set the network to preview with description of preview test
cardano-up context create dev -n preview -d 'preview test'