# io.github.libtmux.Server.start

- **Module:** io.github.libtmux
- **Package:** io.github.libtmux:libtmux
- **Language:** Java
- **Kind:** method
- **Source:** https://github.com/libtmux/libtmux-java/blob/4d77001ac74cd9b7f66d1a56319a97ff6e0b2cd5/libtmux/src/main/java/io/github/libtmux/Server.java#L876
- **Page:** https://libtmux.org/en/java/latest/reference/io-github-libtmux-server-server-start/

```
@Operation(Kind.LIFECYCLE)
public static Server start(ServerLaunch launch)

@Operation(Kind.LIFECYCLE)
public static Server start()
```

Starts a private tmux server that this handle owns, and returns a client of it.

The server has a directory of its own, reads an empty config unless the launch names one,
and gets none of the caller's {@code TMUX}, {@code TMUX_PANE} or {@code LIBTMUX_SOCKET*}. It has
no session, and keeps running with none. Unlike any other server, closing this one ends the
tmux server: {@link #close()} waits until it no longer answers, removes the directory, and
throws if the server still answers or a program left another one under the directory.

## Parameters

- `launch` (`ServerLaunch`): which tmux to run, and where (for `start(launch)`)

## Errors

- [`io.github.libtmux.exception.ServerUnavailableException`](/en/java/latest/reference/io-github-libtmux-exception-serverunavailableexception-serverunavailableexception/): if tmux could not be started or did not answer in time; nothing is left behind (for `start(launch)`)
