This section covers how to deploy n8n, a powerful workflow automation tool, on CasaOS using Docker. You will install and configure a PostgreSQL database for reliable data storage and then deploy n8n from the CasaOS App Store. The guide walks through connecting n8n to PostgreSQL, setting essential environment variables, and performing the initial setup, including creating an admin account and securing access.
By the end of this section, you will have a fully functional n8n instance running on CasaOS, ready to automate tasks, integrate services, and build custom workflows.
What will we need?
Raspberry Pi 5 with Casa OS see previous tutorial.
Software
Installing PostgreSQL
After logging into Casa OS, select Apps and search for PostgreSQL. Click on it (do not click Install) and choose Custom install from the dropdown arrow next to Install.

Fill in the following details. Essentially, select only the postgresql network and change the database name and login details. Use your own password!

Click on Install. After a moment, it's done.
Then open Casa OS terminal, login:
and paste:
docker exec -it postgresql psql -U opentux
then create database for n8n:CREATE USER n8n WITH PASSWORD 'opentux';
CREATE DATABASE n8n OWNER n8n;
Installing n8n
Go to Apps and search for n8n. Click on it (do not click Install) and choose Custom install from the dropdown arrow next to Install.

Fill in the following details. Simply select the postgresql network in Network section and add variable below:

After installation, go to n8n. Simply enter the same IP with a different port. As seen in the image above, the port of the n8n is 5678. In our case, we enter http://192.168.1.56:5678 (or http://picloud.local:5678) and set up the first user. Below, enter the database user and database name. The hostname is postgresql. This is crucial!
And that's it! n8n is functional.
Quick setup
Fill the name, email in initial form, n8n will send you a free license key to this email. Register it under Settings -> Usage

Now you can create your own n8n automations. For you that have 0 experience with it, I recommend to use Claude to create workflows for you. There are two options:
Basic: Ideal form small projects:
Use free Claude chat or Claude code and say him to generate a template for you. He provides you a JSON template which you can copy-paste to your n8n
Advanced: Complex projects, more complex workflows
Create account on Claude platform, prepaid some money, starts from ~ 5€ to have a budget for tokens. Install Claude code to your PC, connect it with your prepaid platform through API. Add n8n API for Claude code.
Now, claude code can automatically creates workflows for you immediately via n8n API, he will use prepaid tokens. Normally, use thousands of tokens for one workflow which means several cents.

Add new comment