# Windows and Linux

_For tartan 0.9.36._

Install the Tartan agent on a Windows or Linux computer and join it to your organization.

Install the Tartan agent on a Windows or Linux computer and join it to your organization.

The agent runs as a service. It keeps the computer's certificate, firewall and names current with your organization, and
installs signed updates itself. Every install starts with a join code: [Your first device](first-device.md) makes one.

## Windows

Windows 10 and 11, and Windows Server 2016 to 2025. The agent refuses to join a domain controller.

**The one line.** In PowerShell run as an administrator, paste the Windows line from the console's **Your code is
ready** card, or `install_lines.windows` from:

```sh
tartan code create --org acme --kind device --json
```

The line downloads the installer into a new folder that only SYSTEM and Administrators can open, checks its SHA-256,
and runs it. The installer checks the release's signatures and every file before it installs, then asks `Paste your
join link`. The link stays hidden.

**The MSI.** Choose **Download** on the card, run `TartanAgent-<version>-x64.msi`, and fill in **Join an organization
(optional)**: your organization's handle under **Organization** and the code under **Join code**. Leave both empty to
install without joining.

What it installs:

| | |
|---|---|
| Service | `TartanAgent`, starts automatically, restarts itself after a failure |
| Engine service | `TartanEngine`, run by the agent |
| Program | `C:\Program Files\Tartan\Agent` |

## Linux

A Linux computer with systemd, on amd64 or arm64. Paste the Linux line from the card (`install_lines.linux`) into a
terminal. It downloads the installer into a file only you can write, checks its SHA-256, and runs it with `sudo`:

- the installer checks the release's signatures and every file it downloads;
- it asks `Paste your join link:` with the input hidden;
- it installs the agent, starts the `tartan-agent` unit, and joins.

For a computer with no terminal session, such as an RMM job, set `TARTAN_JOIN` to the join link instead:
[Device codes and fleet pushes](device-codes.md).

## When the installer stops

Both installers end with one verdict line and an exit code:

| Exit | Means |
|---|---|
| `2` | no join link, or a usage error |
| `3` | not run as an administrator (Windows) or root (Linux) |
| `12` | a download failed |
| `13` | a check refused a file: nothing was installed |

## Check it worked

```sh
tartan device list --org acme --schema tartan.device.v1 --json
```

The new device shows with `status` `active`, its `os`, `agent_version`, `tunnel_up` and `last_seen`. On Windows,
`Get-Service TartanAgent` shows it `Running`; on Linux, `systemctl status tartan-agent`.

## Next

- [Always on, from boot](always-on.md)
- [Device codes and fleet pushes](device-codes.md)
- [Remove or revoke a device](remove-device.md)
