If you're running into trouble in the process below, be sure to check the section Trouble Shooting below.
docker compose down
docker compose up -d
docker compose exec dkr /bin/bash
kli salt
Example response:
0AAQmsjh-C7kAJZQEzdrzwB7
Note: Replace with your actual salt
kli init --name controller --salt 0AAQmsjh-C7kAJZQEzdrzwB7 --nopasscode --config-dir "/keripy/my-scripts" --config-file my-config
kli incept --name controller --alias controller --file "/keripy/my-scripts/my-incept.json"
Example AID:
EKYGGh-FtAphGmSZbsuBs_t4qpsjYJ2ZqvMKluq9OxmP
Optionally use kli
to perform additional KERI operations such as key rotation, threshold signatures, etc., see KERI docs for details.
See an example below.
Find a web address (domain, optional port, optional path) that you control.
Example web address:
https://peacekeeper.github.io/did-webs-iiw37-tutorial/
Note: Replace with your actual web address and AID, convert to did:web(s) conformant identifier
Be sure to execute the command in the root of your local did-webs
repo (and in the Docker container)
dkr did webs generate --name controller --did did:webs:peacekeeper.github.io:did-webs-iiw37-tutorial:EKYGGh-FtAphGmSZbsuBs_t4qpsjYJ2ZqvMKluq9OxmP --oobi http://witnesshost:5642/oobi/EKYGGh-FtAphGmSZbsuBs_t4qpsjYJ2ZqvMKluq9OxmP/witness/BBilc4-L3tFUnfM_wJr4S4OJanAv_VmF_dJNN6vkf2Ha
This creates files:
did.json
under local path./volume/dkr/did_json/<your AID>
keri.cesr
under local path./volume/dkr/keri_cesr/<your AID>
You can access these files either from within your Docker container or on your local computer filesystem.
<local path on computer to did-webs-iiw37-tutorial>/volume/dkr/
/usr/local/var/did-keri-resolver/did_json/<your AID>
(local path in the Docker container)
and extend those paths with either did_json/<your AID>
or keri_cesr/<your AID>
.
E.g. using git, Github pages, FTP, SCP, etc.
We choose WOT-terms
as our [DESTINATION LOCAL REPO]
cd [PATH TO LOCAL SOURCE REPO did-webs-iiw37-tutorial]/volume/dkr/did_json/ENbWS51Pw1rmxz5QIfK5kp3ODaEeQcZjqQNrLpc6mMQq
cp did.json ~/apps/WOT-terms/
cd ../../keri_cesr/ENbWS51Pw1rmxz5QIfK5kp3ODaEeQcZjqQNrLpc6mMQq
cp keri.cesr ~/apps/WOT-terms/
Result in local WOT-terms repo
[DESTINATION LOCAL REPO]: git status
Untracked files:
(use "git add <file>..." to include in what will be committed)
did.json
keri.cesr
git add .
git commit -m "prepare upload did:webs documents to WOT-terms"
git push upstream main
If you get the expected output of the push action, the files are on the controlled webserver.
Note: Replace with your actual web address and AID
Optionally resolve the AID locally as did:keri, given an OOBI as resolution option.
Note: Replace with your actual AID
dkr did keri resolve --name controller --did did:keri:EKYGGh-FtAphGmSZbsuBs_t4qpsjYJ2ZqvMKluq9OxmP --oobi http://witnesshost:5642/oobi/EKYGGh-FtAphGmSZbsuBs_t4qpsjYJ2ZqvMKluq9OxmP/witness/BBilc4-L3tFUnfM_wJr4S4OJanAv_VmF_dJNN6vkf2Ha
Optionally resolve the AID locally as did:webs.
Note: Replace with your actual web address and AID
dkr did webs resolve --name controller --did did:webs:peacekeeper.github.io:did-webs-iiw37-tutorial:EKYGGh-FtAphGmSZbsuBs_t4qpsjYJ2ZqvMKluq9OxmP
Use the following two commands in your running Docker container.
kli rotate --name controller --alias controller
Be sure to repeat the dkr webs generate
command:
dkr did webs generate --name controller --did did:webs:blockchainbird.org:did-webs:EG8GsKYdICKs-zI6odM6tvCmxRT2J-7UkZFqA77agtb8 --oobi http://witnesshost:5642/oobi/EG8GsKYdICKs-zI6odM6tvCmxRT2J-7UkZFqA77agtb8/witness/BBilc4-L3tFUnfM_wJr4S4OJanAv_VmF_dJNN6vkf2Ha
Now upload the overwritten did.json
and keri.cesr
again to the public spot.
A diff comparison of the old (in green) and the new (in red) did.json: A diff comparison of the old (right) and the new (left) keri.cesr; in blue the added part:
- In Docker, select
Use Rosetta for x86/amd64 emulation on Apple Silicon
- Before running docker compose
export DOCKER_DEFAULT_PLATFORM=linux/amd64
Then the kli incept --name controller --alias controller --file "/keripy/my-scripts/my-incept.json"
command will give this response:
ERR: Already incepted pre=[Your prefix of another AID].
Various solutions if you're a Docker expert. If not, we'll go down the more rigorous path:
- Step out of the running container with
exit
- and then
docker compose down
. This should respond with:
[+] Running 3/3 ⠿ Container dkr Removed 0.0s ⠿ Container witnesshost Removed 13.7s ⠿ Network did-webs-iiw37-tutorial_default Removed 3.1s Now you could continue with:
docker compose up -d
docker compose exec dkr /bin/bash
There's no problem that we know of when you use Github pages in a bare-bones manner. However, if you use static page generators to populate your github pages (e.g. Jekyll or Docusaurus) be sure to choose the right spot of your files and extract the right paths of the links needed to resolve:
This is the web address of the docusaurus
directory:
https://weboftrust.github.io/WOT-terms/test/did-webs-iiw37-tutorial/
But the exact spot to extract the files as text would be something like:
http://raw.githubusercontent.com/WOT-terms/test/did-webs-iiw37-tutorial/[your AID]
The reason for this confusion is dat a static page generator like Docusaurus or Jekyll might interfere with the location, visibility and accessibility of your files on Github Pages.
We advise to choose a simple public directory that you control and we won't go into more detail on how to deal with static site generators.