Installation without root user

Here’s a deeper explanation on the config files and if you need to edit another one:

  1. Baserow when it starts up looks for the environment variable MEDIA_ROOT and uses it to decide where it should store media files in the filesystem
  2. By changing /etc/supervisor/conf.d/baserow.conf you change what this environment variable is when Baserow the server is started up by supervisord
  3. However when you just run a ./baserow cmd on the command line, it the baserow program also checks the environment for the MEDIA_ROOT variable
  4. The environment of your command line program is separate and wont use the config defined in /etc/supervisor/conf.d/baserow.conf which is just config for the particular program that launches and runs Baserow
  5. So to properly run ./baserow cmd's from the command line you need to separately set the environment variables in your command line first by either doing the above command MEDIA_ROOT=/home/joeyli/opt/baserow/media baserow sync_templates which sets MEDIA_ROOT in the environment just for that particular command
  6. Or you could run export MEDIA_ROOT=/home/joeyli/opt/baserow/media in your command line which will then keep it set for the remainder of your session.
  7. There are a number of other things you could do here to not have to remember to keep on setting env variables when using the command line like creating a bash script which sets them up and then calls baserow cmd etc. You could also directly edit baserow/src/backend/baserow/config/settings/base.py:300 if you are comfortable making changes to the settings python file, however future upgrades of Baserow might require you to resolve merge conflicts.
1 Like