I'm trying to use CARTO VL on local Ubuntu 16.04 installation. To connect to local CARTO installation, I used the following config in my index.html:

  serverURL: 'http://me.localhost.lan:3000'

and then simply connect to dataset like this:

const source = new carto.source.Dataset('compact_regions');

I used "me" as the subdomain here and I can use the same dataset from my trial CARTO account but I can't do the same with my local CARTO. Could anyone please give me some hints or what not? Do I need to do anything with config / https to make this work?

  • can you share what is the network activity you see on your browser? What errors are being returned by your server? – Jorge Sanz Jun 26 '18 at 7:48

Assumming the account in your local installatioin is named me, you can try to define your source like this, which I hope works for you:

const source = new carto.source.Dataset(
  'compact_regions', {
    user: 'me',
    apiKey: 'default_public'
  }, {
    serverURL: 'http://me.localhost.lan:8181'

If the dataset is not public you'll need to provide a valid apiKey.


You're right that, with a local installation, you need to provide the serverURL parameter, so that CARTO VL can access the Maps API to fetch the data from a CARTO account.

But this parameter cannot be set in the setDefaultConfig function at the moment; you'll need to use the third argument to the carto.source.Dataset or carto.source.SQL constructors for that. (the second argument is the same authentication options you pass to setDefaultConfig).

Also, since in a local installation you're probably not using the same routing that the CARTO public SAAS provides, you'll need to direct the requests directly to the Maps API, which by default is running in the port 8181.

  • Thanks for your solution! I actually figured out that I needed to use port 8181, and I was able to do it with carto.setDefaultConfig({ serverURL: 'me.localhost.lan:8181' }); On a side note, is there any way to download example datasets like nyc taxi and origin-destination data? I think it'd help me greatly if I could somehow get those data and try to create VL animations on my own. – Sonic Jun 26 '18 at 9:10
  • @Sonic I think that's better to be addressed on a separate question. – Jorge Sanz Jun 26 '18 at 13:10
  • @JorgeSanz ok will do – Sonic Jun 27 '18 at 0:16

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.