Files
bitburner-src/markdown/bitburner.server.md
gmcew 7c0286222c API: Move and rename purchased server functions to cloud API (#2367)
* Convert purchased server functions to cloud API

- Create `ns.cloud`
- Change `bitnode multipliers` and `server constants` wording for consistency
- change `server`, `ram` and `getting started` docs for consistency
- Added changes to 3.0.0 API Break and `setRemovedFunctions` in NetscriptFunctions.js

Tested by
- running tutorial `purchase-server-8gb.js`, and a more typical player one
- buying manually using vendor (Alpha Ent in Sector 12)
- deleting them all using script, and checked all deleted functions gave correct error
- Imported completed save to ensure auto-transfer of function work

* Revision in line with comments

- changed more `purchased` to `cloud` references
- Added BN mults auto-conversion

* Update getting_started.md

 - Corrected function names for new `cloud API`

* Don't show `cloud API` warning

v3.0.0 API break auto-replaces `cloud` functions, not warning suggested.

* API Break correction

- `cloud` affected API break replacement changed to be more descriptive and functional

* Fix typo and add empty lines

* Update many things (check commit's description)

- Comments
- Terminal message
- UI Text
- TSDoc
- md docs
- Improve error messages in src\NetscriptFunctions\Cloud.ts
2025-11-07 12:10:33 -08:00

4.7 KiB

Home > bitburner > Server

Server interface

A server. Not all servers have all of these properties - optional properties are missing on certain servers.

Signature:

export interface Server 

Properties

Property

Modifiers

Type

Description

backdoorInstalled?

boolean

(Optional) Flag indicating whether this server has a backdoor installed by a player

baseDifficulty?

number

(Optional) Server's initial server security level at creation.

cpuCores

number

How many CPU cores this server has. Affects magnitude of grow and weaken ran from this server.

ftpPortOpen

boolean

Whether or not the FTP port is open

hackDifficulty?

number

(Optional) Server Security Level

hasAdminRights

boolean

Flag indicating whether player has admin/root access to this server

hostname

string

Hostname. Must be unique

httpPortOpen

boolean

Whether or not the HTTP Port is open

ip

string

IP Address. Must be unique

isConnectedTo

boolean

Flag indicating whether player is currently connected to this server

maxRam

number

RAM (GB) available on this server

minDifficulty?

number

(Optional) Minimum server security level that this server can be weakened to

moneyAvailable?

number

(Optional) How much money currently resides on the server and can be hacked

moneyMax?

number

(Optional) Maximum amount of money that this server can hold

numOpenPortsRequired?

number

(Optional) Number of open ports required in order to gain admin/root access

openPortCount?

number

(Optional) How many ports are currently opened on the server

organizationName

string

Name of company/faction/etc. that this server belongs to, not applicable to all Servers

purchasedByPlayer

boolean

Flag indicating whether this is a server owned by the player (e.g., home, cloud servers, hacknet servers)

ramUsed

number

RAM (GB) used. i.e. unavailable RAM

requiredHackingSkill?

number

(Optional) Hacking level required to hack this server

serverGrowth?

number

(Optional) Growth effectiveness statistic. Higher values produce more growth with ns.grow()

smtpPortOpen

boolean

Whether or not the SMTP Port is open

sqlPortOpen

boolean

Whether or not the SQL Port is open

sshPortOpen

boolean

Whether or not the SSH Port is open