# server.Server.setEnvironment

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

```
server.Server.setEnvironment(name: : string, value: : string, options: : SetEnvironmentOptions) -> Promise<void>
```

Set a variable in the server's global environment.

## Example

```ts
await server.setEnvironment("EDITOR", "vim");
```
