Lowcoder Documentation
  • Lowcoder overview
    • The "Hello World" walk
  • 🆕Setup and run
    • Cloud & Private Cloud
    • Self-hosting
      • Google Cloud Platform
      • Easypanel
      • Heroku
      • Raspberry Pi
      • Access local database or API
      • Update MongoDB Versions
      • Lowcoder Version Update
      • Traefik loadbalancer
      • SMTP Server
      • Migration from Openblocks
    • Security
  • 🏨Workspaces & Teamwork
    • Workspaces
      • SAAS Mode
      • Enterprise Mode
    • Members and Groups
    • Permissions for Resources
    • OAuth
      • KeyCloak
      • Google
      • GitHub
      • Generic OAuth Provider
    • Query library
    • Lowcoder Marketplace
  • ✨Build Applications
    • Create a new App
      • App(s) Navigation
      • Modules
      • Version and Release Management
    • App Editor
      • Query & Editing Roundtrips
      • Bulk Editing
      • Keyboard shortcuts
      • Data selection & Javascript
      • Layers
      • Visual Components
        • Common Component Settings
        • Messages / Toast
        • Dashboard & Reporting
          • Table
          • Charts and graphs
            • Bar Chart
            • Line Chart
            • Pie Chart
            • Scatter Chart
            • CandleStick Chart
            • Funnel Chart
            • Gauge Chart
            • Graph Chart
            • Heatmap Chart
            • Radar Chart
            • Sankey Chart
            • Suburst Chart
            • Theme River Chart
            • Tree Chart
            • Treemap Chart
            • Mermaid Chart
          • Google Maps
        • Layout & Navigation
          • List View
          • Drawer
          • Modal
          • Navigation
          • Cascader
          • Tree / Tree Select
          • Link
          • Floating Button
          • Text
          • Step Control
          • Page Layout
          • Content Card
          • Tabbed Container
        • Data Collection & Forms
          • Form
          • Input Field Types
          • JSON Schema Form
        • Meeting & Collaboration
        • Project Management
        • Calendar & Scheduling
          • Calendar
          • Date & Date Range
          • Time & Time Range
        • Document & File Management
          • File upload
        • Item & Signature Handling
        • Multimedia & Animation
          • Image
        • Integration & Extension
        • Legacy & Deprecated
      • Option lists
      • Date handling
      • Use Markdown
    • App Interaction
      • Event handlers
    • Themes & Styling
      • Design an efficient and user-friendly form
      • Customize Styles
      • Component Styling Possibilities
    • Video Calls in Lowcoder
  • 🚀Connect your Data
    • Data source basics
      • Configure IP allowlists
    • Data sources in Lowcoder
      • APIs as Datasource
        • REST API
        • GraphQL
        • Google Sheets
      • SQL Databases
        • MySQL
        • MariaDB
        • Supabase
          • Supabase PostgreSQL
          • Supabase Assets API
          • Supabase RealTime
          • Supabase OAuth
        • PostgreSQL
        • Microsoft SQL Server
        • Oracle
      • NoSQL Databases
        • MongoDB
        • CouchDB
        • DynamoDB
      • InMemory Databases
        • Redis
      • File Storages
        • S3 File Storage
      • BigData & OLAP
        • Big Query
        • Snowflake
        • ClickHouse
        • Elasticsearch
      • Websocket Datasource
    • Query basics
      • Bind Query Data to Components
      • Query library
  • 🪄Workflows
    • n8n Integration
  • 💫Business Logic in Apps
    • Write JavaScript
      • JavaScript query
      • Temporary state
      • Transformers
      • Data responder
      • Built-in JS functions
  • 🙌Publish Apps
    • Share an App
    • Publish an App
    • Embed an App
      • Embed App in HTML Pages
      • Embed App in WordPress Pages
      • Embed Apps in React
      • Embed Apps in NEXT.JS
      • Native embed SDK
        • Build the SDK from Source
  • 🔥Lowcoder Extension
    • Opensource Contribution
      • Develop UI components for Apps
      • Develop Data Source Plugins
    • Use third-party libraries in Apps
      • Day.js Date handling
      • Import your own JavaScript Library
    • Custom component
    • Lowcoder Open REST API
  • Lowcoder for Enterprise
    • Custom branding
Powered by GitBook
LogoLogo

More to try...

  • Lowcoder Website
  • Free Cloud Platform
  • Github
  • Discord

© Lowcoder Software LTD

On this page
  • Preparation
  • How to access a local database or API from Lowcoder which runs inside the Docker

Was this helpful?

  1. Setup and run
  2. Self-hosting

Access local database or API

PreviousRaspberry PiNextUpdate MongoDB Versions

Last updated 11 months ago

Was this helpful?

By default, docker-hosted instances use a , which does not support access to services on the docker-host via 127.0.0.1 or localhost from inside of the docker.

Here we take PostgreSQL as an example and show you how to access local API or database in different operating systems (OS) for docker-hosted Lowcoder.

Preparation

Assume that a Postgres service is ready on your local host with port 5432.

On Linux, you can check if Postgres runs locally with the command pgrep -u postgres -fa -- -D

How to access a local database or API from Lowcoder which runs inside the Docker

  1. Enter ifconfig docker0 in the terminal, and verify the IP configuration of Docker's virtual bridge (VB).

    Having set up Docker, the OS would automatically create docker0 using the IP address 172.17.0.1 (by default), through which the Docker service communicates with the host.

  2. Enter the same IP address into Lowcoder to configure the Postgres data source (172.17.0.1 in this example, but use the actual IP address displayed on your terminal in the real case).

On some OS (such as Ubuntu), port access might be blocked by the firewall. To solve that, configure in the following steps:

  1. Stop the firewall from blocking access from docker0 by typing in the terminal:\ iptables -A INPUT -p tcp -i docker0 --dport YOUR_DB_PORT -j ACCEPT Note: In this caseHere we use Postgres port 5432 for YOUR_DB_PORT, and you should replace it with your own.

  2. Save the firewall configuration by typing in the terminal: iptables-save > /etc/iptables.up.rules

On Windows and macOS, Docker does not create the virtual bridge docker0. Then the following host name is helpful to resolve the host IP:

host.docker.internal

On Windows and Mac:

🆕
bridge network
Access a Database on your local network from Lowcoder which runs in Docker
Access an API on your local network from Lowcoder which runs in Docker