# server.Server.sourceFile

- **Module:** server.Server
- **Package:** libtmux
- **Language:** TypeScript
- **Kind:** method
- **Source:** https://github.com/libtmux/libtmux-ts/blob/3fe1ca654b81b8cbf4a13b777a001a3298c87a6f/packages/libtmux/src/server.ts#L856
- **Page:** https://libtmux.org/en/ts/latest/reference/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`);
```
