Skip to content

Deploying Portward Enterprise in your Azure subscription

Enterprise only. This page is about the Portward gateway that a company runs in its own cloud. If Portward runs it for you, on the web, this page doesn’t apply: see the page for Portward on the web.

This guide is for the person who looks after Azure at your company. It takes about 20 minutes, and nobody from Portward is involved. When you finish, your team can ask Claude or ChatGPT about company data through a gateway that runs in your own subscription. The gateway replaces the values you mark as sensitive with tokens before the AI sees them. It records every answer in your subscription. Portward, the company, never receives your data.

The deployment puts everything in one resource group that you choose, and all of it belongs to you:

ResourceWhat it’s for
A small Linux VM (portward)Runs the gateway with Docker. 2 vCPU / 1 GiB by default. Ubuntu installs its security updates automatically. Gateway updates take one command (Update and back up).
A records disk (portward-records)Holds the answer records, setup and the encrypted list of connections. Encrypted at rest. The disk is kept if the VM is deleted.
A Key Vault (pw-…)Holds every secret. These are your sign-in app’s secret, your Portward license key, and the gateway key, which the VM generates on its first start. Only the VM’s network can reach the vault.
A storage account (pwbackup…)Holds a copy of the records every night, kept 30 days by default. The VM writes the copy with its own identity and uses no account keys.
A network, a public IP and a firewall (NSG)With the relay, nothing is open inbound, and the public IP is only for outbound traffic. With your own domain, only ports 80 and 443 are open. SSH is never open.
An identity (portward-gateway)Lets the VM read its secrets and write its backups, and nothing else.

The cost is roughly $14 a month at the default size (B2ats_v2) and Azure’s list prices. That is about $7 for the VM, $4 for the public IP, $3 for the disks, and a few cents for the vault and backups.

  1. Register the sign-in app in your directory. Sign-in setup has the steps for Microsoft Entra, Okta and Google Workspace. In short, for Entra:
    • In the Entra admin center, go to App registrations, then New registration. Name the app Portward, and choose this organizational directory only.
    • Set the redirect URI (type Web) to https://<the gateway's address>/auth/callback.
    • Copy the Application (client) ID.
    • Create a client secret under Certificates & secrets and copy its Value.
    • Under Token configuration, add a groups claim (Groups assigned to the application).
    • Assign the app to the groups that should use Portward.
    • Copy the Object ID of the group whose members will manage Portward. That group is your admin group.
  2. Decide how Claude and ChatGPT will reach the gateway. They connect from the internet, so the gateway needs a public address. Pick one of these:
    • The Portward relay (recommended). Your address is <name>.gw.portward.ai. Signup picks the name from your email’s domain, and the name is part of your license key. The gateway connects out to the relay, so nothing opens inbound and you don’t set up DNS. The relay passes traffic through without decrypting it. The certificate and its key stay on your VM.
    • Your own domain, such as portward.yourcompany.com. The VM opens ports 80 and 443, and you create one DNS record after deployment. You need a name you control. Azure’s own *.cloudapp.azure.com names don’t work.
  3. Have your license key (pwlic_…) from the key page (Get started, step 2). The gateway uses it to download its image and to connect to the relay.

Deploy (5 minutes, then about 5 minutes to start)

Section titled “Deploy (5 minutes, then about 5 minutes to start)”

Press Deploy to Azure. The same button is on the page that showed your license key. The portal opens Portward’s own wizard in your subscription. Nothing is created until you select Create. The template and wizard files, mainTemplate.json and createUiDefinition.json, are also at https://portward-launch.s3.us-east-2.amazonaws.com/templates/1.1.2/azure/. Fill in the wizard:

StepWhat to enter
BasicsSubscription, a new resource group, and the region closest to your databases.
Sign-inYour directory’s sign-in address (prefilled for your Entra tenant), the app’s client id and secret, and the admin group.
AddressPaste your license key here. It is never part of the link. Then choose Portward relay (no inbound ports), which takes the address from the key, or My own domain (ports 80 and 443) and enter the name. The wizard shows the exact redirect address your sign-in app needs.
MachineSize, administrator user name, and an SSH key. Let the portal generate the key, because you’ll rarely need it. The defaults are a records disk of 8 GiB and daily backups kept 30 days.
ImageLeave the image as it is. The VM pulls it with your license key. Keep Protect the Key Vault from purge on unless this is a test, because you can’t turn it off later.

