---
title: "Custom RestPKI configuration"
description: "How to set the restPkiUrl option in Web PKI init() when using a non-standard Rest PKI instance other than pki.rest. Not needed without Rest PKI."
canonical: "https://docs.lacunasoftware.com/en-us/articles/web-pki/customizing-restpki-url"
locale: "en"
product: "Web PKI"
last_updated: "2026-10-12"
---

# Custom RestPKI configuration

On the article [Get started](https://docs.lacunasoftware.com/en-us/articles/web-pki/get-started), we saw that the [`init()`](https://docs.lacunasoftware.com/content/typedocs/web-pki/classes/_lacuna_web_pki_d_.lacunawebpki.html#init) code must be called before any other method is called:

```javascript
pki.init(onWebPkiReady);
```
If you use a Rest PKI instance other than the standard one at https://pki.rest, you must set the URL of your Rest PKI instance in the `init()` call.

```javascript
pki.init({
    restPkiUrl: 'https://YourRestPKI.com/',
    ready: onWebPkiReady,
});
```

> **Note**
>
> If WebPKI is not being used in conjunction with RestPKI, this setting is unnecessary.

Without `restPkiUrl`, Web PKI calls the standard instance through `https://restpki.lacunasoftware.com/`, an alternative
address of https://pki.rest that, being more conventional, is less likely to be blocked by the firewalls of the users' networks.
If a network blocks it, its administrator must allow the domain `restpki.lacunasoftware.com` over HTTPS. See
[Error "Could not get pending signature"](https://docs.lacunasoftware.com/en-us/articles/rest-pki/troubleshoot/could-not-get-pending-sig).

For more information about the arguments passed to the [`init()`](https://docs.lacunasoftware.com/content/typedocs/web-pki/classes/_lacuna_web_pki_d_.lacunawebpki.html#init), please refer to the
[method's documentation](https://docs.lacunasoftware.com/content/typedocs/web-pki/classes/_lacuna_web_pki_d_.lacunawebpki.html#init).
