beakerbrowser/hashbase

Stripe API key needed to install ?

freedomtrain opened this issue · 33 comments

I tried to test install hash and received the error below. It seems that I may need a stripe api key ?

TypeError: Cannot read property 'secretKey' of undefined
at new UsersAPI (/var/www/vhosts/doug.io/dub.doug.io/hashbase/lib/apis/users.js:14:38)

Thanks

That's a bug, but we haven't put a lot of effort yet into self-deploys that might not need some of our features like payments. Are you looking to run an instance?

Wanted to test it out . I had tested it out about 3 months ago and had an instance up to understand how it all worked.

Thanks !

Do I need to have wildcard enabled for the sites to work ?

I haven't tested it recently, but, if you're not going to have a ton of sites, you can use letsencrypt for cert provision with letsencrypt: true

I m having issues with sites.....set up test version of hashbase on a domain and when I add a .dat and then attempt to go to its web link I receive the message below......I m using proxy pass....could this be the issue ?

This site can’t be reached

deck-admin.rocket.io unexpectedly closed the connection.
Try:
Checking the connection
Checking the proxy and the firewall
Running Network Diagnostics
ERR_CONNECTION_CLOSED

First of all, rocket.io is a sweet domain name, hat tip to that

If you're using lets encrypt, you need to expose the server directly, not behind apache. From https://github.com/beakerbrowser/hashbase#lets-encrypt:

If enabled, port will be ignored and the server will register at ports 80 and 443.

I wager that's the issue

when adding the domain i added a lets encrypt cert....i did not do this via the hashbase config file....could this be the issue....
port 80 and 443 are not free

Ok, make sure the config for letsencrypt is false.

I forgot, I do have some specific customizations in my nginx config. Have a look. proxy_set_header might be pretty important. (I'll put this in the README)

server {
        server_name hashbase.io ~^(?<subdomain>.+)\.hashbase\.io$;

        listen 80 default_server;
        listen [::]:80 default_server;

        listen 443 ssl;
        listen [::]:443 ssl;

        ssl_certificate     /home/pfrazee/wildcard.hashbase.io-cert/server.crt-chained;
        ssl_certificate_key /home/pfrazee/wildcard.hashbase.io-cert/server.key;
        ssl_protocols       TLSv1 TLSv1.1 TLSv1.2;
        ssl_ciphers         'ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES256-GCM-SHA384:DHE-RSA-AES128-GCM-SHA256:DHE-DSS-AES128-GCM-SHA256:kEDH+AESGCM:ECDHE-RSA-AES128-SHA256:ECDHE-ECDSA-AES128-SHA256:ECDHE-RSA-AES128-SHA:ECDHE-ECDSA-AES128-SHA:ECDHE-RSA-AES256-SHA384:ECDHE-ECDSA-AES256-SHA384:ECDHE-RSA-AES256-SHA:ECDHE-ECDSA-AES256-SHA:DHE-RSA-AES128-SHA256:DHE-RSA-AES128-SHA:DHE-DSS-AES128-SHA256:DHE-RSA-AES256-SHA256:DHE-DSS-AES256-SHA:DHE-RSA-AES256-SHA:AES128-GCM-SHA256:AES256-GCM-SHA384:AES128-SHA256:AES256-SHA256:AES128-SHA:AES256-SHA:AES:CAMELLIA:DES-CBC3-SHA:!aNULL:!eNULL:!EXPORT:!DES:!RC4:!MD5:!PSK:!aECDH:!EDH-DSS-DES-CBC3-SHA:!EDH-RSA-DES-CBC3-SHA:!KRB5-DES-CBC3-SHA';
        ssl_dhparam /etc/nginx/dhparams.pem;
        ssl_prefer_server_ciphers on;

        # live routes
        location / {
                # these 5 settings enable event-streams
                proxy_set_header Connection '';
                proxy_http_version 1.1;
                chunked_transfer_encoding off;
                proxy_buffering off;
                proxy_cache off;

                # gzip
                gzip on;
                gzip_vary on;
                gzip_proxied any;
                gzip_comp_level 6;
                gzip_buffers 16 8k;
                gzip_http_version 1.1;
                gzip_types text/plain text/css application/json application/x-javascript text/xml application/xml application/xml+rss text/javascript application/javascript;   
             
                proxy_set_header Host $subdomain.hashbase.io;
                proxy_pass http://127.0.0.1:8080;
        }       
}       

Got it !!!
Will give this a try !!!!

Thanks !!!

When I add " proxy_set_header Host $subdomain.rocket.io;"

I receive an error message

Invalid nginx configuration: nginx: [emerg] unknown "subdomain" variable nginx: configuration file /etc/nginx/nginx.conf test failed

Yeah that variable is created by the server_name hashbase.io ~^(?<subdomain>.+)\.hashbase\.io$; line. If you dont have a pattern-matching rule like that, you can just set the rule directly, eg proxy_set_header Host deck-admin.rocket.io;

for this to work do i need to have add a wild card A record ?

Thanks !!!

If you want sites to be created dynamically by users, yep

I seem to be almost good
Now receiving this error message
Error: No default engine was specified and no extension was provided.

I get that error every so often too. I havent been able to track down the cause yet, but it doesnt seem to manifest as a break in the app. Did you notice any glitches?

The app breaks with this error when attempting to go to sites https location

Yes....The process crashes ....Thanks !!!

....still testing to find a way to have everything up and running....set letsencrypt to true......tried to assess a https site and it seems that hashbase is looking for letsencrypt files here /root/letsencrypt/etc/live/ mine are in here /usr/local/psa/var/modules/letsencrypt/etc/live
I cannot find a place to change this setting ?

Thanks

Yeah that's not currently configurable, you'll need to make a PR to add that config

Got ya!!!!
Seems that my best option is try to figure out what is going on with
Error: No default engine was specified and no extension was provided.

Thanks for your help !!!!

No worries. If you have time to track down that error, feel free. If not, I'll tackle it soon

Thanks !!!!!!

Is there a way to use different ports with the letsencrypt option set to true
port 80 and 443 are being used by another app on our server ?

I m not having much luck fixing the "Error: No default engine was specified and no extension was provided" issue.
Below is my proxy pass...

Thanks for your help !!!

server_name rocket.io ~^(?.+).rocket.io$;

Set the location routing.

location ~ / {
proxy_set_header Connection '';
proxy_http_version 1.1;
chunked_transfer_encoding off;
proxy_buffering off;
proxy_cache off;

gzip on;
gzip_vary on;
gzip_proxied any;
gzip_comp_level 6;
gzip_buffers 16 8k;
gzip_http_version 1.1;
gzip_types text/plain text/css application/json application/x-javascript text/xml application/xml application/xml+rss text/javascript application/javascript;

##Use the domain.tld here.
    proxy_set_header Host $subdomain.rocket.io;
proxy_set_header X-Real-IP $remote_addr;
proxy_pass http://127.0.0.1:7070;

}

Try pulling latest on master, I just pushed a potential fix to the View error.

Thanks I will give it a try !!!

Tried new master and still having the
Error: No default engine was specified and no extension was provided

This is with the very latest master? Yeesh. Ok I'll keep trying things.

I finally solved it. Pull latest and you should be good

I will give it a try

Thanks !!!!