Skip to content

Instantly share code, notes, and snippets.

@bhatt-deep
Created June 22, 2021 17:03
Show Gist options
  • Save bhatt-deep/54f3c7ff6e50b9e9fa5240fc3d61d08d to your computer and use it in GitHub Desktop.
Save bhatt-deep/54f3c7ff6e50b9e9fa5240fc3d61d08d to your computer and use it in GitHub Desktop.

Build Plutus dev environment on Ubuntu 20.04

Steps to install local plutus playground in easiest way on Ubuntu 20.04

  1. update and upgrade softwares
$ sudo apt update

$ sudo apt upgrade -y
  1. Install curl, git and cabal, if you don't have.
$  sudo apt install curl
$  sudo apt install git
$  sudo apt install cabal-install
  1. Configure nix cache
$  sudo mkdir /etc/nix

use vim or geddit to create nix.conf file in (/etc/nix/nix.conf) and put this code.

substituters        = https://hydra.iohk.io https://iohk.cachix.org https://cache.nixos.org/

trusted-public-keys = hydra.iohk.io:f/Ea+s+dFdN+3Y/G+FDgSq+a5NEWhJGzdjvKNGv0/EQ= iohk.cachix.org-1:DpRUyj7h7V830dp/i6Nti+NEO2/nhblbov/8MW7Rqoo= cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY=
  1. now install nix.
$ curl -L https://nixos.org/nix/install | sh
  1. clone plutus and plutus pioneer directories
 $ mkdir cardano

$ cd cardano

$ git clone https://github.com/input-output-hk/plutus

$ git clone https://github.com/input-output-hk/plutus-pioneer-program
  1. run the nix command in the Plutus directory: After checking out to commit mentioned in Week 1 lecture.
~/cardano/plutus $ git checkout 3746610e53654a1167aeb4c6294c6096d16b0502

/cardano/plutus $ nix build -f default.nix plutus.haskell.packages.plutus-core.components.library

These steps will take some time.

  1. Now you can initiate nix shell and run the server and client in two different shells.
cd /plutus/plutus-playground-server
plutus-playground-server
cd /plutus/plutus-playground-client
npm run start
  1. After that the server will be running on https://localhost:8009.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment