Skip to content
Back to skills

Cloud Computer Tailscale

FSecurity

Set up a cloud machine (a KVM VPS, a Fly Sprite, any Linux VM) as a paired computer for agents over Tailscale: join it to the tailnet, install Cognitrix, pair it with `cognitrix connect` at the server's private address, keep the connector running as a service, and optionally also add it as a tailnet device for approved admin commands. Use when the person wants their agents to work on a cloud computer or VPS.

  • 12 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added December 5, 2026
ai-agentspythongoshelldockergit

Works with

  • terminal

Security analysis

F13/100
  • criticalPipes output to a shell interpreter
  • mediumUses curl or wget to download content
  • criticalAccesses sensitive system or user directories
  • criticalModifies startup scripts or system services for persistence
  • criticalDownloads and executes remote scripts — classic supply chain attack
  • mediumInstalls packages at runtime which could introduce malicious dependencies

Pro shows the line behind each finding and how to fix it

Scanned December 5, 2026

npx -y skills add theonlyamos/cognitrix --skill cloud-computer-tailscale --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Cloud Computer Tailscale?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Cloud Computer Tailscale
[![Security: F — Skills Directory](https://www.skillsdirectory.com/api/skills/theonlyamos-cloud-computer-tailscale/badge)](https://www.skillsdirectory.com/skills/theonlyamos-cloud-computer-tailscale)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: cloud-computer-tailscale
description: >
  Set up a cloud machine (a KVM VPS, a Fly Sprite, any Linux VM) as a paired computer for agents over
  Tailscale: join it to the tailnet, install Cognitrix, pair it with `cognitrix connect` at the server's
  private address, keep the connector running as a service, and optionally also add it as a tailnet device
  for approved admin commands. Use when the person wants their agents to work on a cloud computer or VPS.
args:
  - name: machine
    description: The machine to set up (provider, plan, OS), in the person's words
    required: false
    default: not named yet (ask which provider and Linux distribution)
tags: [tailscale, tailnet, vps, cloud, vm, pair, computer, connect, ssh]
category: setup
version: "1.3.0"
author: cognitrix
safety:
  risk-level: low
---

# A cloud computer for agents, over Tailscale

The machine: $(arg machine).

The main path is **pairing**: the machine runs `cognitrix connect`, which dials out to this Cognitrix
server over the tailnet. Agents then use it from the chat box like a paired PC, in the folders and with
the switches chosen on the machine itself, and nothing is shared until the person allows it there. Neither the
server nor the machine needs a public address or an open port.

The optional extra is **adding it as a tailnet device** (Settings › Tailscale › Devices agents may use):
agents run single shell commands on it over SSH, and the person approves every one. That suits rare
admin jobs, not everyday work. Both can be set up on the same machine.

This has not been tried on a real tailnet or a real cloud VM yet. Say so, and check each step's result
instead of assuming it worked.

## How to help

- Most steps run on the person's machine or in Tailscale's admin page, which you can't reach. Give them
  one step at a time with the exact command, ask what it printed, and fix problems from the output.
- If the machine is already a tailnet device you may use (List Tailnet Devices shows it), you can run
  the non-interactive setup commands yourself with Run On Tailnet Device. Each one asks the person
  first, and it can't answer a prompt, so the pairing step (which asks **Allow?**) is always the
  person's to run in a terminal on the machine. Never ask for passwords, Tailscale keys or pairing codes
  in the chat: the person types them on the machine.
- Use **Manage Paired Computers** for the server side: `list` gives this server's addresses (the
  Tailscale private address first, empty while it is off) and the computers already paired;
  `pair_steps` gives the `cognitrix connect` command with the right address. The code itself is made by
  the person in Settings › Computers and never comes to you. After pairing, `list` shows whether the new
  machine is online. If the tool isn't among your tools, ask the
  person to add it on your agent page, or to copy the address from Settings › Tailscale.
- Ask only what changes the steps: which Linux distribution, whether the server already has its
  Tailscale private address on, and whether agents should use apps on its screen.

## 1. The server: private address on

In **Settings › Tailscale**:

1. **Use Tailscale.** On a computer that already runs Tailscale, Cognitrix uses it. In Docker or on Fly,
   press **Sign in to Tailscale** (or paste a join key).
2. Turn on the **Private address**. It looks like `https://<server>.<tailnet>.ts.net`. If the page says
   the tailnet hasn't turned on HTTPS addresses, or MagicDNS is off, follow its link first.
3. Optional: **Only reachable through Tailscale** (applies after a restart; leave it off on Fly). With
   Docker Compose this works with the shipped `docker-compose.yml`, whose worker uses the web container's
   relay-only port. A custom setup with a separate worker needs the same: `COGNITRIX_RELAY_PORT` on the
   web process and `COGNITRIX_INTERNAL_URL` pointing the worker at it.

The public address (Funnel) is not needed for any of this.

## 2. The machine

1. **Make the machine.** A Linux VM that stays running, with Python 3.11 to 3.13, git and the tools the
   agents will need. Tailscale must be able to make its network device: check that `/dev/net/tun`
   exists. If Tailscale can only run in userspace networking mode (common inside containers), the
   connector can't reach the tailnet, because it doesn't use Tailscale's proxy.
2. **Make a user for the agents**, for example `sudo adduser --disabled-password cognitrix`. Agents'
   commands run as the user the connector runs as and can reach whatever that user can, so don't run it
   as root and don't give this user sudo.
3. **Install Tailscale and join the tailnet:**
   ```
   curl -fsSL https://tailscale.com/install.sh | sh
   sudo tailscale up
   ```
   Two ways to sign it in to the person's tailnet:
   - **Login link** (easiest for one machine): `tailscale up` prints a link. The person opens it in any
     browser where they are signed in to Tailscale and approves the machine.
   - **Auth key** (for scripts or machines that get rebuilt): the person makes a one-time key in
     Tailscale's admin page (Settings › Keys) and runs `sudo tailscale up --auth-key=tskey-...` on the
     machine. They should type it there, not paste it in the chat.

   Joining the tailnet only puts the machine on the person's private network. It is not the same as
   adding it under "Devices agents may use" in Cognitrix (the optional extra below).

   Then `tailscale status` should list the server, and
   `curl -sI https://<server>.<tailnet>.ts.net` should answer.
   - A machine signed in as a person has a key that expires (180 days by default). For a server, either
     turn off key expiry for it in Tailscale's admin page, or join it with a tag
     (`--advertise-tags=tag:cognitrix-vm`, with the tag owned in the tailnet policy). A tagged machine
     can't pair without a code (it has no login), so use a code below.
   - If your tailnet policy is not "allow all", it must let this machine reach the server on port 443.
4. **Install Cognitrix** as the agents' user: `pip install --user cognitrix` or
   `uv tool install cognitrix`. Only the engine is used here.

## 3. Pair it

Pick the folders agents may use first. `--folder` is required (repeat it for more), and the folder
must exist: as the agents' user, `mkdir -p ~/work` (or pick a folder that is already there).

The person runs this step themselves, in a terminal on the machine as the agents' user (`sudo -iu
cognitrix`), because it asks **Allow?** before anything is shared. `--yes` skips that question; only the
person should use it, never an agent. Pair with `COGNITRIX_PAIRED_KEYCHAIN=0` in front, so the token goes
in a file the service below can read (see "The token"). Either:

- **With a code** (works for every machine): the person opens **Settings › Computers › Pair a computer**
  (the code lasts 10 minutes and works once) and types it in:
  ```
  COGNITRIX_PAIRED_KEYCHAIN=0 cognitrix connect https://<server>.<tailnet>.ts.net --code XXXX-XXXX --folder ~/work
  ```
- **Without a code**: if the person's Tailscale login is linked to their account (Settings › Sign-ins,
  with "Sign in from the tailnet" turned on by an admin) and the machine is signed in as that login,
  not tagged:
  ```
  COGNITRIX_PAIRED_KEYCHAIN=0 cognitrix connect https://<server>.<tailnet>.ts.net --ask --folder ~/work
  ```
  The request waits on the web in **Settings › Computers** for **Approve** (10 minutes). If the person
  asks you to, approve it with Manage Paired Computers (`approve_request`, the id from `list`): they
  still confirm it on a card in the Cognitrix app or website.

`cognitrix connect --find` lists the Cognitrix servers it can see on the tailnet.

The connector shows what it will share and asks **Allow?**. What agents get there:

- **By default, with only `--folder`:** they can read and change files in those folders and run
  commands there. Each command asks the person in the chat first, unless they saved an answer for it
  (Always allow for commands that start the same way on that machine, or Auto-approve everything).
- `--read-only`: they can only look, no changes. `--no-commands`: no commands. For a look-only machine
  use both: `--folder ~/work --read-only --no-commands`.
- Off unless given: `--apps` (app windows on its screen, see below) and `--terminal` (the person can
  open a full shell there from the web app). `--pc-name <name>` sets the name on the web.

**The token.** Without `COGNITRIX_PAIRED_KEYCHAIN=0` the connector puts its token in the system keychain
when it finds one (Secret Service through `secret-tool`, with a D-Bus session). A system service has no
such session, so it couldn't read the token back. With `COGNITRIX_PAIRED_KEYCHAIN=0` (when pairing and
in the service) the token goes in `~/.cognitrix/paired.json` with mode 600, which a plain VM uses
anyway. Anyone who can read that file can act as this machine, so keep the machine locked down: SSH
keys only, no other people on it.

## 4. Keep it running

After pairing, plain `cognitrix connect` reconnects with the saved link, and it retries by itself when
the network drops. Run it as a service so it survives reboots. With systemd, as root, write
`/etc/systemd/system/cognitrix-connect.service` (use the path `which cognitrix` prints for that user):

```
[Unit]
Description=Cognitrix paired computer
After=network-online.target tailscaled.service
Wants=network-online.target

[Service]
User=cognitrix
Environment=COGNITRIX_PAIRED_KEYCHAIN=0
ExecStart=/home/cognitrix/.local/bin/cognitrix connect
Restart=always
RestartSec=15

[Install]
WantedBy=multi-user.target
```

Then `sudo systemctl daemon-reload && sudo systemctl enable --now cognitrix-connect` and check with
`journalctl -u cognitrix-connect -f` that it says `connected`. Tailscale's installer already runs
`tailscaled` as a service. Without systemd, run `cognitrix connect` in tmux.

`cognitrix connect --status` shows the link; `cognitrix connect --unpair` removes it on both sides (stop
the service first). It can also be removed on the web in Settings › Computers. A machine not seen for
30 days must pair again.

## 5. Use it

The person picks the machine with the computer chip in the chat box; the sandbox stays the default.
Tasks can run on it too (the task's **Computer** field). Agents can use it by themselves too: Start Chat
with `computer` set to the machine's name starts a chat that works there and reports back, and Manage
Paired Computers `use` switches the current chat to it from the next turn. The machine's own folders and
switches still apply. Starting a chat there and moving a chat there ask the person first, and so does
each command, unless they saved an Always allow for it. Approving a computer asking to pair is different:
it always needs the person's own card in the app or website.

To check the new machine works, start a chat on it that runs something harmless, like `uname -a` and
`df -h` in a shared folder.

- **Offline:** a chat's tool fails right away and says the computer is offline; a task waits up to
  30 minutes, then fails and notifies the person. A machine that sleeps when idle (a Fly Sprite and
  similar) shows as offline while it sleeps, and nothing from Cognitrix wakes it.
- **Headless is fine** for files and commands. Apps (`--apps`) need an X11 desktop session with
  `DISPLAY` set; Wayland doesn't work. On a VM without a screen, run a virtual one, for example Xvfb with
  a small window manager, and start the connector with `DISPLAY=:99` in the service. Apps on a virtual
  screen are untested.
- Write and Edit by agents can be undone from the chat's side panel; changes made by commands can't.

## Optional: also a tailnet device

For occasional admin jobs (updates, restarts, looking at logs), the same machine can be added under
**Settings › Tailscale › Devices agents may use**. An admin picks whose agents may use devices, presses
**Allow** on the machine and types the login names agents may use, then adds List Tailnet Devices and
Run On Tailnet Device to the agents that need them. Every command is approved by a person, whatever the
agent's settings; **Always allow** only remembers the start of a command for that login on that machine.

- Sign-in is either **Tailscale SSH** (`sudo tailscale set --ssh` on the machine, plus an `ssh` rule in
  the tailnet policy letting the server in as that login; a tagged server can only reach tagged
  machines this way) or **this server's SSH key** (copy the key from Settings into that login's
  `~/.ssh/authorized_keys`).
- When both are set up, give SSH its own login, not the connector's user, with only the rights those
  admin jobs need, and limit it in the tailnet policy to this server as source and this machine as
  destination. Never let it log in as root.
- Agents get no folder limits, file tools, screen or undo this way, only single commands.

## When it doesn't work

- `connect` says plain http is refused: use the https private address, or a tailnet address Tailscale
  on this machine lists.
- `Connection refused` / timeouts: `tailscale status` on both sides, `tailscale ping <server>`, the
  tailnet policy, and that the server's private address is still on.
- The name doesn't resolve: MagicDNS must be on for the tailnet, and the machine must accept DNS
  (`tailscale up` does by default on Linux).
- The code is refused: it expired or was used. The person makes a new one in Settings › Computers.
- The service says it isn't paired, but pairing worked: the token went in a keychain the service can't
  reach. Pair again with `COGNITRIX_PAIRED_KEYCHAIN=0` in front, as the same user.

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in ai-agents →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.