<p>easiest way to get a testnet node running: <code>nix run github:input-output-hk/cardano-node#testnet/node --no-write-lock-file</code></p>

CC BY-SA 4.0
2022-02-01T13:41:45.223Z
2022-02-01T13:41:45.223Z
Samuel Leathers
<p>Once you have nix-shell and downloaded the repository, you run it:
<em>cabal build cardano-node cardano-cli</em>
(it takes about 30 minutes)
and then:
<em>cardano-node run</em>.
You open the second console, restart <em>nix-shell</em> and can play with cardano-cli.</p>

CC BY-SA 4.0
2022-02-01T07:17:52.943Z
2022-02-01T07:17:52.943Z
Robert
<p>I think Lars skipped some steps because they are not necessarily relevant to Plutus. It's more general and will depend on your operating system. Assuming you're running Linux like Lars, follow the steps below. Note that you <em>can</em> be in a Nix shell for this, but you don't <em>have</em> to be. This is just downloading a binary and putting it on your PATH.</p>
<p>In the video, Lars cuts while on this page:
<a href="https://hydra.iohk.io/build/9941098#tabs-constituents" rel="nofollow noreferrer">https://hydra.iohk.io/build/9941098#tabs-constituents</a></p>
<p>From there, you should click on <strong>cardano-node-linux</strong> (job #9941151)</p>
<p>Click on <strong>cardano-node-1.33.0-linux.tar.gz</strong> binary distribution to download the tarball</p>
<p>Make a permanent directory in which to store the binaries</p>
<pre><code>mkdir ~/cardano-node
</code></pre>
<p>Extract the tarball contents into the directory. Note that your downloaded tarball may be in a different directory depending on how your system is configured.</p>
<pre><code>tar -xf ~/Downloads/cardano-node-1.33.0-linux.tar.gz -C ~/cardano-node
</code></pre>
<p>At this point, you can execute <code>cardano-node</code></p>
<pre><code>cd ~/cardano-node
cardano-node --version
</code></pre>
<p>But you probably want to be able to run it from anywhere, not just in that one directory.</p>
<p>To do that, make sure the <code>~/cardano-node</code> directory is always part of your PATH when you log in by editing <code>~/.bashrc</code> and adding the following line</p>
<pre><code>export PATH=&quot;$HOME/cardano-node:$PATH&quot;
</code></pre>
<p>While you're editing <code>.bashrc</code>, save yourself some time later by adding this environment variable, too. You'll need it later. Note: Change the path if your <code>plutus-pioneer-program</code> directory is somewhere else.</p>
<pre><code>export CARDANO_NODE_SOCKET_PATH=&quot;$HOME/plutus-pioneer-program/code/week03/testnet/node.socket&quot;
</code></pre>
<p>Finally, source <code>.bashrc</code> to make sure the PATH and that environment variable are set in your current session</p>
<pre><code>source ~/.bashrc
</code></pre>
<p>At this point, you'll be at the same point Lars is in the video.</p>

CC BY-SA 4.0
2022-02-01T23:49:27.593Z
2022-02-01T23:49:27.593Z
Travis
<p>I'm trying to replicate what Lars was demonstrating at the start of the week03 testnet setup video <a href="https://www.youtube.com/watch?v=ABtffZPoUqU&amp;list=PLNEK_Ejlx3x2zxcfoVGARFExzOHwXFCCL&amp;index=6" rel="nofollow noreferrer">https://www.youtube.com/watch?v=ABtffZPoUqU&amp;list=PLNEK_Ejlx3x2zxcfoVGARFExzOHwXFCCL&amp;index=6</a> (time 0:49-1:05), but after picking the hydra binaries, he is magically in a nix-shell and able to do cardano-node --version.</p>
<p>My question is what steps were done after downloading the binaries in order to be able from run cardano-node from a nix-shell?  I'm new to nix so not always sure what has to be done to get things working.</p>
<p>I've tried just running the nix-shell, which spent quite a while updating dependencies, but in the end cardano-node didn't exist - ie running cardano-node --version in shell did nothing, neither did 'which cardano-node'.</p>
<p>Can someone please provide specific steps to get cardano-node running in the nix-shell.  Thanks</p>

CC BY-SA 4.0
2022-02-01T06:38:26.723Z
How are you running your node? Did you install the binaries? If so which one for which OS? Or are you using a docker image?
d_fajardo
<plutus-pioneer-program><nix-shell><install>
Need help getting Cardano-node installed and running - trying to follow Lars example Week03 - Cohort03
# Need help getting Cardano-node installed and running - trying to follow Lars example Week03 - Cohort03

(Asked by: username_0 on 2022-02-01)

I'm trying to replicate what Lars was demonstrating at the start of the week03 testnet setup video <https://www.youtube.com/watch?v=ABtffZPoUqU&list=PLNEK_Ejlx3x2zxcfoVGARFExzOHwXFCCL&index=6> (time 0:49-1:05), but after picking the hydra binaries, he is magically in a nix-shell and able to do cardano-node --version.

My question is what steps were done after downloading the binaries in order to be able from run cardano-node from a nix-shell? I'm new to nix so not always sure what has to be done to get things working.

I've tried just running the nix-shell, which spent quite a while updating dependencies, but in the end cardano-node didn't exist - ie running cardano-node --version in shell did nothing, neither did 'which cardano-node'.

Can someone please provide specific steps to get cardano-node running in the nix-shell. Thanks

**Tags:** plutus-pioneer-program, nix-shell, install
> **Comments:**
> **username_1**: How are you running your node? Did you install the binaries? If so which one for which OS? Or are you using a docker image?  

---

## 3 answers

### Answer by username_2 on 2022-02-01. Score: 1

easiest way to get a testnet node running: `nix run github:input-output-hk/cardano-node#testnet/node --no-write-lock-file`


---

### Answer by username_3 on 2022-02-01. Score: 0

Once you have nix-shell and downloaded the repository, you run it:
*cabal build cardano-node cardano-cli*
(it takes about 30 minutes)
and then:
*cardano-node run*.
You open the second console, restart *nix-shell* and can play with cardano-cli.


---

### Answer by username_4 on 2022-02-01. Score: 0

I think Lars skipped some steps because they are not necessarily relevant to Plutus. It's more general and will depend on your operating system. Assuming you're running Linux like Lars, follow the steps below. Note that you can be in a Nix shell for this, but you don't have to be. This is just downloading a binary and putting it on your PATH.
In the video, Lars cuts while on this page:
https://hydra.iohk.io/build/9941098#tabs-constituents
From there, you should click on cardano-node-linux (job #9941151)
Click on cardano-node-1.33.0-linux.tar.gz binary distribution to download the tarball
Make a permanent directory in which to store the binaries
mkdir ~/cardano-node

Extract the tarball contents into the directory. Note that your downloaded tarball may be in a different directory depending on how your system is configured.
tar -xf ~/Downloads/cardano-node-1.33.0-linux.tar.gz -C ~/cardano-node

At this point, you can execute cardano-node
cd ~/cardano-node
cardano-node --version

But you probably want to be able to run it from anywhere, not just in that one directory.
To do that, make sure the ~/cardano-node directory is always part of your PATH when you log in by editing ~/.bashrc and adding the following line
export PATH="$HOME/cardano-node:$PATH"

While you're editing .bashrc, save yourself some time later by adding this environment variable, too. You'll need it later. Note: Change the path if your plutus-pioneer-program directory is somewhere else.
export CARDANO_NODE_SOCKET_PATH="$HOME/plutus-pioneer-program/code/week03/testnet/node.socket"

Finally, source .bashrc to make sure the PATH and that environment variable are set in your current session
source ~/.bashrc

At this point, you'll be at the same point Lars is in the video.


---

