n8n setup — a beginner's guide
For the AI Customer Service Agent — Starter (v1.1.4). You do not need to be technical to finish this page. The same guide ships inside your product download as docs/N8N_SETUP.md.
What is n8n, and why do I need it?
Your CocciFlows agent needs somewhere to run — a small always-on program that receives a question from your website, asks OpenAI for an answer, and sends the reply back. That program is n8n (say "n-eight-n"), a well-known independent automation platform. Think of it as the engine of your agent.
All you actually need from n8n:
| # | What | Looks like |
|---|---|---|
| 1 | An n8n installation or account | n8n Cloud, your PC, or a server |
| 2 | Your n8n address (URL) | https://yourname.app.n8n.cloud or http://localhost:5678 |
| 3 | An n8n API key | a long string you create inside n8n |
You paste 2 and 3 into the wizard's Connect your n8n step. That's the whole job.
Note: CocciFlows does not host n8n and does not sell you n8n or a server. You choose and own your n8n; your agent, your data, and your keys stay with you.
Which option should I choose?
| n8n Cloud | Your Windows PC | A VPS (rented server) | |
|---|---|---|---|
| Difficulty | Easy | Easy–Medium | Medium |
| Best for | Anyone | Testing, demos, learning | Production / self-hosting |
| Always online? | Yes | Only while your PC is on | Yes |
| You maintain a server? | No | No | Yes |
| Our recommendation | Easiest option | Testing only | Recommended self-hosted option |
Not sure? Choose n8n Cloud. It is the fastest route to a working agent, and n8n keeps the server running and secure for you. Choose a VPS if you specifically want to host things yourself. Choose your Windows PC only to try the product out — a chatbot on a real public website cannot reach software running on your own PC (see §2).
Option 1 · n8n Cloud (easiest)
With n8n Cloud, n8n runs the server for you. Nothing to install, no server to administer, no security updates to apply, and the secure web address (HTTPS) is set up for you.
- Go to n8n.io/cloud and create an account.
- When your workspace is ready you get an address like
https://something.app.n8n.cloud. Open it — you should see the n8n screen. That is your n8n address. - Create your API key — see Your API key.
- In the wizard's Connect your n8n step, paste the address and the key, then press Connect.
CocciFlows has no affiliation with n8n and earns nothing from your plan. Pricing and plans are n8n's; any current plan with API access works.
Option 2 · Your Windows PC with Docker Desktop (testing)
Use this for trying the product, demos, learning, and building your knowledge base before going live. Do not use it for a live website: your PC must stay switched on and awake, and the address you get only works on that one computer.
What is Docker Desktop? Software that runs other programs in a tidy, self-contained box on your PC. It's how you run n8n on Windows without installing lots of separate pieces. It's free for personal and small-business use.
- Install Docker Desktop from docker.com. If the installer offers to use WSL 2, say yes (it sets it up for you). Restart if asked.
- Start Docker Desktop from the Start menu and wait until it says Engine running. Leave it running.
- Open PowerShell: press Start, type
PowerShell, open Windows PowerShell. Paste each command below and press Enter. - Create storage for your n8n data:
Do not skip this. Without it, your n8n account, settings, and installed agent are erased every time the program restarts.docker volume create n8n_data - Start n8n:
In plain English: start n8n in the background, call itdocker run -d --name n8n -p 5678:5678 -v n8n_data:/home/node/.n8n docker.n8n.io/n8nio/n8nn8n, make it available on this PC at port 5678, and keep its data in the storage area you just created. The first run downloads n8n and can take a few minutes. - Open n8n in your browser at
http://localhost:5678. "localhost" means this computer — it is not a website on the internet, it's a shortcut your PC uses to talk to itself. - Create the n8n owner account (email + password) when n8n asks. These are your n8n login details — nothing to do with CocciFlows.
- Create the API key (below) and enter
http://localhost:5678plus the key in the wizard. Plainhttpis accepted here precisely because it never leaves your computer.
localhost on your PC. If you paste the chat snippet into a live website, visitors' browsers will try to contact their own computer, not yours, and the chat will fail. Local Windows is perfect for testing in the wizard's built-in chat and the included demo page on the same PC — and not suitable for a live chatbot. For a real public chatbot use n8n Cloud or a VPS with HTTPS.| Task | Command |
|---|---|
| Stop n8n | docker stop n8n |
| Start it again | docker start n8n |
| See if it's running | docker ps |
| Update n8n | docker pull docker.n8n.io/n8nio/n8n, then docker stop n8n, docker rm n8n, and re-run the start command |
Because your data lives in n8n_data, stopping, updating, or recreating the container does not lose anything.
Option 3 · A VPS (recommended for self-hosting)
A VPS is a small computer running in a data center. Unlike your laptop, it stays online 24 hours a day, has a permanent public address, and doesn't mind being left alone. You rent it by the month.
You can use any hosting provider you like — CocciFlows does not supply, resell, or recommend a specific one, and nothing in this product ties you to a particular company.
Example starter specification (a guide, not a guarantee — real capacity depends on your traffic, your other workloads, and your provider): Ubuntu LTS · 1–2 CPU cores · 2 GB RAM · 20 GB+ storage · a public IP address.
- Create the server. In your provider's control panel, create a server running Ubuntu LTS. The provider normally gives you a public IP address, a login username (often
root), and a password and/or SSH key. Keep these safe — they are the keys to your server. - Connect to the server. On Windows open PowerShell and run, with your own IP:
ssh root@YOUR_SERVER_IPsshopens a secure remote connection, so what you type runs on the server instead of your PC. The first time it asks whether to trust the server — typeyes. Then enter your password (nothing appears on screen while you type — that's normal). The prompt changes to something likeroot@your-server:~#. - Update Ubuntu:
This fetches the latest security updates. It prints a lot of text — expected.apt update && apt upgrade -y - Install Docker. Docker publishes an official one-line installer:
Check it worked withcurl -fsSL https://get.docker.com -o get-docker.sh sh get-docker.shdocker --version. This convenience script is published and maintained by Docker and is the quickest path on a fresh Ubuntu server; Docker's own documentation notes it is not intended for production-critical environments. If your organisation requires the package-manager installation instead, follow docs.docker.com and continue at the next step. - Create storage for your n8n data:
This keeps your n8n account, settings, and installed agent safe across restarts and updates. Do not skip it.docker volume create n8n_data - Start n8n:
docker run -d --name n8n --restart unless-stopped -p 5678:5678 -v n8n_data:/home/node/.n8n docker.n8n.io/n8nio/n8n--restart unless-stoppedmeans n8n comes back automatically if the server reboots. - Check that it is running:
What you should see: one line for a container nameddocker psn8n, a status likeUp 30 seconds, and ports showing5678. An empty list means n8n is not running —docker logs n8nshows why. You can now openhttp://YOUR_SERVER_IP:5678and create your n8n owner account.
http://YOUR_SERVER_IP:5678 is fine for a first look, but it is not how a production n8n should be left: it is unencrypted, it's an IP address rather than a name, and browsers block insecure requests from secure websites — so your chat widget on an https:// site will refuse to talk to it. The address you want looks like https://n8n.your-domain.com. See the next section.Make your n8n publicly available with HTTPS
For the VPS option only. n8n Cloud already handles this; local Windows testing does not need it.
Production-ready means three things:
- A domain or subdomain you own, e.g.
n8n.your-domain.com, pointed at your server's IP with a DNS "A record" (done wherever your domain is managed). - HTTPS — an encryption certificate so the address starts with
https://. Free certificates are standard (Let's Encrypt). - A reverse proxy or secure tunnel — a small piece of software in front of n8n that terminates HTTPS and passes requests through.
Common, well-documented approaches (choose one; each has its own guide): Caddy, which obtains and renews certificates automatically and is usually the least work; Traefik or Nginx + Certbot, the traditional combinations; or Cloudflare Tunnel, which publishes your server without opening ports.
Whichever you choose, two practical points matter for your agent:
- Only the proxy should be exposed. Once a proxy is in front, restart n8n bound to the machine itself — replace
-p 5678:5678with-p 127.0.0.1:5678:5678— so the internet reaches n8n only through the proxy. - Tell n8n its public address. n8n builds your webhook URL from its own configuration; behind a proxy it must know the public name, or the webhook address shown in the wizard will be wrong. n8n's hosting documentation covers the environment variables for this (
N8N_HOST,N8N_PROTOCOL,WEBHOOK_URL).
Authoritative instructions live with the projects themselves — n8n's hosting documentation is at docs.n8n.io/hosting and is kept current in a way a product manual cannot be. Follow it for the exact, up-to-date commands.
Your n8n API key (all three options)
The same last step whichever option you chose.
- Open your n8n in a browser and log in.
- Go to Settings (usually under your account menu, bottom-left).
- Open n8n API. (In older versions this entry is labelled simply API.)
- Click Create an API key.
- n8n shows the key once — copy it now. If you lose it, delete it and create another.
Then, in the setup wizard's Connect your n8n step:
- n8n address — e.g.
https://n8n.your-domain.com,https://yourname.app.n8n.cloud, orhttp://localhost:5678for local testing. The same address you type in your browser, with no extra path on the end. - n8n API key — the key you just copied.
Press Connect. The wizard checks:
| Check | What it means |
|---|---|
| Reachable | your address answers |
| Authenticated | your API key is accepted, and n8n's public API is enabled |
| Compatible version | your n8n is version 1.60 or newer |
A green ✓ Connected to n8n means you're ready for the next step. Two messages are normal rather than failures:
- "could not determine the n8n version…" — some n8n setups don't publish their version number. Setup can't confirm it, so it tells you honestly instead of guessing; just make sure you're on n8n 1.60 or newer.
- "…uses plain http to a non-local host — use https in production" — shown when your address is
http://and not on your own computer. Fine while testing; fix it before going live (above).
What your n8n API key is used for
In plain English: the API key is how the setup wizard does the work in n8n on your behalf, so you never have to. It is used for installation and maintenance operations:
- installing your agent workflow into your n8n
- creating credentials in n8n where your n8n supports it (your OpenAI key, and your SMTP details when you use the guided email setup)
- activating the workflow
- running the health checks
- updating or re-installing when you change your knowledge later
- uninstalling — removing the workflow and the credentials it created
The normal running of your agent does not use the n8n API key. Once installed, a customer's question goes to your workflow's webhook address in your n8n, which calls your OpenAI account and replies. The API key is not part of that conversation path.
How the key is handled: the setup wizard runs on your own computer at http://127.0.0.1:7378, an address only your computer can reach. Your n8n API key is kept in the wizard's memory for that session only and is not written to its saved settings file — close the wizard and you re-enter it next time, deliberately. It is sent only to your own n8n, never to CocciFlows, which operates no server in this path. Anything the widget puts in your website's page is public by design and contains only your agent's webhook address and appearance settings — no keys of any kind.
You can revoke the key in n8n at any time (Settings → n8n API). If you do, the agent keeps working; you'll simply need a new key the next time you run the setup wizard. No one from CocciFlows will ever ask you for your API keys.
Quick fixes
| Problem | What to do |
|---|---|
| "could not reach n8n" | Open the address in your browser first. Use exactly that address, no trailing path. On a VPS, check the server firewall allows the port. |
| "n8n rejected the API key" | The key may be from a different n8n, or was revoked. Create a fresh one (above). |
| n8n version error | Update n8n. On Docker: docker pull docker.n8n.io/n8nio/n8n, then remove and re-run the container (your n8n_data keeps everything). |
| Everything disappeared after a restart | The container was started without -v n8n_data:/home/node/.n8n. Recreate it with the volume. |
| Website chat says "connection problem", but the wizard's test chat works | Your n8n is not publicly reachable over HTTPS — the localhost limitation or missing HTTPS. |
| Docker command "not recognised" (Windows) | Docker Desktop isn't running, or PowerShell was opened before installing it. Start Docker Desktop, then open a new PowerShell window. |
More symptoms: the troubleshooting section of the main documentation, and docs/TROUBLESHOOTING.md in your package.