Skip to content

Environment Variables

⚙️Complete Environment Variables 1 -> Github⚙️Complete Environment Variables 2 -> Github

Global Configuration

Environment VariableDescriptionDefault Value
SWANLAB_SAVE_DIRPath where SwanLab global folder is saved.swanlab folder in the user's home directory
SWANLAB_LOG_DIRPath where SwanLab parsed log files are savedswanlog folder in the current working directory
SWANLAB_MODESwanLab's parsing mode, which involves callbacks registered by the operator. Currently, there are three modes: local, cloud, and disabled. Note: Case-sensitivecloud

Service Configuration

Environment VariableDescription
SWANLAB_BOARD_PORTPort for the CLI offline dashboard swanboard service
SWANLAB_BOARD_HOSTAddress for the CLI offline dashboard swanboard service
SWANLAB_WEB_HOSTWeb address for the SwanLab cloud environment
SWANLAB_API_HOSTAPI address for the SwanLab cloud environment

Login Authentication

Environment VariableDescription
SWANLAB_API_KEYCloud API Key. During login, this environment variable is checked first. If it doesn't exist, the system checks if the user is already logged in. If not, the login process is initiated.
- If a string is passed to the login interface, this environment variable is ignored.
- If the user is already logged in, this environment variable takes precedence over locally stored login information.

Others

Environment VariableDescription
SWANLAB_WEBHOOKWebhook address.
When SwanLab initialization is complete, if this environment variable exists, it will be called to send a message.