# Azure Warehouse Setup

{% hint style="info" %}
Warehouses are only available for users on the Freshpaint business plan. Reach out to <support@freshpaint.io> if you're interested in this feature.
{% endhint %}

**To get started with warehouse setup, please create a new login and user for Freshpaint that has  create permission for your DB. This can be done with the following scripts:**

In your warehouse's `master` database:

```sql
CREATE LOGIN freshpaint WITH PASSWORD = '<password>';
```

In your target warehouse database:

{% code overflow="wrap" %}

```sql
CREATE USER freshpaint FOR LOGIN freshpaint;
GRANT CREATE TABLE, CREATE SCHEMA, SELECT, INSERT, ALTER, UPDATE, DELETE, ADMINISTER DATABASE BULK OPERATIONS TO freshpaint;
-- staticrc20 is the recommended starting resource class, but it may be necessary to increase the resource allocation
EXEC sp_addrolemember 'staticrc20', 'freshpaint';
```

{% endcode %}

**2. Once this user has been created, please reach out to <support@freshpaint.io> with the following information about your DB**:

* host
* username
* database name
* password
  * can be sent securely through [onetimesecret.com](http://onetimesecret.com/)

**3. Additionally, please make sure your DB is publicly addressable, and then whitelist the following IPs:**

* 44.229.168.72/32
* 35.227.135.0/29
* 35.234.176.144/29
* 52.0.2.4/32

**Once this is completed, we'll need to finish the setup on our end. Notify <support@freshpaint.io> and we'll take it from here.**

{% hint style="info" %}
**We can also connect through an SSH proxy upon request.**
{% endhint %}
