Change the default data limit in a custom Carto installation

How to change the default data limit in a custom Carto installation

Recently, I needed to install the open source Carto software on a virtual machine. Everything went well, big thanks to Michael Minn’s brilliant post which provides details and guidance on the whole course of the installation process.
While this post is a great resource, it lacks a number of configuration related information which I am going to share with you in this- and a couple other posts.

The first part in this series of posts is going to cover how to change the default data limit in a custom Carto installation, which is set to 1.5GB by default.

I was not sure exactly where to start, but by common sense I thought that such setting would easily be accessible in the folder cartodb/config/app_config.yml
To my surprise, I found NO such settings in that file so I needed to come up with a new idea.

I was doing some research and finally concluded that a LOT of account related configuration is stored in a table within the PostgreSQL database created during the installation.
If you followed the instructions in the guide I referenced above, the PostgreSQL database that your Carto installation uses should be carto_db_development.

Within this database, there is a table named users. It has a field called quota_in_bytes

Now all you need to do is performing a dead simple SQL update:

UPDATE users SET quota_in_bytes = your-desired-size-in-bytes WHERE email=’your-users-email-address’;

and then restart Carto.

You are then done!