Skip to content
View in the app

A better way to browse. Learn more.

Unraid

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

CaddyV2 Docker Issue

Featured Replies

Hello everyone!

 

I have an odd problem.  When I try to install the CaddyV2 docker image from the App repo all goes fine until I try to publish it when I get a failed message with the following error:-

 

docker: 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 "/mnt/user/Docker/conf/caddyv2/Caddyfile" to rootfs at "/etc/caddy/Caddyfile": mount /mnt/user/Docker/conf/caddyv2/Caddyfile:/etc/caddy/Caddyfile (via /proc/self/fd/7), 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.

 

I have not changed any of the default settings and have other docker containers working fine, but I cant get this one to install or run.  I know I'm missing something but cant for the life of me see what.  The mount points are still set to the default and a I've tried changing them to fixed points but still no good.

 

Any help would be welcome.

Have you tried creating a Caddyfile under /mnt/user/Docker/conf/caddyv2/ before installing the docker image?

The problem is the default docker creates a directory called Caddyfile when it should only be creating a file named 'Caddyfile'. Delete the folder Caddyfile and insert a minimal Caddyfile and you should be good to go.

Sent from my Pixel 5a using Tapatalk

  • 1 year later...

The docker template is a disaster FFS.

  • 1 month later...
On 9/11/2024 at 11:27 PM, Espressomatic said:

The docker template is a disaster FFS.

Yes, it absolutely is. Two suggestions:

Option 1. If you're using the CaddyV2 docker image, try using the following:

For /data: /mnt/cache/appdata/CaddyV2/data

For /config: /mnt/cache/appdata/CaddyV2

Caddyfile is the big problem. The template says "Container Path: /etc/caddy/Caddyfile" but it looks like it's actually expecting the user to have a file named "Caddyfile" (no extension) there before the docker container is installed. (Totally weird and unexpected.) So I created a file called Caddyfile, which contains this:

localhost {
	respond "Hello, world!"
}

From (many) earlier failed attempts to install the docker, I already had a folder /mnt/cache/appdata/CaddyV2, and I put this file there. So for the Caddyfile parameter in the container settings I used /mnt/cache/appdata/CaddyV2/Caddyfile. Then I clicked Apply and the docker installed successfully (perhaps - more below).

 

Option 2. Install the Caddy docker from hotio. That has basically nothing to fill in - I think I just stuck with the defaults. My only (minor) gripe is that the WebUI is just a graphic showing that Caddy is working.

 

But please keep in mind that all I've done so far is have something up and apparently running. I'm able to type "caddy" in the container terminal and see that Caddy is indeed there, but that's all I have to show it's working. I've struggled to find information about what I should actually do to get Caddy running as a reverse proxy (together with Tailscale), which is my objective. Most of the documentation I've found doesn't deal with Caddy running as a docker.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.