Very first try with Caddy.
Installed as a snap on Lubuntu 24.04
I’m following the Quick Start instructions at Caddyfile Quick-start
1. The problem I’m having:
As per the instructions, I have created /home/alan/DEV/caddy/Caddyfile
Caddyfile contains only this:
{
debug
}
localhost
respond "Hello, world!"
I get an error message when I run $ sudo caddy start while inside /home/alan/DEV/caddy/
2. Error messages and/or full log output:
$ sudo caddy start
+ id -u
+ [ 0 = 0 ]
+ _caddy=/snap/caddy/673/usr/bin/caddy
+ snapctl get modified
+ [ = true ]
+ cli start
+ arg=start
+ shift 1
+ /snap/caddy/673/usr/bin/caddy start
2025/11/26 19:22:00.948 WARN failed to set GOMAXPROCS {"error": "open /proc/self/mountinfo: permission denied"}
2025/11/26 19:22:00.948 INFO GOMEMLIMIT is updated {"package": "github.com/KimMachineGun/automemlimit/memlimit", "GOMEMLIMIT": 7679873433, "previous": 9223372036854775807}
2025/11/26 19:22:00.948 INFO maxprocs: No GOMAXPROCS change to reset
Error: reading default Caddyfile: open Caddyfile: permission denied
Error: caddy process exited with error: exit status 1
journalctl -u caddy --no-pager | less +G
shows
– No entries –
3. Caddy version:
$ sudo caddy version
+ id -u
+ [ 0 = 0 ]
+ _caddy=/snap/caddy/673/usr/bin/caddy
+ snapctl get modified
+ [ = true ]
+ cli version
+ arg=version
+ shift 1
+ /snap/caddy/673/usr/bin/caddy version
551f793700fe1550845c824470b623fd1aa03d36 (22 Aug 25 21:29 UTC)
4. How I installed and ran Caddy:
a. System environment:
$ uname -a
Linux L24 6.14.0-33-generic #33~24.04.1-Ubuntu SMP PREEMPT_DYNAMIC Fri Sep 19 17:02:30 UTC 2 x86_64 x86_64 x86_64 GNU/Linux
$ systemd --version
systemd 255 (255.4-1ubuntu8.11)
+PAM +AUDIT +SELINUX +APPARMOR +IMA +SMACK +SECCOMP +GCRYPT -GNUTLS +OPENSSL +ACL +BLKID +CURL +ELFUTILS +FIDO2 +IDN2 -IDN +IPTC +KMOD +LIBCRYPTSETUP +LIBFDISK +PCRE2 -PWQUALITY +P11KIT +QRENCODE +TPM2 +BZIP2 +LZ4 +XZ +ZLIB +ZSTD -BPF_FRAMEWORK -XKBCOMMON +UTMP +SYSVINIT default-hierarchy=unified
$ snap --version
snap 2.72
snapd 2.72
series 16
ubuntu 24.04
kernel 6.14.0-33-generic
architecture amd64
b. Command:
$ sudo caddy start
c. Service/unit/compose file:
d. My complete Caddy config:
{
debug
}
localhost
respond "Hello, world!"
$ ll
total 12
drwxrwxr-x 2 alan alan 4096 Nov 26 19:21 ./
drwxrwxr-x 5 alan alan 4096 Nov 26 18:47 ../
-rw-rw-r-- 1 alan alan 47 Nov 26 19:21 Caddyfile
I have tried changing the permissions of Caddyfile to rwxrwxrwx, but it makes no difference.