Knowledgebase · Last updated 2 December 2026
Secrets and settings (.env) for all your computers
Every project needs a few secrets and settings: an API key, a database password, a bot token. Set them once on your Account, or paste your .env file, and every awx computer you own has them, for the Terminal, the agent and your services.
What it is
Programs often need a secret or a setting that should not be written in the code: an API key, a database password, a bot token, DEBUG=1. The usual answer is a .env file. On awx you keep them in one place, your Account, and every computer you own gets them.
- Set them once, on Account, Secrets and settings.
- Every computer you own gets them, as the file
~/.config/awx/env: running computers at once, a computer that is asleep when it next starts, and new computers when they are made. - The Terminal tab, the desktop’s terminal, the built-in agent’s commands and your services load them, so they are ordinary environment variables there.
Add a secret or a setting
- Open Account, then Secrets and settings.
- Type a Name, for example
OPENAI_API_KEY. Names are letters, digits and_, starting with a letter or_. - Paste the Value and press Save.
After you save it, a value is never shown again: the list shows the name, the last four characters of a long value, and when you changed it. To change one, press Change next to it, type the new value and save. Delete removes it from all your computers.
Paste a whole .env file
Already have a .env file? Open Paste a .env file, paste it, and press Add these. Each NAME=value line becomes one entry. Lines starting with # are skipped, and export in front of a name and quotes around a value are fine:
# database
DATABASE_URL='postgres://aina:secret@db/fyp'
export OPENAI_API_KEY=sk-...
DEBUG=1
Use them in your programs
Open a new Terminal tab and they are there:
echo $DATABASE_URL
In Python:
import os
key = os.environ["OPENAI_API_KEY"]
In Node.js, process.env.OPENAI_API_KEY. A program you start from the Terminal sees them; so does a command the built-in agent runs for you.
A Terminal tab that was already open before a change does not see the change. Open a new one, or run set -a; . ~/.config/awx/env; set +a in it.
Services
A service (on a computer’s Links tab, Services) loads your settings each time it starts. After you change a value, restart the service to give it the new one: remove it and add it again, or restart the computer. A name you delete stays in a running service until the computer restarts.
A project that wants its own .env file
Many frameworks (Flask, Django, Node.js with dotenv, Laravel) read a .env file in the project folder. Link it to your settings, so there is still only one place to change them. In the project folder:
ln -s ~/.config/awx/env .env
echo .env >> .gitignore
The second line keeps .env out of Git, so it never goes to GitHub. The file is written as NAME='value', which both the shell and these frameworks read.
Who can see them
- On the server, your values are stored encrypted. The page never sends a value back, even to you.
- On your computers, the file can be read only by the computer’s own user. But anything running on your computers can use the values: your programs, the built-in agent, and anyone you let take over a desktop. Add only what belongs there.
- The built-in agent can use them, but does not see them. If a command prints a value, the agent reads
[OPENAI_API_KEY hidden]instead, and so does the saved chat. - Do not put the password of your Google, bank or university account here. Use keys made for one purpose, which you can delete and make again.
Good to know
- A value cannot contain a single quote (
') or a line break. For a multi-line key (a private key file), save the file on the computer instead. - Some names are used by the computer itself and cannot be set here, such as
PATH,HOMEandLD_PRELOAD. - Up to 100 entries, each up to 8,192 characters.
- Programs started from the desktop’s menus do not load them. Start the program from a terminal instead.
Common questions
Where do I put my .env file on awx?
On Account, Secrets and settings. Paste it there and every computer you own gets the values in ~/.config/awx/env. For a project that wants its own .env, link to that file: ln -s ~/.config/awx/env .env.
Can the agent see my API keys?
The built-in agent can use them in commands but does not see them: if a command prints a value, the agent reads [NAME hidden] instead, and so does the saved chat.
Why does my program not see a new value?
A Terminal tab that was already open, or a service that is already running, keeps the old values. Open a new Terminal tab, or remove the service and add it again.
Are my values safe?
They are stored encrypted on the server and never shown again after you save them. On your computers only the computer's own user can read the file, but any program running there can use the values, so add only keys made for that purpose.