[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, it will also contain the "isOnline" field. If the darknet server has recently gone offline, the returned object will be a dummy server object with `isOnline: false`. **Signature:** ```typescript getServer(host?: string): Server & { 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. |