<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [bitburner](./bitburner.md) &gt; [Cloud](./bitburner.cloud.md) &gt; [getServerNames](./bitburner.cloud.getservernames.md)

## Cloud.getServerNames() method

Returns an array with the hostnames or IP addresses of all of the cloud servers you have purchased. Returns hostnames by default.

**Signature:**

```typescript
getServerNames(returnOpts?: HostReturnOptions): string[];
```

## Parameters

<table><thead><tr><th>

Parameter


</th><th>

Type


</th><th>

Description


</th></tr></thead>
<tbody><tr><td>

returnOpts


</td><td>

[HostReturnOptions](./bitburner.hostreturnoptions.md)


</td><td>

_(Optional)_ Optional. Controls whether the function returns IPs


</td></tr>
</tbody></table>

**Returns:**

string\[\]

Returns an array with the hostnames or IP addresses of all of the cloud servers you have purchased.

## Remarks

RAM cost: 1.05 GB

