Hi @MichaelFedora,
Totally hear where you’re coming from. I very much want to be able to easily deploy my own Gaia hub too.
To make this a reality, I’m in the process of upgrading the authentication protocol to have the authentication program (e.g. the Browser, your extension, the CLI) to pass both the Blockstack Core API endpoint and the Gaia write endpoint to the application via the authResponse
JWT. There are two PRs for this:
Once I can create a reliable way to test various versions of blockstack.js against various versions of authResponse
tokens (which the comments in that PR describe), we can merge it to master and ship it. That, and we need to merge Gaia’s develop
branch to its master branch.
In the mean time, you can already run your own Gaia hub if you use the CLI authenticator. If you install the CLI and npm link
the feature/authResposne-1.3
feature branch of blockstack.js into your node_modules
, you can use the CLI as an authenticator as follows:
$ blockstack-cli authenticator "YOUR-GAIA-HUB-WRITE-URL" "YOUR 12-WORD SEED"
To deploy your own Gaia hub, you’ll want to run the develop
branch. You would set it up so it only takes writes from your Blockstack ID(s). For example, here’s a sample Gaia hub config that stores data to /tmp/gaia-hub
using the disk driver, and allows writes only from judecnelson.id
(note that my ID-address is ID-15gxXgJyT5tM5A4Cbx99nwccynHYsBouzr
):
{
"servername": "localhost",
"port": 4001,
"driver": "disk",
"readURL": "https://my.example.domain/hub/",
"whitelist": ["15gxXgJyT5tM5A4Cbx99nwccynHYsBouzr"],
"proofsConfig": {
"proofsRequired" : 0
},
"diskSettings": {
"storageRootDirectory": "/tmp/gaia-hub",
},
"argsTransport": {
"level": "debug",
"handleExceptions": true,
"stringify": true,
"timestamp": true,
"colorize": false,
"json": true
}
}
Using this config file (with the readURL
changed appropriately to your server), you can run the Gaia hub with blockstack-gaia-hub /path/to/your/config.json
.