# server.Server.sourceFile

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

```
server.Server.sourceFile(path: : string) -> Promise<void>
```

Run a tmux config file against this server.

tmux does not expand `~` here. `source-file` joins a path that is not
absolute to the client's working directory and globs the result, so
`"~/.tmux.conf"` looks for a directory literally named `~`. Typing it at a
shell works because the shell expands it first; passing it as a string
never does.

## Example

```ts
await server.sourceFile(`${process.env["HOME"] ?? "."}/.tmux.conf`);
```
