Get a dockers url

Hi, there! Trying to create a droplet on digital ocean as stated in your github page, and this may be a dumb question, but I can’t seem to find the url that would go into the dynamo setup. All I get is an IP-adress. Any guidance in the matter would be most appreciated.

No such thing as a dumb question. Speckle’s quite fun, we need to make a lotta people transition from local scripting to a web-ready state :spider_web:

You can use http://dropletipadress:3000/api/v1 for your speckle account registration. The admin ui will be at http://dropletipadress:3000 and the viewer at http://dropletipadress:3000/view.

Setting up a url is a tad bit more complicated, and it means:

  • actually buying one (or use a subdomain of an existing one)
  • pointing it to your droplet
  • reverse proxy port 3000 to 80 via nginx
  • (optional but highly recommended) getting a SSL cert via letsencrpyt.

Digital ocean has a lot of nice tutorials on the above and are generally a friendly provider.

Thanks! One step further. I, however, get this error message when trying in Dynamo: image
If I do logon the admin site, I’ll see a stream there, but I can’t do nothing with it appearantly.

I’ve just been setting up a server going through nginx too. There’s a trick to get the websockets to work, since they’re not just plain http.

Following what this page says, I added the three lines (proxy_http_version and proxy_set_header) to the location block, and it now seems to work.

Another thing to note is that the Speckle server doesn’t work if you don’t have it hosted at the root of your domain (i.e. you can’t put it at mydomain.com/speckle/). @dimitrie, I’m pretty new to Speckle, but this might be something I could tackle. Should I open an issue on GitHub, or message you on Slack or something?

How i’ve usually handled this is to via proxy passes and rewrites (and filters to make sure url refs are correct) via nginx, but i’ve never really tried this recently - this is from the age of speckle.streams.

So a PR is more than welcome that would fix this! Just bear in mind though, nginx config is for now outside the scope - though maybe some instructions are in order in the readme :slight_smile:

1 Like

And for reference, here’s my server block from /etc/nginx/sites-available/hestia.speckle.works:

server {
	# SSL configuration
	listen 443 ssl http2;
	listen [::]:443 ssl http2;

	root /root/apps/SpeckleHestia/static;

	server_name hestia.speckle.works;

	gzip on;
	gzip_proxied any;
	gzip_types text/plain text/xml text/css application/x-javascript application/json;
	gzip_vary on;
	gzip_disable "MSIE [1-6]\.(?!.*SV1)";

	location ~ /.well-known {
        	allow all;
    	}

	location / {
		#http trafic
		proxy_pass http://localhost:3030;
		proxy_set_header X-Real-IP $remote_addr;
		proxy_set_header Host $host;
		proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;

		#ws support
		proxy_http_version 1.1;
		proxy_set_header Upgrade $http_upgrade;
		proxy_set_header Connection "upgrade";
	}


    ssl_certificate /etc/letsencrypt/live/hestia.speckle.works/fullchain.pem; # managed by Certbot
    ssl_certificate_key /etc/letsencrypt/live/hestia.speckle.works/privkey.pem; # managed by Certbot
}

Off the top of my head, to have it working under a domain /hestia, i think you needed to use sub_filter:

location /speckle {
   #  all the rest from the above + the subfilter directive:
   #  to make sure url refs are correct (but this is *really* from atrophied memories)
   sub_filter: "https://speckle.works/hestia" "https://speckle.works";
}
1 Like