CartoDBRemote - UCL-ShippingGroup/shipviz GitHub Wiki

To access an installation of CartoDB in development mode (default mode from instructions) in our server at the UCL Energy Institute, some configuration files need changing:

Note: To know the IP of the server, do ifconfig and look for ethic and the IP will be right after inet addr: in the form X.X.X.X.

At the server with IP X.X.X.X:

####/etc/redis/redis.conf This file contains the configuration for Redis, which is in charge to serve Windshaft and CartoDB SQL API. By default, only connections from localhosts are allowed. Open the file for edit, look for this line: bind 127.0.0.1 and replace with bind 0.0.0.0

Optionally, to check this has gone fine, from a remote computer (client), install redis-cli (see http://redis.io/topics/quickstart), and try the following: redis-cli -h X.X.X.X ping This should return PONG. In any other case, something's gone wrong.

####~/CartoDB-SQL-API/config/environments/development.js Look for the first appearance of a "host" variable and change it from '127.0.0.1' to ''. Otherwise it'll only accept connections from localhost!

####~/Windshaft/config/environments/development.js Same as with CartoDB-SQL-API: Look for the first appearance of a "host" variable and change it from '127.0.0.1' to ''. Otherwise it'll only accept connections from localhost!

Once all these changes are gone, restart all the services. See here.

At the client (computer that wants to connect to server with IP X.X.X.X)

Computers in our LAN can access the server login page by just entering this URL in their browser: http://X.X.X.X:3000/login

When entering login information, they'll be redirected to http://username.localhost.lan:3000/dashboard, which will then disconnect from the remote server due to the misleading reference to localhost. In order to avoid this problem, a DNS server needs to be configured to assign an internal domain to the server so that other computer in the LAN can successfully be redirected to it. Since this is not possible at the moment, the only work around is to change the client machine's file contents for /etc/hosts (in Windows C:\Windows\System32\drivers\etc\hosts). You need to add a line to map the IP of the machine serving CartoDB to username.localhost.lan, like this:

X.X.X.X username.localhost.lan localhost.lan

This should suffice to redirect the client computer to the correct CartoDB sites.

With http://username.localhost.lan:3000/login you should land now land on the login page.