How to edit environment variables after deploying?

I typed the wrong value for the QUANTROCKET_LICENSE_KEY environment variable so I'm getting permission errors. How do I edit my environment variable after deploying?

I'm on a Mac.

After setting the correct value for the environment variable, for example...

export QUANTROCKET_LICENSE_KEY=thecorrectvalue 

...you can redeploy just the license service and it will pick up the new value:

cd ~/quantrocket
docker-compose -p quantrocket up -d license-service

You can dump out the license profile to make sure it worked:

quantrocket license get
1 Like

I've got several IB accounts, and I've attempted to change the account I am using by using:

echo 'export IBG1_USERNAME=actualusername' >> ~/.bashrc and
echo 'export IBG1_PASSWORD=actual password' >> ~/.bashrc

However, now when I type:

quantrocket account balance --fields 'NetLiquidation' --latest --force-refresh --pretty

I see 2 accounts. I thought adding the second would overwrite the first, but it appears they are both there now. Could you please tell me how to drop one?

Account 1 one was saved to your database from before and won't get updated anymore unless you connect to it again, but it will still be read from your database when you run that query. You should see this reflected in the LastUpdated field, which should be more recent for Account 2.

Thanks, that is correct, the first account entered shows an older LastUpdated time, which doesn't change, and the second account shows a later time, which changes. Just to confirm I understand, that means that the first account is now just a historical record that shows up when running this query, but all data will be pulled from and trades will be made to the second account (with more recent LastUpdated time).

That's exactly correct.

1 Like