Set environment variables
Configure app settings and secrets on a Victus App Hosting server using Startup variables in the panel, plus how to read them from your code and when a restart is needed.
Environment variables are the clean way to configure an app without editing code — database credentials, API keys, ports and feature flags. On Victus, each server exposes its configurable variables in the Startup tab of the control panel. The egg defines which variables exist; you fill in the values.
Edit variables in the panel
- 1Open your server in the control panel and go to the Startup tab.
- 2Each field maps to an environment variable (for example PASSWORD, PORT, or a token).
- 3Enter your values and save.
- 4Restart the server from the Console for the new values to take effect.
Changes need a restart
Startup variables are injected when the process launches. Editing a value while the server is running does nothing until you Restart (or Stop then Start) from the Console.
App-defined variables via a file
If your framework expects variables the egg does not list (for example a custom Laravel or Node app), keep them in a .env file that you create in the Files tab. Load it at startup with a library like dotenv (Node/Python) — frameworks such as Laravel read .env automatically.
Read them in code
Never expose secrets
Keep .env files out of the public web root and out of any git repo you push. A token committed to a public repo is a leaked token — rotate it immediately if that happens.