Steps to install local plutus playground in easiest way on Ubuntu 20.04
- update and upgrade softwares
$ sudo apt update
$ sudo apt upgrade -y
- Install curl, git and cabal, if you don't have.
$ sudo apt install curl
$ sudo apt install git
$ sudo apt install cabal-install
- 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=
- now install nix.
$ curl -L https://nixos.org/nix/install | sh
- 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
- 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.
- 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
- After that the server will be running on https://localhost:8009.