Installation and Usage Guide for N8N Integration with Unified AI Workflows
N8N is a workflow automation platform that provides technical teams with code-like flexibility and no-code speed. With 400+ integrations, native AI capabilities, and a fair-code license, N8N enables you to build powerful automation flows while maintaining full control over your data and deployment.
Singdata Lakehouse integrates with N8N. This document is a complete installation, deployment, and daily usage guide to help you quickly get started with the Singdata Lakehouse and N8N integration!
In addition to serving as a standard N8N node, the Singdata Lakehouse extension also provides data comparison features, including:
- Multi-database support: In addition to supporting Singdata Lakehouse, this extension also supports Alibaba Cloud MaxCompute, HUAWEI CLOUD DLI, PostgreSQL, Singdata, MySQL, SQLite, Oracle, Microsoft SQL Server, and more.
- Data comparison: Table data comparison, schema comparison, real-time difference detection.
- Workflow automation: Visual workflow based on N8N.
- Automatic parameter filling: Intelligently fetches connection information and table lists from upstream nodes.
- Expression references: Supports N8N expression syntax for referencing upstream data.

Below are descriptions of the extension nodes:
- N8N nodes supporting Singdata Lakehouse:

- N8N nodes supporting more database types:

- Data comparison node (async execution):

- Get data comparison results node:

š Prerequisites
-
Install Docker Desktop or Docker Engine
-
At least 8GB of memory
-
Available ports:
- 80 (Nginx unified entry)
- 5678 (N8N, modifiable via .env)
- 8000 (API, modifiable via .env)
- 3000 (Grafana, modifiable via .env)
- 9090 (Prometheus, modifiable via .env)
- 5432 (PostgreSQL, modifiable via .env)
šÆ Installation and Deployment
1ļøā£ Download the Deployment Package
Download data-diff-n8n-deploy-latest.zip and extract it to any directory:
2ļøā£ Check Ports (Recommended)
Check if the required ports are available before deployment:
Windows:
macOS/Linux:
The check script automatically detects whether all required ports are available. If port conflicts are found, you can:
- Stop the service occupying the port
- Or edit the
.envfile to modify the corresponding port after running./deploy.sh setup
3ļøā£ Initialize Configuration
Windows:
macOS/Linux:
This command will:
- Create the
.envconfiguration file - Automatically generate secure passwords
- Prepare the deployment environment
ā ļø Important Reminder:
-
After initialization, please immediately view and save the passwords in the
.undefinedfile. -
Automatically generated passwords include:
- PostgreSQL database password (POSTGRES_PASSWORD)
- N8N basic authentication password (N8N_BASIC_AUTH_PASSWORD, default username is admin)
- Grafana admin password (GRAFANA_PASSWORD, default username is admin)
-
Please keep these passwords safe. They cannot be recovered if lost.
4ļøā£ Start Services
First Deployment
Windows:
macOS/Linux:
Startup time depends on whether images need to be downloaded:
- First startup: 10-20 minutes (all Docker images need to be downloaded, approximately 2GB)
- Subsequent startups: 2-3 minutes (images are already local)
During startup, the system will:
- Automatically pull all required Docker images (6 services)
- Create and initialize the PostgreSQL database
- Configure Grafana dashboards
- Start all services and perform health checks
Daily Usage
Windows:
macOS/Linux:
The start command directly starts all services, suitable for daily use.
š” Tip:
- Use
deploy.sh statusto check startup progress - Use
deploy.sh logsto view service logs
š Access Services
After deployment is complete, you can access the services as follows:
| Service | Access URL | Description |
|---|---|---|
| š Home | http://localhost | System overview and quick navigation |
| š N8N Workflow | http://localhost/n8n/ | Create and manage data comparison workflows |
| š API Docs | http://localhost/api/docs | RESTful API interface documentation |
| š API Reference | http://localhost/api/redoc | API reference manual (ReDoc style) |
| š Grafana Monitoring | http://localhost/grafana/ | Data quality and system monitoring dashboards |
| š Prometheus | http://localhost/prometheus/ | Metrics query and alert management |

