# Running Internet Identity locally now that I'm supposed to use Docker

**URL:** <https://forum.dfinity.org/t/running-internet-identity-locally-now-that-im-supposed-to-use-docker/13709>\
**Category:** internet-identity\
**Created:** [June 10, 2022, 9:42pm UTC](https://forum.dfinity.org/t/running-internet-identity-locally-now-that-im-supposed-to-use-docker/13709 "2022-06-10T21:42:00Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![mymikemiller](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.dfinity.org/mymikemiller/32/694_2.png) [@mymikemiller](https://forum.dfinity.org/u/mymikemiller)\
**Post date:** [June 10, 2022, 9:42pm UTC](https://forum.dfinity.org/t/running-internet-identity-locally-now-that-im-supposed-to-use-docker/13709/1 "2022-06-10T21:42:00Z")

</div>

I used to understand how to run Internet Identity locally and I had it working with my projects, but I just pulled the [latest source](https://github.com/dfinity/internet-identity) and now it seems that I’m supposed to run it in docker instead of just deploying a canister. I downloaded the Docker mac app, started it, then ran the command from the internet\_identity github page:

`II_FETCH_ROOT_KEY=1 dfx build; II_DUMMY_CAPTCHA=1 II_DUMMY_AUTH=1 ./scripts/docker-build`

Note that I had to run dfx `canister create internet_identity` first or the `dfx build` command would not succeed and, presumably, the following command wouldn’t either.

I then browse to the following URL, which I expect to show the II login page (the cid is from internet\_identity/.dfx/local/canister\_ids.json and 0.0.0.0:8000 is what `dfx start` printed out)

[http://0.0.0.0:8000/?canisterId=rrkah-fqaaa-aaaaa-aaaaq-cai](http://0.0.0.0:8000/?canisterId=rrkah-fqaaa-aaaaa-aaaaq-cai)

I receive the following error on that page:

`Replica Error (3): "IC0304: Attempt to execute a message on canister rrkah-fqaaa-aaaaa-aaaaq-cai which contains no Wasm module"`

This all made sense before Docker was involved, since I just did the below `dfx deploy` command as instructed on the github page (which has now been changed to the above docker script) and the internet\_identity canister worked just like any other canister running locally:

`II_FETCH_ROOT_KEY=1 dfx deploy --no-wallet --argument '(null)'`

But now I guess the canister is maybe running somewhere other than my `dfx start` instance? I’m not sure why it can’t be found at the cid specified in .dfx/canister\_ids.json like any of my other canisters. Maybe I just don’t understand how I’m supposed to interact with containers running inside Docker? Or is Docker just used for building the wasm and I’m somehow supposed to get it to run in dfx with another command?

The last thing the docker script prints out is `COPY --from=build /internet_identity.wasm` which now exists at the root of the internet\_identity project. Am I supposed to do something more to get the wasm to run in my local dfx instance? I found [this forum post](https://forum.dfinity.org/t/how-do-i-deploy-wasm-file-as-canister) from last year, but it’s not very helpful.

Further, the using-dev-build demo at [internet-identity/demos/using-dev-build at main · dfinity/internet-identity · GitHub](https://github.com/dfinity/internet-identity/tree/main/demos/using-dev-build) makes no mention of Docker and seems to want me to deploy internet\_identity the old way, which works. Kind of. Instead of navigating to 0.0.0.0:8000/?canisterId=rrkah-fqaaa-aaaaa-aaaaq-cai as is printed out after deploy (which gives me an ERR\_SSL\_PROTOCOL\_ERROR in the console and loads a blank page) or to localhost:8000/?canisterId=rrkah-fqaaa-aaaaa-aaaaq-cai (which loads a page asking me to provide a canister ID or specify a did file, as though I’m trying to load the autogenerated candid frontend, even though the cid in the url is the one from canister\_ids.json for internet\_identity, not \_\_Candid\_UI), I am able to load the Internet Identity login page by navigating to [http://rrkah-fqaaa-aaaaa-aaaaq-cai.localhost:8000/](http://rrkah-fqaaa-aaaaa-aaaaq-cai.localhost:8000/)

Sorry for the wall of text, but I’d like to take advantage of the new Docker stuff and want to be running Internet Identity as recommended, but could use some help understand how it’s supposed to work. How am I supposed to get the built wasm file, or the downloaded pre-built wasm modules from [the github page](https://github.com/dfinity/internet-identity) to run locally?

---

<div class="post-metadata">

**Author:** ![frederikrothenberger](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.dfinity.org/frederikrothenberger/32/3826_2.png) [@frederikrothenberger](https://forum.dfinity.org/u/frederikrothenberger)\
**Post date:** [June 13, 2022, 8:52am UTC](https://forum.dfinity.org/t/running-internet-identity-locally-now-that-im-supposed-to-use-docker/13709/2 "2022-06-13T08:52:32Z")

</div>

Hi @mymikemiller

We use Docker to _build_ Internet Identity, not to run it. But you don’t even have to build II as we provide prebuilt binaries. Have a look at our example here: [internet-identity/demos/using-dev-build at main · dfinity/internet-identity · GitHub](https://github.com/dfinity/internet-identity/tree/main/demos/using-dev-build)  
This shows the minimal setup to run Internet Identity locally.

Best regards  
Frederik

PS: `II_FETCH_ROOT_KEY=1 dfx deploy --no-wallet --argument '(null)'` still works. It might just not result in the same WASM hash. We use docker for reproducibility.

---

<div class="post-metadata">

**Author:** ![mymikemiller](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.dfinity.org/mymikemiller/32/694_2.png) [@mymikemiller](https://forum.dfinity.org/u/mymikemiller)\
**Post date:** [June 15, 2022, 4:26pm UTC](https://forum.dfinity.org/t/running-internet-identity-locally-now-that-im-supposed-to-use-docker/13709/3 "2022-06-15T16:26:42Z")

</div>

Ahh, I see now that you can point your canister to the built wasm using the “build” step in dfx.json. I wasn’t sure how to get a wasm into a local canister, but I guess that’s how you do it. From [https://github.com/dfinity/internet-identity/blob/main/demos/using-dev-build/dfx.json:](https://github.com/dfinity/internet-identity/blob/main/demos/using-dev-build/dfx.json:)

```auto
  "canisters": {
    "internet_identity": {
      "__0": "The development build of Internet Identity. For more information, see https://github.com/dfinity/internet-identity#build-features-and-flavors",

      "type": "custom",
      "candid": "internet_identity.did",
      "wasm": "internet_identity.wasm",

      "__1": "There is no standard way to pull remote canisters, so instead we have a dummy build script that",
      "__2": "simply downloads the Internet Identity canister. See also: https://github.com/dfinity/sdk/issues/2085",
      "build": "curl -sSL https://github.com/dfinity/internet-identity/releases/latest/download/internet_identity_dev.wasm -o internet_identity.wasm"
    },
   ...
}

```

---

<div class="post-metadata">

**Author:** ![frederikrothenberger](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.dfinity.org/frederikrothenberger/32/3826_2.png) [@frederikrothenberger](https://forum.dfinity.org/u/frederikrothenberger)\
**Post date:** [February 9, 2023, 2:00pm UTC](https://forum.dfinity.org/t/running-internet-identity-locally-now-that-im-supposed-to-use-docker/13709/4 "2023-02-09T14:00:54Z")

</div>

Just in case somebody finds this via google: setting up Internet Identity locally is now even simpler, see the example [here](https://github.com/dfinity/examples/tree/master/motoko/internet_identity_integration).
