# tmux.NewServerFromEnv

- **Module:** tmux
- **Package:** github.com/libtmux/libtmux-go/tmux
- **Language:** Go
- **Kind:** function
- **Source:** https://github.com/libtmux/libtmux-go/blob/5f808882015a975a65acc7f9da5b3ff0d5cbdc91/tmux/from_env.go#L43
- **Page:** https://libtmux.org/reference/go/tmux-newserverfromenv/

```
tmux.NewServerFromEnv(environment: map[string]string) -> (Server, error)
```

NewServerFromEnv returns a server configured from TMUX without starting tmux. It snapshots the process environment once. A nonnil environment supplies discovery values and overrides that snapshot for later tmux processes; an empty map therefore has no TMUX discovery value. Names follow the platform's environment rules and are case-insensitive on Windows.
