Connecting local database via ngrok
If you need to connect your local database but you don’t want to use the on-premise version, you can go for the option of connecting via ngrok.
❗We highly recommend the ngrok approach for testing purposes only, as ngrok is a third-party proxy that provides only a temporary connection (40-120 minutes depending on your plan), and re-connection is required.
To connect your local database via ngrok:
- Create an account at ngrok if you do not have one. 
- Unzip the archive (initial instruction can be found here). 
- Open your Terminal (MacOS/Linux) or command line (Windows) and navigate to the Downloads folder (or the folder where the ngrok archive has been saved). Use the following command: - cd Downloads
- Next, you need to add your authtoken to the default ngrok.yml configuration file using this command: 
ngrok config add-authtoken 2qO7FgeP0PKr4eigzL2tdAJsxt8_3tBf8bHFrUiNZgdCEDvrc
- If successful, you’ll get the following message: - Authtoken saved to configuration file: /Users/user_name/.ngrok2/ngrok.yml
- Now, you can proceed with exposing your local app server or database. Use one of these commands : 
app server: ./ngrok http 80 (or port your server is hosted on)
mysql: ./ngrok tcp 3306
postgre: ./ngrok tcp 5432
mssql: ./ngrok tcp 1433
mongodb: ./ngrok tcp 27017The output will list a forwarding URL, which will point to your local server - find the Forwarding line and copy the host and the port.
- Next, navigate to UI Bakery > Connect datasource. 
- Select your data source and specify the copied host and port together with the other database details. 
- Click Test connection to check whether the connection can be established. 
- And finally, click Connect Datasource. 
Last updated
Was this helpful?