Automatic n8n Install & Docker Configuration

For an automation software, the install is rather manual!

So I built a single command that installs all dependencies and creates docker compose files based on prompts the script asks you.

It is by far the easiest way to install n8n i have tried so far.
It even automatically connects your n8n to your Cloudflare domain with a Cloudflare tunnel (if you select that option)

To use, just run the command below. It should work on all the major linux distros.

curl -sSL https://raw.githubusercontent.com/liamdmcgarrigle/n8n-auto-install/main/install.sh | bash && bash n8n-auto-install/setup.sh

Here is a video showing a preview of what it’s like to use

Check it out on github and let me know if you run into any bugs or have any requests (and leave a star if you’re feeling generous)

There is an express setup and a long detailed setup option, the fast setup takes 3-5 minutes and the detailed setup that can take about 10-15 minutes depending on all the options you want to change

How it works

First it installs everything needed, like docker and Python to run itself

Then it asks you questions on how you want n8n setup and it creates a folder called n8n. It then makes the .env and docker-compose.yaml files based on your inputs.

It even adds more environment vars than you selected so it’s easier to change things around in the future

Limitations

It is not a full wrapper. It only does the setup then deletes itself.

No Undo

Once you submit an option it’s set in stone. You won’t be able to go back once you input a value.
You can of cource go to the .env file and change it there, or just force stop the script, delete it and the other directories, and rerun it.

Go into the env with nano .env you need to cd n8n to be in the same directory first

Manually clean up after crashes

I did not build any error handling for it (at least yet)
If you enter a value that causes an error or if there is a bug, the script will crash leaving itself and potentially incomplete config files behind.

You may need to delete those directories before trying again

rm -r n8n n8n-auto-install

No nginx or custom images yet

I personally use nginx and custom images with a dockerfile for all of my n8n deployments, so i will be adding those soon (soon = eventually)


p.s.
Sorry if anyone tried it after the community hangout and it didn’t work!
There was a bug that i pushed in right before the hangout, dynamic typed languages are hard :sweat_smile:

7 Likes

This is a great one. I tried to follow it but I feel using existing tools for docker management makes the process easier. I think integrating, portainer, Nginx Proxy Manager and n8n is way much better for future management. I like this approach because I need to integrate n8n with a database and a python server for dependency management.

@BetterMedia if you install portainer on the same system you will see this set-up as a stack in portainer.

We have rewriting this to be a more complete management tool. If you want to shoot me some details about your specific use case we’ll keep it in mind when we go to tackle it