I have deployed gaia hub on heroku, how to connect?


#1

Hi,

I have deployed gaia hub on heroku, but i can’t figure out how to connect to it.
In blockstack browser, the button to disconnect from default storage is greyed out.

Thank you!


#2

Hi @ray

We’re still working on making this more easily configurable from the browser (the issue for easier configurability is https://github.com/blockstack/blockstack-browser/issues/1244 – and its a user story for our current sprint 0.28)

Currently, you can manually change the URL of the Gaia hub that the browser uses by going to Settings -> API settings. This will change which gaia hub your browser makes writes to (if you already registered an ID, the zonefile will still point at the old gaia hub — updating this is part of the effort involved in making this configuration more user friendly). However, apps won’t receive that URL from the browser in the current version of blockstack.js:

Resolving these is a short-term goal for the team – and better support for customized gaia hubs should be coming soon.


#3

Hi thank you for the detailed explanation.

I have some more questions:

Q1. How to manually change URL of Gaia hub before creating a new account?

I read this thread: Uploading a signed profile.json to the Blockstack Gaia hub and create a new [gaia_hub] section based on my heroku hub. But when I create a new profile, client.ini is overwritten with the default [gaia_hub] settings.

Q2. I imagine I can change the source code for the blockstack-browser so that it initializes my own heroku hub url instead of the default hub?

Thank you so much for your time!

Edit 1:
I’m going to follow this thread to see how it works: Uploading a signed profile.json to the Blockstack Gaia hub


#4

You can change the URL that the blockstack-browser uses by going to http://localhost:8888/account/api (also can get to that page via “Settings”-> “API Settings”) and changing the “URL for Gaia Hub Connection” setting. There are a couple of places within the browser code that ignore that setting (places that try to guess where a given user’s data is stored, if the user doesn’t have a zonefile).


#5

@aaron I have pointed my Browser to my Heroku GAIA hub, but how can I check whether it stores profile information in the Heroku app/bucket and access it?


#6

@ray is it required to generate a token with the connectGaia.js script when using the Heroku deployment? Or can I just enter this in the gaia_hub section?

[gaia_hub]
url_prefix = https://my.herokuapp.com
token = ""
server = https://my.herokuapp.com
address = my_zonefile_address


#7

@aaron would the Blockstack Browser URL for GAIA Hub connection have to be in the following format?

https://myappname.herokuapp.com


#8

Yep – that’s the right format.


#9

I couldn’t get it to work in the end… I guess I’ll just use the 5mb limit default storage to prototype my app first.


#10

Hi @ray which problem(s) did you run into with the Heroku GAIA Hub template?


#11

I got the Heroku template to connect to my blockstack browser, but I have no idea how to do authentication so that the Heroku instance will allow my blockstack browser to read and write to it. For example I couldn’t get my local copy of the todo-list app to connect to Heroku.

I search for a tutorial but couldn’t find any that mentions connecting your own storage to blockstack. I asked on forums and github and the devs said they are planning to add support for users to set custom storage options in the blockstack browser. (I think the option was there but they had to take if off during the token sale)

I hope my explanation is clear?


#12

@ray Thanks for your explanation.

@jude Are there any how-to’s on this? We are trying to do the same.