Issue with Caddyfile from ultimate-torrent-setup

1. Caddy version (caddy version):


2. How I run Caddy:

a. System environment:

Ubuntu, systemctl, xmlrpc, libtorrent

b. Command:

caddy validate

c. Service/unit/compose file:

Paste full file contents here.
Make sure backticks stay on their own lines,
and the post looks nice in the preview pane.

d. My complete Caddyfile or JSON config:

} {
	root * /var/www
	encode gzip
	header Cache-Control "no-cache"
	php_fastcgi unix//run/php/php7.4-fpm.sock

	route /auth* {
		auth_portal {
			local_backend /etc/caddy/auth/local/users.json
			jwt_token_file 1 /etc/caddy/auth/local/jwt_privatekey.pem
			ui {
				links {
					"Tautulli" /tautulli
					"ruTorrent" /rutorrent
					"Sonarr" /sonarr
					"Radarr" /radarr
					"Lidarr" /lidarr
					"Resillio Sync" /sync

	@protected not path /favicon.ico /public* /tautulli/api*
	route @protected {
		jwt {
			primary yes
			user_identity subject
			trusted_public_key 1 /etc/caddy/auth/local/jwt_publickey.pem

	@logout path_regexp /logout$
	rewrite @logout /auth/logout

	@restricted path_regexp /\.(git|htaccess)|/rutorrent/(conf|share)
	respond @restricted 404

	reverse_proxy /sonarr*

	reverse_proxy /radarr*

	reverse_proxy /lidarr*

	reverse_proxy /tautulli*

	@rslsync path /sync* /gui*
	route @rslsync {
		redir /sync /sync/
		uri replace /sync/ /gui/

http://localhost {
	root * /var/www
	encode gzip
	php_fastcgi unix//run/php/php7.4-fpm.sock
}* {
	root * /var/www
	encode gzip
	php_fastcgi unix//run/php/php7.4-fpm.sock
} {
	redir https://{host}{uri}

3. The problem I’m having:

I use systemctl enable --now caddy.service and all appears fine. However the next step is to get some log in credentials using systemctl enable --now caddy.service. Output from this includes an error "n ExecStart= process belonging to unit caddy.service has exited.

– The process’ exit code is ‘exited’ and its exit status is 226.
Nov 03 20:49:51 33Tmedia systemd[1]: caddy.service: Failed with result ‘exit-code’.
– Subject: Unit failed
– Defined-By: systemd"

4. Error messages and/or full log output:

When I use caddy validate I get the following error message “using adjacent Caddyfile
validate: adapting config using caddyfile: parsing caddyfile tokens for ‘route’: Caddyfile:29 - Error during parsing: unrecognized directive: auth_portal - are you sure your Caddyfile structure (nesting and braces) is correct?”

5. What I already tried:

OK, so I am a noob here. Please don’t shoot me. I am trying to follow the instructions for a torrent build here - Home · t0phux/ultimate-torrent-setup Wiki · GitHub. I am new to Linux and have never used Caddy. One of the steps in instructions had a script to update caddy using It appears that this is now so I built it with that. Now I am stuck with the above caddyfile. (When I use a very basic caddyfile and curl, the caddyfile works so I assume that at least caddy is working?)
Now I am stuck and any help / advice to help me learn would be appreciated.

6. Links to relevant resources:

I think auth_portal is now authp. See the docs:

Thanks for reply! I don’t know if I am missing something, but still seems to be auth-portal to me? GitHub - greenpau/caddy-auth-portal: Authentication Plugin for Caddy v2 implementing Form-Based, Basic, Local, LDAP, OpenID Connect, OAuth 2.0 (Github, Google, Facebook, Okta, etc.), SAML Authentication. MFA with App Authenticators and Yubico.

1 Like

Yes, but the Caddyfile directive seems to have been renamed.

/cc @greenpau

1 Like

Apologies! I understand now. Getting a different error now, but let me dig around the auth-portal documentation

1 Like

I have found where greenpau assissed with caddyfile update with same issue. from this I have noted that I don’t have

http.authentication.providers.jwt v1.3.12

I know this is probably properly basic, but how do I get this? i now get an error " Error during parsing: unrecognized directive: jwt - are you sure your Caddyfile structure (nesting and braces) is correct?"

@rehcram , the plugin was renamed to “caddy-authorize”. Please compile with it and change “jwt” to “authorize” in your Caddyfile

For more info, please see


Thank you! That worked

This topic was automatically closed after 30 days. New replies are no longer allowed.