Skip to content

Instantly share code, notes, and snippets.

@peterpeterparker
Created November 2, 2022 20:34
Show Gist options
  • Save peterpeterparker/a6645adb07e93a04023db61e13b6c6cd to your computer and use it in GitHub Desktop.
Save peterpeterparker/a6645adb07e93a04023db61e13b6c6cd to your computer and use it in GitHub Desktop.
Deploy II locally easily

Options 1

Automate the deployment with dfx.json - i.e. add following to your configuration. It will fetch and deploy the wasm of II locally.

"internet_identity": {
      "type": "custom",
      "candid": "internet_identity.did",
      "wasm": "internet_identity.wasm",
      "build": "bash -c 'test -f internet_identity.wasm || curl -sSL https://github.com/dfinity/internet-identity/releases/latest/download/internet_identity_dev.wasm -o internet_identity.wasm; test -f internet_identity.did || curl -sSL https://raw.githubusercontent.com/dfinity/internet-identity/main/src/internet_identity/internet_identity.did -o internet_identity.did'",
      "remote": {
        "candid": "internet_identity.did",
        "id": {
          "ic": "rdmx6-jaaaa-aaaaa-aaadq-cai"
        }
      }
    }

Option 2

Deploy manually the test wasm locally

git clone https://github.com/dfinity/internet-identity
cd internet-identity/demos/using-dev-build
npm ci
dfx deploy --no-wallet --argument '(null)'

Option 3

Use the npm cli to setup a new project with II

npm init ic
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment