Error during parsing: Unknown directive 'filemanager'

I have no idea what happened. I’m trying to use the http.webdav plugin and this happened. But after I changed my config back. It’s still not recovered.
This is my Caddyfile

files.domain.com:443 {
  filemanager / /mnt/CloudDisk {
    database /etc/ssl/caddy/filemanager/database.db
    locale zh_cn
    allowCommands true
    allowEdit true
    allowNew true
  }
}
...

This is the error log

$ sudo systemctl status caddy -l --no-pager
● caddy.service - Caddy HTTP/2 web server
   Loaded: loaded (/etc/systemd/system/caddy.service; enabled; vendor preset: enabled)
   Active: failed (Result: exit-code) since Tue 2019-04-02 09:53:21 CST; 23s ago
     Docs: https://caddyserver.com/docs
  Process: 1761 ExecStart=/usr/local/bin/caddy -log stdout -agree=true -conf=/etc/caddy/Caddyfile -root=/var/tmp (code=exited, status=1/FAILURE)
 Main PID: 1761 (code=exited, status=1/FAILURE)

Apr 02 09:53:20 HongKongHost systemd[1]: Started Caddy HTTP/2 web server.
Apr 02 09:53:21 HongKongHost caddy[1761]: 2019/04/02 09:53:21 /etc/caddy/Caddyfile:2 - Error during parsing: Unknown directive 'filemanager'
Apr 02 09:53:21 HongKongHost systemd[1]: caddy.service: Main process exited, code=exited, status=1/FAILURE
Apr 02 09:53:21 HongKongHost systemd[1]: caddy.service: Unit entered failed state.
Apr 02 09:53:21 HongKongHost systemd[1]: caddy.service: Failed with result 'exit-code'.

Hi @eric,

This was a change made around two and a half months ago. Further details are here, courtesy of the author of the plugin: New old plugin: http.filebrowser

Thank you for the answer, I’ve solved the problem by changing plugin name from “filemanager” to “filebrowser”. I thought it was the database path error but actually it isn’t.

files.domain.com:443 {                         
  filebrowser / /mnt/CloudDisk {                   
    database /etc/ssl/caddy/filebrowser/database.db
  }                                                
}

And thank you again for your answer! :slight_smile:

Also, I deleted the old database and let the plugin generate a new one. I think that’s also an essential step to make it work again :smiley:

Indeed, the author did mention a database upgrade process. If you didn’t need to preserve the database, it is simpler just to delete and recreate it as you’ve done.

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