[Home](./index.md) > [bitburner](./bitburner.md) > [NS](./bitburner.ns.md) > [getServer](./bitburner.ns.getserver.md) ## NS.getServer() method Returns data of a server. If the server is a darknet server and has recently gone offline, it will return a dummy server object with `isOnline: false`. **Signature:** ```typescript getServer(host?: string): Server | (DarknetServerData & { isOnline: boolean }); ``` ## Parameters
| Parameter | Type | Description |
|---|---|---|
| host | string | _(Optional)_ Optional. Hostname/IP of the server. Defaults to the hostname of the running script's server. |