---
title: How to Whitelist a Remote IP for Accessing myVesta API
description: "Before you can connect WP Email Manager with [myVesta](https://www.myvestacp.com), you first have to add your server's IP to myVesta's API whitelist IPs if your WordPress install is on a different/remote server. To do so, please follow these steps that are…"
url: "https://wpemailmanager.com/docs/how-to-whitelist-a-remote-ip-for-accessing-myvesta-api/"
updated: "2022-09-25"
category: Server Configuration / myVesta
---

# How to Whitelist a Remote IP for Accessing myVesta API

Before you can connect WP Email Manager with [myVesta](https://www.myvestacp.com), you first have to add your server's IP to myVesta's API whitelist IPs if your WordPress install is on a different/remote server.

To do so, please follow these steps that are are copied from this [forum article](https://forum.myvestacp.com/viewtopic.php?t=39):

In SSH console run:

```
mkdir -p /usr/local/vesta/conf_web
pub_ip=$(curl -s vestacp.com/what-is-my-ip/)
local_ip=$(ip addr|grep 'inet '|grep global|head -n1|awk '{print $2}'|cut -f1 -d/)
echo "$pub_ip" > /usr/local/vesta/conf_web/allow_ip_for_api.conf
if [ "$pub_ip" != "$local_ip" ]; then echo "$local_ip" >> /usr/local/vesta/conf_web/allow_ip_for_api.conf; fi
echo "127.0.0.1" >> /usr/local/vesta/conf_web/allow_ip_for_api.conf
```

and add to **/usr/local/vesta/conf_web/allow_ip_for_api.conf** any other IP that should be able to access the  API on that server.

You can add each IP per each line.
