Appearance
Installer options
Set these environment variables in front of the install command. They work the same on Linux and Windows unless noted otherwise.
| Variable | Description |
|---|---|
LOGCORE_API_KEY | Required for a new installation. The key decides which organization the server belongs to. |
LOGCORE_TAGS | Comma-separated host tags, for example env:prod,role:web,team:payments. |
LOGCORE_HOSTNAME | The name shown in Logcore. Defaults to the machine's hostname. |
LOGCORE_APM=true | Enables the local OpenTelemetry endpoint (localhost:4317 and localhost:4318). See APM through the agent. |
LOGCORE_RUN_AS_ROOT=true | Linux only. Runs the agent as root instead of the logcore-agent user, which is simplest when logs are spread across many folders. |
LOGCORE_NO_START=true | Linux only. Installs and configures the agent without starting it, for example while you build an image. |
Examples
sh
LOGCORE_API_KEY=lc_xxxxxxxx \
LOGCORE_HOSTNAME=web-01 \
LOGCORE_TAGS="env:prod,role:web" \
LOGCORE_APM=true \
bash -c "$(curl -fsSL https://logcore.lsofito.com/install.sh)"sh
LOGCORE_API_KEY=lc_xxxxxxxx LOGCORE_RUN_AS_ROOT=true \
bash -c "$(curl -fsSL https://logcore.lsofito.com/install.sh)"powershell
$env:LOGCORE_API_KEY="lc_xxxxxxxx"
$env:LOGCORE_HOSTNAME="win-app-01"
$env:LOGCORE_TAGS="env:prod,role:app"
$env:LOGCORE_APM="true"
iwr -useb https://logcore.lsofito.com/install.ps1 | iexRunning the installer again
Running the command again on a server that already has the agent is safe:
| Behaviour | Result |
|---|---|
| Binary | Replaced with the latest version. This is how you upgrade. |
logcore.yaml and services/ | Kept. Your changes are preserved. |
LOGCORE_API_KEY given | The key in logcore.yaml is replaced, which is how you move a server to a new key. |
LOGCORE_APM=true / false | Uncomments the apm: block if needed and sets enabled to the given value. |
LOGCORE_TAGS / LOGCORE_HOSTNAME given | Ignored on an existing installation. Edit tags and hostname in logcore.yaml, then restart the agent. |
Automation
The installer doesn't ask any questions, so it works in cloud-init, Ansible, Terraform user_data and similar tools:
yaml
# cloud-init
runcmd:
- [ bash, -c, 'LOGCORE_API_KEY=lc_xxxxxxxx LOGCORE_TAGS="env:prod,role:web" bash -c "$(curl -fsSL https://logcore.lsofito.com/install.sh)"' ]Keep keys secret
The API key lets anyone send data to your organization. Store it in your secrets manager rather than in a public repository, and rotate it under Settings → Agent API keys if it leaks.