Skip to content

nixos/tailscale: Add option to disable upstream debug logging #432412

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Erethon
Copy link
Contributor

@Erethon Erethon commented Aug 10, 2025

Tailscale by default sends logs upstream to a centralized logging service. We can disable this by adding an env var
https://tailscale.com/kb/1011/log-mesh-traffic?tab=linux#opting-out-of-client-logging. This is especially useful when you're using Headscale and don't want to sent any data to Tailscale Inc. (the company).

Logs before this change when I wasn't connected to the internet:
Aug 09 23:49:10 niato tailscaled[1552]: logtail: upload: log upload of 1412 bytes compressed failed: Post "https://log.tailscale.com/c/tailnode.log.tailscale.io/redactedID": failed to resolve "log.tailscale.com": no DNS fallback candidates remain for "log.tailscale.com"

after connecting to the internet:

Aug 09 23:51:08 niato tailscaled[1552]: logtail: upload succeeded after 3 failures and 50s

and after applying this patch and setting this option to true:

Aug 10 05:14:00 niato tailscaled[245889]: 2025/08/10 05:14:00 You have disabled logging. Tailscale will not be able to provide support.

Things done

  • Built on platform:
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • Tested, as applicable:
  • Ran nixpkgs-review on this PR. See nixpkgs-review usage.
  • Tested basic functionality of all binary files, usually in ./result/bin/.
  • Nixpkgs Release Notes
    • Package update: when the change is major or breaking.
  • NixOS Release Notes
    • Module addition: when adding a new NixOS module.
    • Module update: when the change is significant.
  • Fits CONTRIBUTING.md, pkgs/README.md, maintainers/README.md and other READMEs.

Add a 👍 reaction to pull requests you find important.

Tailscale by default sends logs upstream to a centralized logging
service. We can disable this by adding an env var
https://tailscale.com/kb/1011/log-mesh-traffic?tab=linux#opting-out-of-client-logging
@nixpkgs-ci nixpkgs-ci bot added 10.rebuild-linux: 1-10 This PR causes between 1 and 10 packages to rebuild on Linux. 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin. 6.topic: nixos Issues or PRs affecting NixOS modules, or package usability issues specific to NixOS 8.has: module (update) This PR changes an existing module in `nixos/` 9.needs: reviewer This PR currently has no reviewers requested and needs attention. labels Aug 10, 2025
@Erethon
Copy link
Contributor Author

Erethon commented Aug 17, 2025

CC @martinbaillie @mfrw as maintainers

Copy link
Member

@phaer phaer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice find, code LGTM!

@nixpkgs-ci nixpkgs-ci bot added 12.approvals: 1 This PR was reviewed and approved by one person. and removed 9.needs: reviewer This PR currently has no reviewers requested and needs attention. labels Aug 20, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
6.topic: nixos Issues or PRs affecting NixOS modules, or package usability issues specific to NixOS 8.has: module (update) This PR changes an existing module in `nixos/` 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin. 10.rebuild-linux: 1-10 This PR causes between 1 and 10 packages to rebuild on Linux. 12.approvals: 1 This PR was reviewed and approved by one person.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants