Platform
Environment variables
Every variable CloudHike.dev creates, how to copy them, and how to add your own.
Variable reference
A variable appears only after its service is Ready.
| Variable | Service | Browser safe? |
|---|---|---|
DATABASE_URL | Postgres connection string | No |
AUTH_URL | Auth API base address | Yes |
AUTH_PUBLISHABLE_KEY | Auth project key | Yes |
AUTH_SECRET_KEY | Auth admin key | No |
S3_ENDPOINT | Storage address | No |
S3_REGION | Storage region | No |
S3_BUCKET | Storage bucket name | No |
S3_ACCESS_KEY_ID | Storage access key | No |
S3_SECRET_ACCESS_KEY | Storage secret key | No |
REDIS_URL | Redis connection string | No |
The Environment tab
- Values are hidden until you click Reveal. Revealing is rate limited and recorded in the audit log.
- Copy copies one value. Copy as .env copies the whole file, with values quoted when they need it.
- Add your own variables, such as third-party API keys. They are encrypted at rest and included in the copied .env, so one file holds everything.
Where to put the file
| Framework | File | Notes |
|---|---|---|
| Next.js | .env.local | Prefix with NEXT_PUBLIC_ only for browser-safe values |
| Vite | .env.local | Browser values need the VITE_ prefix |
| Node.js | .env | Run with node --env-file=.env app.js or use dotenv |
| Python / Django / FastAPI | .env | Load with python-dotenv |
| Docker Compose | .env | Or env_file: .env on the service |
| Vercel, Netlify, Fly, Railway | Project settings | Add each variable in the host's dashboard instead of committing the file |
Add the env file to .gitignore before the first commit. If a secret was committed, use Reset on its service card to rotate it.
Download with the agent token
Each project has an agent token (see Build with AI). With it, a script or AI agent can download the same .env without a browser session:
curl -fsS -H "Authorization: Bearer <access token>" https://cloudhike.dev/api/projects/<project id>/env > .env.localA 401 means the token is wrong or revoked. The endpoint is rate limited, and each download is written to the audit log. Revoke or reset the token on the Overview tab at any time.
Use with AI
Ask an agent to load your variables safely and keep secrets out of git and the browser.
- 1
Open a terminal in your app's folder and start Claude Code.
claude
- 2
Paste the prompt below and press Enter. Approve the file edits and commands it asks about.
- 3
Optional: save a short note about CloudHike.dev in CLAUDE.md so every session knows about it.
Read https://cloudhike.dev/docs/md/environment, then set up environment variables for this app from my CloudHike.dev project. Project id: <paste from the Overview tab> Access token: <paste from the Overview tab> Download the .env with the access token, merge it into this app's env file without removing existing keys, make sure that file is git-ignored, and update any .env.example with variable names only (no values). Do not save the access token anywhere in the app.
Replace the placeholders in <angle brackets> before sending. Always review what the agent changes.
