# libtmux.Server.__init__

- **Module:** libtmux
- **Package:** libtmux
- **Language:** Python
- **Kind:** method
- **Source:** https://github.com/tmux-python/libtmux/blob/38e368c11117fb4aeb2f082d552cd4f210eae06a/src/libtmux/server.py#L170
- **Page:** https://libtmux.org/en/py/stable/reference/libtmux-server-__init__/

```
libtmux.Server.__init__(
    self,
    socket_name: str | None = None,
    socket_path: str | pathlib.Path | None = None,
    config_file: str | None = None,
    colors: int | None = None,
    on_init: t.Callable[[Server], None] | None = None,
    socket_name_factory: t.Callable[[], str] | None = None,
    tmux_bin: str | pathlib.Path | None = None,
    kwargs: t.Any,
) -> None
```

## Parameters

- `socket_name` (`str | None`)
- `socket_path` (`str | pathlib.Path | None`)
- `config_file` (`str | None`)
- `colors` (`int | None`)
- `on_init` (`t.Callable[[Server], None] | None`)
- `socket_name_factory` (`t.Callable[[], str] | None`)
- `tmux_bin` (`str | pathlib.Path | None`)
- `kwargs` (`t.Any`)
