Skip to content

Netbird: neither $XDG_CONFIG_HOME nor $HOME are defined #1016

@tcoenraad

Description

@tcoenraad

After setting up Netbird with the following config, it appears still something's missing.

at 09:02:45 ❯ incus admin os service show my-incus:netbird
WARNING: The IncusOS API and configuration is subject to change

config:
  admin_url: https://<fdqn>
  anonymize: false
  block_inbound: false
  block_lan_access: false
  disable_client_routes: false
  disable_dns: false
  disable_firewall: false
  disable_server_routes: false
  dns_resolver_address: ""
  enabled: true
  external_ip_map: null
  extra_dns_labels: null
  management_url: https://<fqdn>:443
  setup_key: <my-setup-key>
state: {}

Results into:

at 08:59:13 ❯ incus admin os service edit my-incus:netbird
WARNING: The IncusOS API and configuration is subject to change

Config parsing error: Failed to run: netbird login --no-browser --setup-key <my-setup-key> --management-url https://<fqdn>:443 --admin-url https://<fdqn>: exit status 1 (2026-04-03T08:59:20.880+02:00 WARN client/internal/profilemanager/profilemanager.go:92: failed to get config directory: neither $XDG_CONFIG_HOME nor $HOME are defined
Error: daemon login failed: login failed: rpc error: code = NotFound desc = couldn't add peer: setup key is invalid)

It appears that neither $XDG_CONFIG_HOME nor $HOME are defined is crucial here, but I cannot change that of course in IncusOS. So, I expect some initial set-up issue here.

Previously, when setting up Tailscale I messed up during set-up which needed a reinstall of Tailscale. I re-enabled Netbird to check if that would make any difference, but it didn't.

This is my IncusOS set-up. To make sure everything was reloaded, I restarted the machine before continuing.

at 09:04:44 ❯ incus admin os show my-incus:
WARNING: The IncusOS API and configuration is subject to change

environment:
  hostname: <my-hostname>
  os_name: IncusOS
  os_version: "202604020514"
  os_version_next: "202604020514"
  uptime: 507

Do you have any idea what to look for?

Metadata

Metadata

Assignees

No one assigned

    Labels

    EasyGood for new contributors

    Type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions