0

Initially Ive tried official TailScale config:

#cloud-config
# The above header must generally appear on the first line of a cloud config
# file, but all other lines that begin with a # are optional comments.

runcmd:
  # One-command install, from https://tailscale.com/download/
  - ['sh', '-c', 'curl -fsSL https://tailscale.com/install.sh | sh']
  # Set sysctl settings for IP forwarding (useful when configuring an exit node)
  - ['sh', '-c', "echo 'net.ipv4.ip_forward = 1' | sudo tee -a /etc/sysctl.d/99-tailscale.conf && echo 'net.ipv6.conf.all.forwarding = 1' | sudo tee -a /etc/sysctl.d/99-tailscale.conf && sudo sysctl -p /etc/sysctl.d/99-tailscale.conf" ]
  # Generate an auth key from your Admin console
  # https://login.tailscale.com/admin/settings/keys
  # and replace the placeholder below
  - ['tailscale', 'up', '--authkey=tskey-abcdef1432341818']
  # Optional: Include this line to make this node available over Tailscale SSH
  - ['tailscale', 'set', '--ssh']
  # Optional: Include this line to configure this machine as an exit node
  - ['tailscale', 'set', '--advertise-exit-node']

After Ubuntu server installation were complete and restarted I was not able to find tailscale program in terminal. Even though tailscale online admin console shows that new node actually were added but is now offline.

Here is quite helpfull link with example of user-data which installs TailScale during Ubuntu Server autoinstall:

#cloud-config
---
apt:
  sources:
    tailscale.list:
      source: deb https://pkgs.tailscale.com/stable/ubuntu focal main
      keyid: 2596A99EAAB33821893C0A79458CA832957F5868
packages: 
  - tailscale
runcmd:
  - [tailscale, up, -authkey, ${tailscale_key}]

And after installation of Ubuntu and system restart I am able to find TailScale program on the system. But authentication part:

runcmd:
  - [tailscale, up, -authkey, ${tailscale_key}]

does not work, and TailScale status is logged out.

I have tried several other ways to workaround this but with no success:

runcmd:
  - [tailscale, up, -authkey, tskey-client-ffffffff, --advertise-tags=tag: server, --advertise-exit-node, --ssh, --operator=oleh]
late-commands:
  - sudo curtin in-target --target=/target -- /usr/bin/tailscale up -authkey tskey-client-ggggggg # --advertise-tags=tag:server --advertise-exit-node --ssh --operator=oleh  

Also tried to add login command to crontab and systemd.

Question is, how to login to the TailScale during autoinstall or after first reboot?

0

You must log in to answer this question.

Browse other questions tagged .