Connecting local database via ngrok
If you need to connect your local database and donβt want to use the on-premise version, you can go for the option of connecting via ngrok.
If your database is hosted locally or is not accessible from external connections, we recommend using an on-premise setup. It can be easily set up with a single command. Additionally, during the installation process, you will have the option to generate a trial license. Just run the following:
curl -k -L -o install.sh https://raw.githubusercontent.com/uibakery/self-hosted/main/install.sh && bash ./install.sh
Alternatively, if the on-premises installation is not an option, you may try setting up an SSH tunnel to your database.
We highly recommend this approach for testing purposes only, as ngrok is a third-party proxy that provides a temporary connection (40-120 minutes depending on your plan), and re-connection will be required.
To connect your local database via ngrok:
Create your account at ngrok if you do not have one.
Unzip the archive (initial instructions can be found here).
Open your Terminal (MacOS, Linux) or command line (Windows) and navigate to the Downloads folder (or any other folder where the ngrok folder has been saved). Use command
cd Downloads
To authenticate, find your personal authtoken on your authtoken page. The token should look like this:
./ngrok authtoken 20JWDkD3uwe2wuRqhCvuTkQ0LE3_5N6KtiEBDLD3fXZkRHpej
In case of success, youβll get the following message:
Authtoken saved to configuration file: /Users/user_name/.ngrok2/ngrok.yml
To expose a local app server or database, use one of these commands :
The output will list a forwarding URL, which will point to your local server - find the Forwarding line and copy the host and the port there.
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 ensure that the connection can be established.
In case of success, Connect Datasource.
Last updated