For login credentials, check the passwords in the .env file.
š” Tips:
- All services are accessed through port 80 (Nginx reverse proxy is automatically configured).
- Due to sub-path configuration, direct access through service ports is not supported (e.g., N8N's port 5678).
- Remote access: When deployed on a server, replace
localhostwith the server IP address (e.g.,http://172.17.1.220). - Modify port: To modify port 80, edit
HTTP_PORTin the.envfile and restart the services.
š ļø Daily Operations
Check Service Status
View Logs
Stop Services
Windows:
macOS/Linux:
Restart Services
Windows:
macOS/Linux:
Other Commands
Full stop (remove containers):
Full restart (including initialization check):
š” Tips:
- For daily operations, use
start,stop,restart. stoponly stops containers;stop-allremoves them.initandrestart-fullinclude full initialization checks, suitable for troubleshooting.
š Configuration Guide
Edit the .env file to modify:
- Port configuration: Unified access through port 80 by default
- Password settings: Modify access passwords for each service
- Resource limits: Adjust the number of API worker processes, etc.
- Public URL: Configure N8N's external access address
Example:
š§ Diagnostic Tools
check-env-vars.sh Usage Guide
Use this tool for diagnostics when encountering database connection or authentication issues:
Applicable scenarios:
- N8N or API service reports "password authentication failed"
- Need to verify whether environment variables are correctly passed to containers
- Check the actual configuration values used inside containers
Feature description:
- Display configuration in the
.envfile - Show environment variables after Docker Compose parsing
- Check actual environment variables of running containers
- Test whether the database connection is working
Example output:
If password mismatch is found, a cleanup and redeployment is usually needed:
š Update Deployment
When a new version is released, follow these steps to update:
Update with Configuration Preservation
Full Overwrite Update
š” Tips:
- The
-ooption means automatically overwrite all files without prompting. - The
-xoption can exclude specific files from being overwritten. - It is recommended to always backup the
.envfile first, as it contains your password configuration.
šØ Troubleshooting
Port Occupied
Port 80 is used as the unified entry by default. If port 80 is occupied:
-
Edit the
.envfile and modifyHTTP_PORT: -
Restart services:
-
Access via new port:
Docker Not Running
Make sure Docker Desktop is started and running.
Service Inaccessible
- Use
deploy.bat statusto check service status - Use
deploy.bat logsto view error logs - Ensure the firewall allows access to the corresponding ports
Database Initialization Error
If you see the following errors:
Database initialization failed: datadiff database does not existDatabase tables were not created correctlypassword authentication failed for user "postgres"relation "data_diff_results.comparison_summary" does not exist
Cause:
- The PostgreSQL data volume retains old configuration or passwords.
- The database initialization script failed to execute (PostgreSQL only executes scripts in
/docker-entrypoint-initdb.d/when the data volume is first created).
Solution:
Notes:
- PostgreSQL uses Docker volumes to store data.
init-databases.sqlis executed upon first startup. - If the data volume already exists, the SQL file will not be re-executed even if updated.
- The
cleancommand removes the data volume to ensure re-initialization on the next startup.
Important: The clean command will delete all data. Please ensure important data is backed up.
š Advanced Usage
Create Your First Comparison Workflow
-
Access N8N (http://localhost/n8n/)
-
Log in using the credentials in
.env- Username: admin (or check N8N_BASIC_AUTH_USER)
- Password: Check N8N_BASIC_AUTH_PASSWORD in
.env
-
Create a new workflow
-
Add a "Data Comparison Dual Input" node
-
Configure source and target database connections
-
Run the workflow and view the results
View Monitoring Dashboards
-
Access Grafana (http://localhost/grafana/)
-
Log in using admin and the password in
.env -
Open the pre-configured dashboards:
- Business Metrics: View data quality and comparison results
- System Monitoring: View performance and resource usage
Using API Endpoints
-
Access API documentation (http://localhost/api/docs)
-
Supported main endpoints:
/api/v1/compare/tables- Compare data between two tables/api/v1/compare/schemas/nested- Compare database schema structures/api/v1/connections/test- Test database connection/api/v1/tables/list- Get database table list/api/v1/query/execute- Execute SQL queries/api/v1/maintenance/db-maintenance- Database maintenance operations/api/v1/metrics- Get system metrics in Prometheus format
-
You can test API calls directly on the documentation page.
š Need Help?
- š View project documentation
- š Report issues
- š¬ Contact technical support
ā ļø Security Tips
- Please be sure to modify the default passwords in the
.envfile - Regularly backup database data
- Restrict the network access scope of the services
Reference
This project is open source: https://github.com/yunqiqiliang/data-diff-n8n
