# server.Server.daemonIdentity

- **Module:** server.Server
- **Package:** @libtmux/libtmux
- **Language:** TypeScript
- **Kind:** method
- **Source:** https://github.com/libtmux/libtmux-ts/blob/2cb93308200da38a26b59876618116850f110607/packages/libtmux/src/server.ts#L487
- **Page:** https://libtmux.org/reference/ts/server-server-daemonidentity/

```
server.Server.daemonIdentity() -> Promise<DaemonIdentity>
```

Which daemon is answering on this socket right now.

A socket path names a place, not a process. `kill-server` followed by a
restart puts a different daemon at the same path, and that daemon numbers
its panes from `%0` again — so a handle held across the restart names an
object that no longer exists, at an id something else now has. Comparing
this before and after is how a long-running caller can tell.

A reachable daemon reports its identity even when it has no sessions. An
unreachable server rejects instead of returning an absent identity.

## Example

```ts
const before = await server.daemonIdentity();
const after = await server.daemonIdentity();
before.pid === after.pid;
```
