N8n Installation Script for Raspberry Pi (n8n-pi)

As promised, I have recently completed the first iteration (read “It probably has some bugs in it!”) of a complete n8n installation script for the Raspberry Pi on a clean installation of Raspbian Buster (February 2020 build).

With only a few small steps and a system reboot, you can have your own custom n8n RPi up and running!

I have written up some documentation (it is still a work in progress) on how to perform the install or, if you are a bit of a keener, you can simple boot your RPi from a fresh Raspbian installation, SSH into the system and enter:

wget --no-cache -O - https://raw.githubusercontent.com/TephlonDude/n8n-pi/master/scripts/build-n8n-pi-1.sh | bash

And follow the onscreen instructions. Here is a taste of the installation script:
InstallPart1

This is just the first roll-out of the script and I have a lot of other plans in the works for this as well including:

  • Prebuilt RPi images
  • n8n RPi management tools
  • Custom RPi GPIO n8n nodes

Feel free to check out the documentation or the GitHub repository.

As usual, please let me know how this is working for you and if you have any suggestions.

8 Likes

Really cool thanks a lot @Tephlon for creating that! I am sure it will be very helpful for many people.

1 Like

Thanks @Tephlon I’ll try this on my RPi4

1 Like

Hey @tmleonidas,
Testing the RPi4 was on my to do list. left me know how it turns out!

I have run the installer Script, but there is no webinterface on Port 5678. Any idea?

Hey @ixidion! Welcome to the community! Hope you find your time here beneficial!

Would you be able to provide me with a bit more detail about the process, any errors that may have come up on the screen, etc?

Also, can you post the content of /var/log/n8n-pi.log? This will let me know what was executed or what may have gone wrong.

1 Like

Hi @Tephlon,

unfortunately I can’t see any error. There is a Pi-Hole-Webinterface running on the same Raspberry, but on a different port.

Here is the log:
https://textbin.net/Wm7gqIh9Rs

Hey @ixidion! Thanks for the updated information. Things are much clearer now! :face_with_monocle:

OK. So a couple of things.

  1. The script was designed to run on a clean image of Raspberry Pi OS. It sounds like there was at least one other application (Pi-Hole) that was installed previously. I have not done any testing with other applications in place so there could be some unpredictable results.
  2. It looks like you ran the installer script at least twice before it gave an error the second time the the n8n user already existed.
  3. There is a second script that is installed by the first script that has not been run. This script will run automatically when you reboot the RPi and then log in as the n8n user (default password is n8n=gr8!).

My recommended plan of attack for you would be:

  1. Reboot the RPi
  2. Log in as the n8n user
  3. Let the next script run
  4. Reboot again
  5. Check for the interface on port 5678

If that does not work, I would suggest getting your hands on a second microSD card and then put a fresh image of Raspberry Pi OS (32-bit) Lite on it and try again. This may give you better results.

Let me know how you make out.

I made a fresh install on my 2nd Raspi and it worked. Thanks so far. :slight_smile:

1 Like

Hi @Tephlon, thanks a lot for putting this together. Expecting my Raspberry Pi 4 4GB today in the mail.

I am new to setting up a Pi and I like to use it for several use cases, n8n.io being one of them.

I’ve read the installation instructions and I suppose I shall opt for the DIY install. n8n-pi Documentation

I also like to use the full Raspi OS “2020-05-27-raspios-buster-full-armhf.zip”:

  • will I expect any challenges here by not using the lite?
  • I will also want to run other services on the PI, big dream would be to run each service in a docker container.
  • Do I need to use the default n8n user/pw or can I change it on install?: n8n and n8n=gr8!

Thanks,
Chris

Hey @chris,

I have not tested the script on the full version of Raspberry Pi OS but I suspect that it should work fine. Let me know what you discover when you give it a try. If it does not work, then I would suggest installing the lite version, run the installation script, and then add extra services from there.

There is not an option for changing the password during the installation script at this time but it is on my roadmap for future versions. After the installation, you can reset the n8n password by logging in as the n8n user, entering the passwd command, and following the prompt. You can then set the password to whatever you wish. (I would also recommend a reboot at that time so that the PM2 service that runs n8n can use the new password.)

Keep me posted on your progress with this. I am interested to see what happens with the variations that you are using and what challenges you run into. I am also more than happy to assist wherever I can.

1 Like

Hi @Tephlon,
just wanted to say thanks for your helpful post. I couldn’t execute yet on it. Found caprover now and trying to figure out how to get n8n running on nginx in https there :slight_smile:

On the plus side I have a few more SD cards now so able to switch.

Best,
Chris

Hey,

im a linux noob. How can i unisntall the Packages for n8n ? Or how to reset the installation ? Got some probs to connect with the n8n-web… :confused:

Greez
J4it

Your best bet would be to rewrite a fresh Raspberry Pi OS installation to the SD card.

Hello. Could someone explain me, how to enable https in my n8n RaspberryPi installation? I’ve done fresh install (not on real RasPI though, but on Raspberry Pi Desktop running in VmWare), and have no clue what to do next.
I am about to make a Telegram bot, but Telegram does not allow to connect to its API via http…

By the way, I’ve had some problems with script - it fails after first reboot at install, so I had to install npm manually before start of installation. Dont know, if it is related to Raspberry Pi Desktop only, or not.

1 Like

Hi @michael3m

For this purpose, you can use a tunnel.

https://docs.n8n.io/hosting/installation/npm/#n8n-with-tunnel