How to connect DBeaver or CloudBeaver to PostgreSQL on a separate VM in Azure
Table of contents
Connect your VM with CloudBeaver to PostgreSQL
Configure a peering for your networks
- Log in to your account in Microsoft Azure and go to
.Virtual networks
- Select the network that you created during the VM startup process.
- Select
->Overview->Capabilitiesand clickPeerings.Add peering
- The
window will be opened.Add peering
In the
field add the name for the new peering.Peering link nameIn the
field select the network where your database is located (Virtual networkin this case).SQL-vpc
- Click
. The peering is configured.Create
Run CloudBeaver on the Linux VM and connect it to PostgreSQL
Step 1. Running CloudBeaver
- Connect to your Linux VM via SSH:
- Check that your Linux VM has access to your SQL DB private IP.
- Copy the private IP address of your database in
->Virtual machines->Your SQL DB->Properties.Networking
- Ping this IP in the terminal:
If everything was done correctly in the previous steps, you will get the result as in the screenshot above. All that remains is to connect our CloudBeaver server to your database.
Install Docker if it is not installed. Check this documentation for details.
Run CloudBeaver with this command:
You can learn more about CloudBeaver deployment in our documentation.
Step 2. Configure your network to access CloudBeaver
You need to make small changes to the network configuration so that you can access CloudBeaver UI.
- Go to
->Virtual machines->Networking->Inbound port rulesAdd inbound port rule
- Add access to port
. For security reasons, we recommend specifying your IP or the IP of your proxy in the resource to avoid third-party access.8080
- Open in browser
http://<your_vm_ip>:8080
That’s all done! You are in the CloudBeaver interface.
Step 3. Configure CloudBeaver and connect to PostgreSQL
- Enter your license key and configure your server.
Go to
, clickConnection Templates, and type your database name (PostgreSQL for example).AddIn the
field enter the IP address of your database you received earlier and indicate the authorization data for your database.Host
- Click
to check that your configuration works.TEST
- Perfect! Now click
in the top right. Connection to your database is added to CloudBeaver.CREATE
Connect DBeaver from Win VM to PostgreSQL
Connect to your Windows VM by using RDP.
Check that your Linux VM has access to your SQL DB private IP.
- Copy the private IP address of your database in
->Virtual machines->Your SQL DB->Properties.Networking
- Ping this IP in the terminal:
If everything was done correctly in the previous steps, you will get the result as in the screenshot above. All that remains is to connect our DBeaver to your database.
Add your license when starting the application.
Create a new connection and choose your database (for example, PostgreSQL).
- In the
field, specify the Private IP address of your database and fill in other fields.Host
Perfect! Your connection is ready.