Set up a pinned n8n lab with Docker and synthetic data
Start a pinned n8n release locally, sign in to the editor, load synthetic data and tear the lab down cleanly.
By Invicly Tech, , in n8n, AI Automation and Voice Agents. About 10 minutes to read.
In short
A lab is a safe copy of n8n that runs on your own computer. You pin one exact release, keep its data in a Docker volume, and load only made-up data. When you are done you can delete everything with one command.
Think of it like this: A lab is like a practice kitchen: same tools as the real one, fake ingredients, and you can wipe it clean afterwards.
Explained simply
n8n is a tool where you build automations by joining boxes on a canvas. Each box is a node that does one job, like receiving a form or calling a service. A group of connected nodes is a workflow. You can try all of this without paying or touching real data, by running n8n on your own computer.
To run it you use Docker. Docker runs programs in sealed boxes called containers, so you do not install n8n the usual way. You tell Docker which n8n release to use, and Docker starts it. Choosing one fixed release, called pinning, means the screens and node names stay the same while you learn.
n8n keeps your workflows and saved logins in a folder. Inside a container that folder disappears when the container is removed, unless you attach a volume. A volume is storage that Docker keeps separately, like an external drive you plug in.
When n8n starts, open it in a browser and create the owner account. Then load fake data: invented names and example.com emails. Use placeholder credentials too. When you finish, remove the container and the volume and the lab is gone.
Press Play on a diagram to walk through it one step at a time.
- 1Pick a release
Choose one version tag and write it down
- 2Create a volume
Keeps workflows and credentials between restarts
- 3Start the container
Publish port 5678
- 4Create the owner
First sign-in in the editor
- 5Load synthetic data
Fake appointment requests only
- 6Tear down
Remove the container and the volume
- 1Start
Pinned image, fresh volume
- 2Build and test
Synthetic data only
- 3Export
Save workflow JSON to Git
- 4Tear down
Remove container and volume
- Back to step 1
In depth
Pin the release and why it matters
n8n ships often. Nodes get new versions, menus move, and defaults change. If your lab runs whatever is newest, a lesson written last month may not match your screen. Pinning means naming one version tag in the image name, such as docker.n8n.io/n8nio/n8n followed by a colon and the version. Pick a stable release from the n8n release notes, write it in your README, and change it only on purpose.
Pinning also helps when you share a workflow. Anyone who runs the same tag gets the same nodes. If you upgrade, do it as a separate step: stop, back up the volume, change the tag, start, and check that your workflows still run.
- Avoid the latest tag in labs
- Record the tag next to your exports
- Upgrade as its own step, with a backup
- Read the release notes for breaking changes
What lives in the volume
n8n stores its data under /home/node/.n8n inside the container. With the default setup this includes a SQLite database holding your workflows, credentials and execution history, plus a config file that holds the encryption key. n8n uses that key to encrypt saved credentials. If you delete the key but keep the database, the credentials cannot be decrypted.
This is why the volume matters. Mount it, and a restart keeps everything. Remove it, and you start from nothing. For a lab that is a feature: removing the volume is the cleanest reset there is.
- 1Editor and API
Served on port 5678
- 2n8n process
Runs workflows and triggers
- 3/home/node/.n8n
Mounted from your Docker volume
- 4SQLite database and config
Workflows, credentials, executions, encryption key
Time zone, ports and first sign-in
Set GENERIC_TIMEZONE so schedules use your zone, and TZ so system time matches. Publish port 5678 with -p 5678:5678 and open http://localhost:5678. The first screen asks you to create the owner account with an email and a password. This account is local to your lab, so use a throwaway password and do not reuse one from elsewhere.
If the page does not open, check that the container is running with docker ps and read its output with docker logs n8n-lab. A port already in use is the most common cause; pick another host port such as -p 5679:5678.
- GENERIC_TIMEZONE controls schedule times
- Port 5678 is the editor
- Owner account is created on first visit
- docker logs shows start-up errors
Synthetic data and placeholder credentials
A lab should never hold real customer records. Build a small file of invented appointment requests: names like Ada Test, emails at example.com, slots on fixed dates. Keep it in a folder in Git so every lab starts with the same input. When a workflow asks for a credential, use a placeholder value and point the node at a local fixture or mock service.
This habit protects you twice. A mistake cannot leak real data, and a shared export cannot contain secrets you never entered.
Learn it in 6 short steps
About 25m each. Track them with a timer in your plan.
- 1Pick and pin one n8n release~25m
- 2Run n8n with Docker and a data volume~25m
- 3Open the editor and create the owner account~25m
- 4Load synthetic appointment data~25m
- 5Store placeholder credentials safely~25m
- 6Tear down containers and volumes~25m
Key points
- Pin a version tag such as docker.n8n.io/n8nio/n8n:VERSION. Do not rely on latest, because a lab you cannot reproduce teaches little.
- Mount a volume at /home/node/.n8n so workflows, credentials and the encryption key survive a restart.
- The first visit to http://localhost:5678 asks you to create an owner account. This stays on your machine.
- Use synthetic data (example.com addresses, invented names) and placeholder credentials. Real customer data never goes in a lab.
- Teardown means removing the container and, if you want a clean slate, the volume too.
Key terms
Tap a card to flip it. 0/5 known
Examples
docker volume create n8n_lab_data
docker run -d --name n8n-lab -p 5678:5678 \
-e GENERIC_TIMEZONE=Europe/London -e TZ=Europe/London \
-v n8n_lab_data:/home/node/.n8n \
docker.n8n.io/n8nio/n8n:VERSION
# open http://localhost:5678 and create the owner account
# teardown
docker stop n8n-lab && docker rm n8n-lab
docker volume rm n8n_lab_dataStart, use and remove a pinned lab. Replace VERSION with the release you chose.
Start a lab with Docker Compose
A Compose file records the same settings as the docker run command, so the lab is easy to repeat. Save it as compose.yaml, run docker compose up -d, and open the editor. Expect to see the owner sign-up page at http://localhost:5678. Replace the version placeholder with the release you pinned.
services:
n8n:
image: docker.n8n.io/n8nio/n8n:<version>
ports:
- "5678:5678"
environment:
- GENERIC_TIMEZONE=Europe/London
- TZ=Europe/London
volumes:
- n8n_lab_data:/home/node/.n8n
volumes:
n8n_lab_data:Tear the lab down and prove it is gone
docker compose down stops and removes the container but keeps the volume. Adding -v removes the volume as well. After that, starting the lab again shows the owner sign-up page, which is your evidence that nothing was left behind.
docker compose down -v
docker volume ls | grep n8n_lab_data # prints nothing
docker compose up -d # fresh lab
# browser: http://localhost:5678 shows owner sign-up againQuick reference
- Image: docker.n8n.io/n8nio/n8n plus a colon and a version tag. Pin it.
- Editor: http://localhost:5678 (publish with -p 5678:5678).
- Data folder in the container: /home/node/.n8n. Mount a volume there.
- Set GENERIC_TIMEZONE and TZ so schedules run in your zone.
- docker logs with the container name shows start-up errors.
- docker compose down keeps data. docker compose down -v deletes it.
- Use example.com emails, invented names and placeholder keys only.
Common mistakes
- Running without a volume: the next docker rm deletes every workflow you built.
- Using the latest tag and finding the editor looks different from the lesson next month.
- Pasting a real API key into a lab credential. Use a placeholder and a mock service.
Quick quiz
Pick an answer to see if you're right and why.
Practice exercises
Try each one yourself first. Use the hint if you get stuck, then compare with the solution.
- Exercise 1easy
Start a pinned n8n container with a named volume and open the editor.
- Exercise 2medium
Prove the volume keeps your work. Create a workflow named Test, remove and recreate the container, and confirm Test is still there.
- Exercise 3hard
Create a synthetic data file of five appointment requests, two of them incomplete, and write a teardown checklist that proves no data remains.
Check yourself
Answer in your head, reveal, then be honest with yourself.
Feel confident about this topic?
Frequently asked questions
- Do I need to pay to use n8n for this path?
- No. The self-hosted community edition runs locally and is enough for these labs. Some features are limited to paid plans, and the lessons say so when they matter.
- Can I use n8n Cloud instead of Docker?
- Yes, a free trial workspace works for most steps. Use a separate throwaway workspace and synthetic data, and note that teardown means deleting the workflows and credentials you made.
- Why does my container exit right after starting?
- Read docker logs n8n-lab. The usual causes are a port already in use or a volume with the wrong permissions.
- Is it safe to store credentials in the lab?
- Only placeholders. They are encrypted with the instance key, but a lab is not the place for real secrets.