by Dimitrie Stefanescu
4 min read. Posted on Mon, Sep 4, 2017
Please note: this is a quite insecure way of deploying the speckle server. It is, nevertheless, fast and gives a quick satisfaction :) You can follow this tutorial for a local install just as well; just skip to part 3 (install mongo).
Go to digitalocean.com* and create a VM running Ubuntu 16.04.3. Choose a region that’s convenient for you.
* Affliate link. You get $10 free!
Now that we have a VM, note down its IP address. We are ready to access it via the command line and proceed with the following steps.
For a thorough setup, follow this digital ocean tutorial on how to setup your server. Security is not the focus of this tutorial, nevertheless, it is rather important to follow best practices.
For the purposes of this tutorial, we’re going to continue with the
root user. Please be aware this is not a good practice.
To install mongodb, there’s a handy tutorial over on digital ocean that guides you through the process.
Please note, do not allow external access. We work under the assumption that this is a self-contained VM. Any access to the database will be through either ssh or the server.
Run this command in the terminal:
curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.33.5/install.sh | bash
It will copy the latest install script for nodejs and then execute it.
Check that it worked:
nvm ls-remote. If you get an error, simply close the terminal and login in again.
Install node 8.5.0 or later:
nvm install 8.5.0. Speckle Server has been known to run on earlier versions too - but you never know!
Check that you have completed the install by testing node:
node -v should now output the version you’ve selected to install.
Clone the Speckle Server repository into a folder of your choice. First:
mkdir ~/Apps cd ~/Apps
Then grab the latest dev release:
git clone https://github.com/speckleworks/SpeckleServer.git
Afterwards, let’s install the node dependecies:
cd SpeckleServer npm install
To see that things are working, let’s run the application:
node server.js. It should, by default, work! Note though, that you won’t be able to access it form outside the server; there’s a few extra steps going for that to happen.
If you don’t have a domain name, and just want to use speckle out of the box, follow the following steps to edit the
Edit the config file using nano:
nano config.js. Change the following according to your circumstances:
Optionally, change your server name too to something that it will distinguish it from others, i.e. “Dimitrie’s Amazing Server”.
To save your changes with nano, press ctrl + x, then y and hit enter. We can now run the speckle server and hopefully all will be well!
If you now head over to your droplet’s ip adress in a browser, you should be be seeing the following:
Of course, the address bar should read http://YOURDROPLETIP. If you see that, all works!
You’re ready to play with your grasshopper components and start sending data around. Enjoy!
Please remember that this is an insecure install. Furthermore, because you’re running without a SSL certificate, in some cases the websockets are blocked. There might also be issues with gzip compression too.
Ideally you would run the Speckle Server under a proxy like NGINX. Here are a few extra steps: