'logs.level' not declared in the schema

First of all thanks for reading this.
Hi my name is Elias aka. BrutalBirdie :wave:
I am currently packaging n8n for Cloudron.

The packaged app source code can be viewed here.

Prerequisite

Cloudron utilizes docker containers which run in a very strict read-only mode and only certain paths are read-write and persistent.
The common data path for user data is /app/data.
This way I can package the binary app and all the data that needs to be backuped is in a single path.
Making the backups very small and also making upgrade processes a lot easier.

The Problem

After a lot of tinkering I had to learn he hard way that .n8n/config can not be used for N8N_CONFIG_FILES this needs to be a separate file.

So I do exactly that.

Excerpt from docker/app/pkg/start.sh

CONFIG_FILE="/app/data/.n8n/app-config.json"

if [[ ! -f $CONFIG_FILE ]]; then
  echo "=> Creating config file"
  echo "{}" > $CONFIG_FILE
fi

cat $CONFIG_FILE | \
jq '.database.type="postgresdb"' | \
jq '.database.postgresdb.host=env.CLOUDRON_POSTGRESQL_HOST' | \
jq '.database.postgresdb.port=env.CLOUDRON_POSTGRESQL_PORT' | \
jq '.database.postgresdb.user=env.CLOUDRON_POSTGRESQL_USERNAME' | \
jq '.database.postgresdb.password=env.CLOUDRON_POSTGRESQL_PASSWORD' | \
jq '.database.postgresdb.database=env.CLOUDRON_POSTGRESQL_DATABASE' \
> $CONFIG_FILE

When running the app this work as intended.
The file gets generated and used by n8n.

May 28 14:41:28 Loading configuration overwrites from:
May 28 14:41:28 - /app/data/.n8n/app-config.json
May 28 14:41:30 n8n ready on 0.0.0.0, port 5678
May 28 14:41:30 Version: 0.117.0
May 28 14:41:30
May 28 14:41:30 Editor is now accessible via:
May 28 14:41:30 http://localhost:5678/

The config file:

{
  "database": {
    "type": "postgresdb",
    "postgresdb": {
      "host": "postgresql",
      "port": "5432",
      "user": "user6e5a8498ee6647ae8ac1bd1fc52e4434",
      "password": "b41b4df616f87683ceae6ee04ed191080077f783acc7f3695fbb04a2b0fbb0e855b924313ccc0c1bc28c28acdd32f7bfc966ebf5369b0d1f38d6cddeb6c54b6c",
      "database": "db6e5a8498ee6647ae8ac1bd1fc52e4434"
    }
  }
}

Working, so far so good.
Now I want to increase the logging level because the app is stuck here:
image
But this issue is not relevant for this topic.

So I did more reading and tinkering.

Official Doc states:
docs.n8n .io/reference/configuration.html#configuration-via-file

Okay so this config file should be correct, right?

{
	"database": {
		"type": "postgresdb",
		"postgresdb": {
			"host": "postgresql",
			"port": "5432",
			"user": "user6e5a8498ee6647ae8ac1bd1fc52e4434",
			"password": "b41b4df616f87683ceae6ee04ed191080077f783acc7f3695fbb04a2b0fbb0e855b924313ccc0c1bc28c28acdd32f7bfc966ebf5369b0d1f38d6cddeb6c54b6c",
			"database": "db6e5a8498ee6647ae8ac1bd1fc52e4434"
		}
	},
	"logs": {
		"level": "debug"
	}
}

Ending in this error message:

Error: configuration param 'logs.level' not declared in the schema

So what is going on here? Am I missing something?

Hey @BrutalBirdie

Welcome to our community forums!

I realized you’re using version 0.117.0 based on the logs you provided and the logging feature was implemented and released on version 0.118.0.

This is the reason you’re getting these errors. Upgrading should solve the issue.

I have a very similar file on my computer that works fine:

{
    "database": {
        "type": "postgresdb",
        "postgresdb": {
            "host": "localhost",
			"password": "***",
			"user": "postgres",
			"schema": "public"
        }
    },
    "logs": {
        "level": "debug"
    }
}
2 Likes

Oh No… let me check that…


You are right…

ARG N8N_VERSION=0.117.0

:man_facepalming: I am so sorry for that long post and work just to realize I did not set the latest version.
I am checking that right away and report back.


EDIT:
Yes that did the trick. Figures…
Sorry again and thank you very much for pointing out this user error.

2 Likes

No problem, feel always free to post here =)

Have fun with n8n!

1 Like