Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hosted Bitsquare using VPS #511

Closed
meapistol opened this issue Jun 30, 2016 · 9 comments
Closed

Hosted Bitsquare using VPS #511

meapistol opened this issue Jun 30, 2016 · 9 comments

Comments

@meapistol
Copy link

meapistol commented Jun 30, 2016

I have managed to install and view Bitsquare using a Google Compute Engine instance. This is the way I did it:

Go to Google compute engine (https://cloud.google.com/compute/) and start an instance using the free trial. One gets $300 credit and 60 days trial period. I used one CPU, 40 GByte of boot disk, and the default value of RAM, 3.75 GB.
I chose Ubuntu 16.04 LTS as the operating system.
How to make a project and start an instance is explained in: https://goo.gl/1Ljy7O
which also explains how to install a vnc-server. In short, ssh to your instance, which can be done from the google compute engine (gce) console, then execute:
$ sudo apt-get update
$ sudo apt-get install tightvncserver
$ sudo apt-get install aptitude tasksel
$ sudo tasksel install gnome-desktop --new-install
$ sudo apt-get install gnome-panel gnome-settings-daemon metacity nautilus gnome-terminal
$ sudo apt-get install ubuntu-desktop
$ sudo apt-get install gnome-session-fallback
$ vncserver

Some of these installations are not given in https://goo.gl/1Ljy7O, but I found them to be either necessary or useful.

The last command will prompt you for a password and the option of having a view only password.

One then has to open the Firewall on the instance which is best explained in: https://goo.gl/1Ljy7O
This is done on the gce console in the web browser.

After this download a vnc viewer for your local computer. I used https://www.realvnc.com/ and the free trial version.
There is also a Chrome extension for vnc, which seems to work.
My computer is a MacBook running OS X 10.9.5.

It is necessary to change the .vnc/xstartup file. From your home directory:
$ cd .vnc
and then edit xstartup using your favourite editor, e. g. vim.
I use the following script in xstartup:

!/bin/sh

[ -x /etc/vnc/xstartup ] && exec /etc/vnc/xstartup
[ -r $HOME/.Xresources ] && xrdb $HOME/.Xresources
xsetroot -solid grey -cursor_name left_ptr
vncconfig -iconic &
x-terminal-emulator -geometry 80x24+10+10 -ls -title "$VNCDESKTOP Desktop" &
x-window-manager &
gnome-session &
gnome-panel &
gnome-settings-daemon &
metacity &
nautilus &

Having done this you might have to do a reboot:
$ sudo reboot

After the instance has rebooted, ssh to it from gce console and start vncserver. If you want you may specify a geometry.

$ vncserver
$ vncserver -geometry 1280x1024

and then login using the vncviewer on your local computer. You should now have a nicely looking desktop in your vncviewer, either interactive or view only depending on which password you used. You still have to download Bitsquare and install it.

$ wget https://github.com/bitsquare/bitsquare/releases/download/v0.4.8/Bitsquare-64bit-0.4.8.deb
$ sudo dpkg -i Bitsquare-64bit-0.4.8.deb

On the vnc-desktop under application/other you should find Bitsquare and be able to start it by selecting it. It resides under /opt/Bitsquare.

I have tried to use vnc on my Android Nexus phone and can interact with Bitsquare also then. It is thus seems possible to trade using a mobile phone.

UPDATE Aug. 21: A problem I found and could not solve is that cut and paste does not work using RealVNC. I now switched the client to Jump Desktop without any changes to the server that I connect to. This works much better and seems to be faster also. I bought Jump Desktop for about $35 from Apple Store. Worth every penny given the trouble I've had with RealVNC.

IMPORTANT I have found that ssh from the gce console can become nonworking quite easily. I suggest that you find another safer way to access your instance. In my case I tried gcloud shell which can be found on the gce console. The login command is:

$ gcloud compute ssh INSTANCENAME

which will prompt for the time-zone of your instance. I guess Google needs to know which datacenter to connect to.

This worked even if the console ssh did not work. Having established a connection I could establish a normal ssh connection (with a new key-pair) using the standard OS X terminal.

Even if ssh fails, VNC will tend to work if it is setup.

@ManfredKarrer
Copy link
Member

Great thanks! I added it to the wiki as well: https://github.com/bitsquare/bitsquare/wiki/Hosted-Bitsquare-using-VPS

@ivilata
Copy link
Contributor

ivilata commented Jul 6, 2016

Cool! @meapistol, I suggest that you have a look at X2Go as a replacement for VNC, it's way faster over bad links and it has the ability to start new remote sessions from the client, so that you can avoid the xstartup script.

@meapistol
Copy link
Author

Thks, I will try this. VNC is indeed very slow and I have not been able to cut and paste yet, which is almost necessary for Bitsquare. On a positive note, I can always ssh to the instances now, using a terminal.

@haiqu
Copy link
Contributor

haiqu commented Sep 23, 2016

This is good news, since I'm in no position to keep a computer running 24/7 here on the yacht. I may even be able to wedge it in with the HOdlcoin node I run on Scaleway, which would make it a freebie.

Thanks.

@haiqu
Copy link
Contributor

haiqu commented Oct 19, 2016

Had an extended though on this. If the app were running on a server, a thin client or web browser plugin could allow multiple users via FIDO U2F keys for the login.

@meapistol
Copy link
Author

meapistol commented Dec 14, 2016

I have now updated the instructions on the wiki, using a simple installation script instead. Rebooting does not seem necessary anymore.
https://github.com/bitsquare/bitsquare/wiki/Hosted-Bitsquare-using-VPS

@ManfredKarrer
Copy link
Member

Great thanks @meapistol !!! Now people can access Bitsquare via mobile as well!

@ripcurlx
Copy link
Member

Do we still need this issue open, as there is the wiki entry for it already available? Also we have the API (https://github.com/mrosseel/bisq-api) by @mrosseel which covers this in a way.

@cbeams
Copy link
Member

cbeams commented Jan 22, 2018

Closing as complete (or at least no longer needed / relevant). Probably should have been closed a long time ago.

@cbeams cbeams closed this as completed Jan 22, 2018
cbeams added a commit to cbeams/bisq that referenced this issue Nov 14, 2018
This doc was originally transcribed from bisq-network#511, then moved to the wiki,
then moved here. Removing it now as (a) it's not clear this is of value to
anyone other than the original author and (b) this approach is not
necessarily something we want to advertise or promote.
cbeams added a commit to cbeams/bisq that referenced this issue Nov 14, 2018
This doc was originally transcribed from bisq-network#511, then moved to the wiki,
then moved here. Removing it now as (a) it's not clear this is of value to
anyone other than the original author and (b) this approach is not
necessarily something we want to advertise or promote.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants