Skip to content

Installer options ​

Set these environment variables in front of the install command. They work the same on Linux and Windows unless noted otherwise.

VariableDescription
LOGCORE_API_KEYRequired for a new installation. The key decides which organization the server belongs to.
LOGCORE_TAGSComma-separated host tags, for example env:prod,role:web,team:payments.
LOGCORE_HOSTNAMEThe name shown in Logcore. Defaults to the machine's hostname.
LOGCORE_APM=trueEnables the local OpenTelemetry endpoint (localhost:4317 and localhost:4318). See APM through the agent.
LOGCORE_RUN_AS_ROOT=trueLinux 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=trueLinux 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 | iex

Running the installer again ​

Running the command again on a server that already has the agent is safe:

BehaviourResult
BinaryReplaced with the latest version. This is how you upgrade.
logcore.yaml and services/Kept. Your changes are preserved.
LOGCORE_API_KEY givenThe key in logcore.yaml is replaced, which is how you move a server to a new key.
LOGCORE_APM=true / falseUncomments the apm: block if needed and sets enabled to the given value.
LOGCORE_TAGS / LOGCORE_HOSTNAME givenIgnored 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.