Files
bitburner-src/markdown/bitburner.ns.getserver.md
Michael Ficocelli 6073964768 DARKNET: Darkweb Expansion Project & Bitnode (#2139)
This is BN15. It is a really big change; see the PR for all the details.
2026-02-03 03:40:36 -08:00

1002 B

Home > bitburner > NS > getServer

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:

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.

Returns:

Server | (DarknetServerData & { isOnline: boolean })

Data of the server.

Remarks

RAM cost: 2 GB