The Power BI on-premises data gateway is a Windows service that lets Microsoft cloud services—Power BI, Power Apps, Power Automate, Azure Analysis Services, and others—reach data that lives inside your private network without opening inbound firewall ports. You install it on a machine that can see both the internet and your data sources, register it with your tenant, and then cloud refreshes and queries pass through that bridge. To get it working you need a supported Windows machine that stays on, an account with gateway admin rights in Power BI, and network access to the data sources the gateway will serve.
What You'll Need
- A Windows machine (physical or virtual) that will run the gateway. It should be domain-joined or at least able to authenticate to your data sources, and it should be dedicated—not a laptop that sleeps.
- Local administrator rights on that machine to install the gateway.
- A Power BI account that is a gateway admin (or a Fabric/Power Platform admin who can register gateways).
- Outbound HTTPS access to Microsoft endpoints. The gateway makes outbound connections only; you do not need to open inbound ports.
- Credentials for each data source the gateway will connect to, stored securely in the gateway rather than in the report.
- The installer downloaded from Microsoft's official Power BI download page—do not use third-party mirrors.
Step-by-Step
- Pick the right machine. Choose a Windows host that is always on, has a stable IP, and sits close (network-wise) to the data sources. A virtual machine in the same subnet as your SQL Server is ideal. Avoid installing on a workstation that gets shut down nightly, because scheduled refreshes will fail.
- Download the installer. From Microsoft's official Power BI download page, get the standard gateway installer (not the personal mode). Standard mode is the one that supports multiple users, scheduled refresh, and DirectQuery.
- Run the installer and choose the mode. Sign in with the account that will administer the gateway. On the first screen, select the option to create a new gateway on this computer. Personal mode is only for a single user's own refreshes and cannot be shared, so pick standard mode unless you specifically need personal.
- Name the gateway and set a recovery key. Give it a clear name that identifies the machine and environment (for example, "GW-FINANCE-PROD"). Set a strong recovery key and store it somewhere safe—if you lose it and need to restore or migrate the gateway, you cannot recover the stored credentials without it.
- Finish the install and sign in. The gateway service starts and registers with your tenant. The Power BI service should now show the gateway under the gateways area of settings.
- Add data source users. In the Power BI service, open the gateway settings, go to the data source users or connections area, and add the people or groups who will build reports against that source. Only users you add can use the gateway.
- Create a data source on the gateway. Still in gateway settings, add a new data source: choose the connector (for example, SQL Server), enter the server and database, and supply the credentials the gateway should use. Choose the authentication method your source supports—Windows, basic, or a service account. Test the connection before saving.
- Map reports to the gateway. Open the dataset settings for the report or semantic model, expand the gateway connection section, and bind the dataset to the gateway and data source you just created. If the dataset was published from Power BI Desktop, the source names must match exactly.
- Schedule a refresh and test it. Set a refresh schedule on the dataset and run a manual refresh once. Watch the refresh history for success or a clear error. A successful manual refresh is the real proof the gateway path works end to end.
- Harden and document. Restrict who is a gateway admin, note the machine name, gateway name, recovery key location, and the service account used, and make sure the Windows service is set to start automatically.
Common Mistakes
- Installing personal mode when you need scheduled refresh or sharing—personal mode cannot be shared with other users.
- Putting the gateway on a machine that sleeps, reboots for updates, or has a dynamic IP that changes.
- Using the wrong credentials: the gateway connects with the account you store on the data source, not the account of the person viewing the report. If that account lacks read permission on the database, refresh fails.
- Forgetting to add users to the gateway or to the data source—being a report author does not automatically grant gateway access.
- Mismatched server or database names between the Desktop file and the gateway data source, which stops the dataset from binding.
- Losing the recovery key. Without it, stored credentials cannot be recovered if the gateway needs to be restored.
- Installing the gateway on the same machine as a heavy database server, where resource contention slows refreshes.
Tips
- Use a dedicated service account for the gateway's data source credentials rather than a personal login, so refreshes survive staff changes.
- Keep the gateway and the Power BI Desktop versions reasonably current; older gateways can be blocked from newer features.
- If you need high availability, install a second gateway on another machine and add it to the same gateway cluster so refreshes fail over.
- Check the gateway's own logs on the machine when the service UI shows only a generic error—the detail is usually there.
- Limit gateway admins to a small group; gateway admins can change data source credentials for everyone using that gateway.
Troubleshooting
Start with the simplest checks. Confirm the Windows service for the gateway is running and set to automatic. Restart the service, then retry the refresh. Check that the machine has outbound internet access and that no proxy is blocking Microsoft endpoints. Confirm the Power BI service is healthy on Microsoft's status page before digging further.
If the dataset will not bind to the gateway, compare the server and database names in the Desktop file with the gateway data source character by character. If the connection test fails, re-enter the credentials and confirm the account can log in to the source from that machine using the same method (for example, test the Windows login on the server itself). If refresh fails only for some users, check gateway and data source user lists.
If you must reinstall or move the gateway, use the recovery key to restore it rather than creating a new gateway, because a new gateway means re-binding every dataset. Before any uninstall or reset, note that removing the gateway deletes its stored credentials and breaks every dataset bound to it—plan the migration and re-binding first.
Frequently Asked Questions
Does the gateway need inbound firewall ports?
No. The gateway makes outbound connections to Microsoft services. You only need outbound HTTPS access, not inbound rules.
Can I install the gateway on a laptop?
You can, but it is not recommended. Scheduled refreshes fail when the laptop sleeps or is off, so use an always-on machine.
What is the difference between standard and personal mode?
Standard mode supports multiple users, scheduled refresh, and sharing. Personal mode is for a single user's own refreshes and cannot be shared.
Do I need a gateway for cloud-only data?
No. If all your data is already in a cloud service the gateway is not needed; it exists to reach on-premises or private-network sources.
Can I have more than one gateway?
Yes. You can install gateways on multiple machines and add them to a cluster for high availability, or run separate gateways for separate environments.
What happens if I lose the recovery key?
You cannot recover the stored credentials for that gateway. You would need to create a new gateway and re-enter credentials and re-bind datasets.