Select Create. When the deployment finishes, the VM sets itself up. It installs Docker, creates the gateway key in your Key Vault, and starts the gateway. This takes about five minutes.

The deployment’s Outputs tab lists these values:

  • dataConnector and adminConnector are the two addresses to add in Claude or ChatGPT.
  • signInRedirect is what your sign-in app’s redirect URI must be.
  • dnsTarget is the record to create if you use your own domain. Use a CNAME to the …cloudapp.azure.com name, or an A record to the IP. Caddy runs on the VM and gets the HTTPS certificate within a minute of the name resolving.

Open https://<the gateway's address>/health in a browser. It should answer "ok": true. For the full check, run the gateway’s own doctor. In the portal, open the VM, then Run command, then RunShellScript, and run portward-azure doctor. It checks the certificate, your directory, sign-in for both connectors, and the records. For each problem it tells you what to fix.

Make yourself the admin, connect your data, give your team access

Section titled “Make yourself the admin, connect your data, give your team access”
  1. Add the adminConnector output in Claude or ChatGPT as a custom connector (Get started, step 7) and sign in with your work account. Members of the admin group become admins immediately.
  2. For databases inside your network, note that the VM is in its own network, portward-vnet (10.40.0.0/24). Peer it with the network your databases are in, or deploy into a subscription that can reach them.
  3. In the gateway’s settings on the VM, say which database hosts admins may connect and who may use the data connector. In the portal, open the VM, then Run command, then RunShellScript. Run these commands with your own values:
    Terminal window
    cd /var/lib/portward/install
    sed -i 's/^setup_hosts = .*/setup_hosts = ["db.internal.yourcompany.com"]/' portward.toml
    sed -i 's/^user_groups = .*/user_groups = ["<group object id>"]/' portward.toml
    docker compose restart gateway
    setup_hosts takes exact host names, or "*.corp.yourcompany.com" for a whole domain. Azure Blob Storage, Amazon S3, Microsoft 365 and Google Drive need no entry. A custom storage endpoint does. user_groups takes the Object IDs of the Entra groups whose members may ask questions.
  4. From the admin connector, set up the connection and choose what the AI may see. See Get started, step 8.
  5. Everyone in those groups adds the dataConnector output in Claude or ChatGPT. See Get started, step 9.
  • Settings are in /var/lib/portward/install/portward.toml on the VM, on the records disk. Use Run command to edit settings such as setup_hosts, users and user_groups. Then run cd /var/lib/portward/install && docker compose restart gateway.
  • Updates, backups and restores. See Update and back up. You run updates through Run command with portward-azure update. The gateway key is in the Key Vault as portward-key. Never delete it, because saved connections can’t be opened without it.
  • Logs. Run cd /var/lib/portward/install && docker compose logs gateway. A refused sign-in names the person’s id. The VM’s start-up log is in journalctl -u portward.
  • Rotating secrets. Put the new value in the Key Vault (directory-secret, or license-key after a key is reissued). Then restart the VM, or run systemctl restart portward. Secrets live only in memory on the VM, and the VM reads them again at every start. To change them yourself, give your own account the Key Vault Secrets Officer role and allow your IP in the vault’s firewall.
  • Removing it. Delete the resource group. The Key Vault stays recoverable for 90 days. With purge protection on, you can’t purge it early.
What you seeWhat to do
/health doesn’t answer after 10 minutesRun journalctl -u portward through Run command. “Key Vault answered … waiting for access” is normal while Azure applies the identity’s access to the vault. Portward’s start-up on the VM tries again every 15 seconds, for up to 10 minutes. If it then logs “can’t read … from Key Vault”, check that the identity portward-gateway has Key Vault Secrets Officer on the vault.
A certificate error on your own domainCheck that the DNS record points at dnsTarget, and that nothing in front of the VM blocks ports 80 and 443.
A certificate error on the relayCheck that the license key in the Key Vault (license-key) is current, then run systemctl restart portward. Run docker compose logs relay to see the relay connection.
Sign-in says the redirect address doesn’t matchYour sign-in app’s redirect URI must be exactly the signInRedirect output.
The image doesn’t pullThe license key in license-key was replaced or revoked, or the license ended. Put the current key there. Replace the license key, or write to support@portward.ai about the license.