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

[Home](./index.md) &gt; [bitburner](./bitburner.md) &gt; [Singularity](./bitburner.singularity.md) &gt; [getCurrentServer](./bitburner.singularity.getcurrentserver.md)

## Singularity.getCurrentServer() method

Get the current server. Returns the hostname by default.

**Signature:**

```typescript
getCurrentServer(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 an IP.


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

**Returns:**

string

Hostname or IP address of the current server.

## Remarks

RAM cost: 2 GB \* 16/4/1

