This repository provides a ready-to-run local environment for managing n8n workflows alongside an ngrok tunnel for receiving webhook callbacks. Drop exported workflow JSON files into the workflows/ directory, start the stack with Docker, and the workflows will be imported automatically when the container boots.
-
Copy environment configuration
cp .env.example .env
Update
.envwith your preferred credentials. SetNGROK_AUTHTOKENif you plan to expose webhooks through ngrok. -
Add workflows Place your exported n8n workflow JSON files inside the
workflows/directory. They will be imported on container start. The repository now ships with an exampleEnsure_User.jsonworkflow to demonstrate the expected format—replace or extend it with your own exports. -
Run the stack
docker compose up --build
The n8n editor UI will be available at http://localhost:5678. The default credentials are set via
.env(initiallyadmin/admin). -
Expose webhooks (optional) When
NGROK_AUTHTOKENis provided, the ngrok container establishes a tunnel to the n8n instance. Visit http://localhost:4040 to inspect ngrok status and find the forwarded URL. UpdateWEBHOOK_URLin.envto match the active ngrok domain so n8n generates correct callback URLs, then restart the stack.
.
├── docker-compose.yml # Docker services for n8n and ngrok
├── workflows/ # Store exported n8n workflow JSON files here
├── .env.example # Sample environment configuration
└── README.md # Project documentation
- Persistent n8n data (credentials, execution history, settings) is stored in the named Docker volume
n8n_data. - Workflows are imported on each container start with
--replaceExisting, ensuring the database reflects the JSON files in this repository. - Keep sensitive values such as ngrok auth tokens out of version control;
.envis ignored by Git by default.