Docker Container suddenly exiting with code 0

Describe the issue/error/question

Since yesterday, my docker container that I am running N8N in is exiting with status code 0 on startup.

What is the error message (if any)?

n8n-n8n-1 exited with code 0

Please share the workflow

user@host:path/to/n8n$ sudo docker compose up
[+] Running 1/1
 ⠿ Container n8n-n8n-1  Recreated                                                                                                                                                                                               0.1s
Attaching to n8n-n8n-1
n8n-n8n-1 exited with code 0

Information on your n8n setup

  • n8n version: latest docker image (0.221.1 I am assuming)

  • Database you’re using (default: SQLite): SQLite

  • Running n8n with the execution process [own(default), main]:

  • Running n8n via [Docker, npm,, desktop app]: docker compose, configs as follows:

version: "3"

    image: n8nio/n8n:0.221.1
    restart: always
      - "5678:5678"
      - N8N_BASIC_AUTH_ACTIVE=true
      - N8N_PORT=5678
      - N8N_PROTOCOL=https
      - NODE_ENV=production
      - N8N_EMAIL_MODE=smtp
      - ${DATA_FOLDER}/.n8n:/home/node/.n8n

I’d be super glad if someone could help me out here, my docker compose logs seem empty. I am truly stumped. Thanks in advance!

Hey @timothyoesch,

Welcome to the community :tada:

That is a bit of an odd one, Was it working previously and is the data_folder a folder that the user you are running as can access?

Hey @Jon

Thanks so much for your response.

Yes, that’s the thing. It has been working fine for at least 3 months now. And I’ve been doing all the updates without any issues.

The data_folder is accessible to the user running. I am genuinely stumped.

I just checked the docker container list and there the container status is listed as (133). No idea what that means, googling doesn’t help a whole lot…

I am also in the process of copying the entire config to a different server quickly to see if I can reproduce it or if the issue is server specific (which, between you and me, would bum me out a whole lot cause that’d mean I’d have to get in touch with my server master and I genuinely don’t wanna bother the guy haha).


I was able to spin up an n8n instance with the same configs on my local server which is a bit of a floozy… Cause I guess that means it’s either got to do with my docker engine or some other server specific settings… There’s nothing specific you know of that might be causing this, right? If that’s not the case, I’ll try to get a hold of my server master.


Now that I changed the Folder permissions to 777, the error message I receive when running the compose up command changed to 133 even in the command line, not just the Docker Container List Status column.

Okay, I just hit a bit of a snag.
After rebooting the entire system again, the docker container now spins up fine, but… The database seems to have been corrupted.
And becuase I didn’t think about it, the last DB backup i’ve done is more than a month ago.
I am in the process of figuring out wether or not I am able to restore my many workflows. Guess that’s what happens when you host your own instance and don’t do regular backups.

So what have we learned?

Children, automate backups, especially when you’re using stuff like SQLite, which is easy to backup but also easy to break.

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.