Error when hosting n8n on DigitalOcean

Hi n8n team,

Cause I can’t solve the problem here, so I rebuild the system again. This is the document I followed.

Describe the problem/error/question

After those commands, when I run the command to start docker compose, it shows the error as below.

What is the error message (if any)?

Error response from daemon: failed to create shim task: OCI runtime create failed: runc create failed: unable to start container process: error during container init: error mounting "/root/n8n-docker-caddy/caddy_config/Caddyfile" to rootfs at "/etc/caddy/Caddyfile": mount /root/n8n-docker-caddy/caddy_config/Caddyfile:/etc/caddy/Caddyfile (via /proc/self/fd/6), flags: 0x5000: not a directory: unknown: Are you trying to mount a directory onto a file (or vice-versa)? Check if the specified host path exists and is the expected type`

Please share your workflow

I suspect the problem is in the .env file.

I don’t know what < directory-path> I should fill. Here is my folder structure:
iShot_2023-08-03_23.40.40

There is no folder before n8n-docker-caddy.

Here is my docker-compose.yml, it’s auto-generated, I haven’t made any changes yet.

I found a similar issue, but I don’t have the n8n-digital-ocean folder.

Please help! Many thanks!

Have you tried removing root from the DATA_FOLDER directory path? It seems like n8n-docker-caddy is the root for your path.

1 Like

Thanks for your reply!
Yes, I tried the following but not work:

  1. DATA_FOLDER=/n8n-docker-caddy

Error response from daemon: failed to create shim task: OCI runtime create failed: runc create failed: unable to start container process: error during container init: error mounting "/n8n-docker-caddy/caddy_config/Caddyfile" to rootfs at "/etc/caddy/Caddyfile": mount /n8n-docker-caddy/caddy_config/Caddyfile:/etc/caddy/Caddyfile (via /proc/self/fd/6), flags: 0x5000: not a directory: unknown: Are you trying to mount a directory onto a file (or vice-versa)? Check if the specified host path exists and is the expected type
  1. DATA_FOLDER=~/n8n-docker-caddy
Error response from daemon: failed to create shim task: OCI runtime create failed: runc create failed: unable to start container process: error during container init: error mounting "/root/n8n-docker-caddy/caddy_config/Caddyfile" to rootfs at "/etc/caddy/Caddyfile": mount /root/n8n-docker-caddy/caddy_config/Caddyfile:/etc/caddy/Caddyfile (via /proc/self/fd/6), flags: 0x5000: not a directory: unknown: Are you trying to mount a directory onto a file (or vice-versa)? Check if the specified host path exists and is the expected type
1 Like

Hey @pcctw168,

The path needs to be where the folder is so I would use /home/kevin/n8n-docker-caddy, That should get it working.

From there you may also need to run sudo chown -R kevin:root /home/kevin/n8n-docker-caddy/.n8n as well.

3 Likes

Many thanks @Jon & @djangelic ! :smiling_face_with_three_hearts:
I have successfully entered the system.

3 Likes

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