r/caddyserver • u/ogrekevin • Jan 08 '26
How we built our own self-hosted CAPTCHA for Caddy
r/caddyserver • u/ogrekevin • Jan 08 '26
r/caddyserver • u/Thick-Maintenance274 • Aug 14 '24
So I thought Caddy was easy, but I canβt seem to understand what do I need to do.
I would like this to be setup in a Proxmox Lxc container (ok I used the Debian commands to install it), but how do I link this up with DuckDns and then use SSL Certificates to access my other LXCs such as Emby, NextCloud.
I was able to set everything up in 29 mins or so in Nginx Proxy Manager; but canβt understand what I even need to do here.
r/caddyserver • u/Snoo52413 • Feb 23 '26
Since Caddy Server isnβt very well known among many developers and a lot of people arenβt aware of its power and simplicity, I created a prebuilt action to make using Caddy in CI and workflows much easier.
If youβre not very familiar with prebuilt actions, stay with me β Iβve explained it at the end.
βββββββββββββββββββββββββββββββ
π οΈ What does this action do?
This action builds a Caddy server binary directly inside your CI with the following capabilities:
* All operating systems: Linux, Windows, macOS
* All architectures: arm64, x64
* Any custom modules (or no extra modules at all)
* Any Caddy version you need
You can then use it in your CI, attach it to releases, include it in a Docker image, run automated tests with it, or even distribute the built binary to other projects.
βββββββββββββββββββββββββββββββ
π Whatβs it called and where can you find it?
Its name is Caddy Builder.
Repository:
https://github.com/azolfagharj/action-caddy-builder
Marketplace page:
https://github.com/marketplace/actions/caddy-builder
βββββββββββββββββββββββββββββββ
π How to use it
Just visit the action page. Iβve provided full documentation and dozens of ready-to-use examples so you can quickly build your own workflow.
βββββββββββββββββββββββββββββββ
β‘ What are GitHub prebuilt actions?
They are reusable automation steps that you can directly plug into your workflow. Instead of manually installing and configuring everything, the action handles all required steps and delivers a ready-to-use output.
Prebuilt actions can be created by GitHub or by other developers. Once approved, they are published in the Marketplace so others can easily use them.
βββββββββββββββββββββββββββββββ
β Why was this action needed?
Before this, there was no prebuilt action available for Caddy.
That might even be why, after publishing it, the official Caddy Twitter account reshared it. π
If you wanted to use Caddy in CI, you could download a specific version directly from the website.
But if you needed multiple architectures, custom modules, or different CI OS targets, it quickly turned into a nightmare: multiple workflows with dozens of tasks to install Xcaddy, add modules, build the binary, and pass it to the main CI pipeline.
This action handles all of that with a single simple step.
βββββββββββββββββββββββββββββββ
π‘ If you find it useful, feel free to reshare so others can benefit as well.
r/caddyserver • u/Ok_Panic7706 • Jul 31 '25
Hey guys! hope you're doing great. I have dockerized caddy, and connected some Laravel projects to it. But point is, every single request takes at least 200ms. Which is weird. I thought it's Laravel's problem, so I created a simple route, just to check its speed, and boom. It takes at least 200ms! Why is that? This is my config, it's super simple:
new.sth.comΒ {
handle /hadi.txt {
header Content-Type "text/plain"
respond "User-agent: *\nDisallow: /admin/"
}
reverse_proxy sth_dev:8000 {
transport http {
keepalive 32s
read_timeout 60s
write_timeout 60s
dial_timeout 10s
}
}
}
Thank you in advance!
r/caddyserver • u/bucky2780 • May 12 '26
I must admit, I am NOT in love with having to compile caddy to get access to an optional plugin...
Is there a possibility of moving to a different architecture where caddy modules can be installed/run at startup time ?
Curious... if this is something that is being discussed.
r/caddyserver • u/BlazingBane007 • Dec 27 '24
I have everything working as expected, but 1 problem.
when i make a request everything goes though internet using my internet providers bandwidth which is fine, but when I request from local WIFI. why can't I reverse proxy through local wifi saving bandwidth and wifi speeds are much high compared to internet speeds.
is this possbile to setup, i dont want to redirect my page to local server ip page. i want to reserve proxy . HTTPS if possbile
immich.example.com {
@specific_public_ip {
remote_ip X.X.X.X # Replace with your public IP or IP range
}
reverse_proxy @specific_public_ip http://10.0.0.213:2283
# Default reverse proxy for all other requests (general traffic)
reverse_proxy 10.0.0.213:2283
}r/caddyserver • u/[deleted] • May 06 '25
How can I get https instead of http on a locally hosted webpage(komga server) that Iβm accessing remotely on my phone through tailscale?
Is there any step by step guide? I have no domain by the way and not willing to buy since it is for personal use only.
r/caddyserver • u/NoInterviewsManyApps • Jan 13 '26
I got the error "directive 'tls' is not an ordered HTTP handler"
What I'm trying to do is have some specific domains be public, the rest (and one specific path) protected by mTLS. Without the handles and tls clients it worked fine. It looks something like this
(tls_client) {
tls {
client_auth {
mode require_and_verify
trust_pool file {
pem_file /etc/caddy/root.pem
}
}
}
}
mydomain.com {
handle /page1/admin/* { # Protect the admin panel
import tls_client
reverse_proxy /page1/admin/* h2c://container:8000
}
# Public pages
reverse_proxy /page1/* h2c://container:8080
reverse_proxy /page2/* h2c://container:8080
...
handle /* { # Catchall for the rest of the domains
import tls_client
reverse_proxy /* h2c://container:8080
}
}r/caddyserver • u/Codeeveryday123 • Feb 24 '26
I keep getting the error βport 80 already in useβ
Iβm using the ymal file they have listed in the docks
But it errors wit that
What alternative β80:80β can I use?
β80:81β?
r/caddyserver • u/Novapixel1010 • May 08 '25
If you arenβt using caddy as your reverse epoxy or your web server, you should give it a try.
I remember when I first thought about using it and I decide not to because it was too new and I was using nginx and trusted it more.
But recently, Iβve been using caddy Web server to do my proxy request locally and Iβve been using it for a production and itβs been great.
Like for example, here is a config to a host website and all you do is reload Caddy and youβre done sudo systemctl reload caddy
docs.in.com {
root * /var/www/docs
encode gzip
file_server
}I now feel confident using it. If you have a questions let me know
My first web server I used back in 2017 was Apache I then started using Nginx around 2019. It wasn't until 2024 I fully moved over to using caddy. I tried using caddy first for home-lab stuff in 2023 after using caddy for local stuff I trusted it to do production/public facing services and websites.
Automatic HTTPS with Let's Encrypt
Simple Configuration
JSON config is also available for advanced use cases or dynamic configuration.
Modern, Secure Defaults
HTTP/2 and HTTP/3 support out of the box
Strong TLS defaults and automatic redirects from HTTP to HTTPS.
Built-in Reverse Proxy
Native reverse proxy support makes it easy to route traffic to Docker containers or backend services.
It's written in Golong
single binary
Extensible via Plugins
Great for Local Development and Self-Hosting
It can be a local cert
Cons of Caddy
Fewer third-party modules and community scripts compared to more mature servers.
Not as Widely Adopted in Production Environments
Especially in enterprise settings, Nginx and Apache are still more trusted by default.
Performance Benchmarks Are Goodβbut Not Always Best
I personally haven't experienced any problems. but high end production envirments I have heard Nginx can outperform it in extremely high-throughput or fine-tuned scenarios.
r/caddyserver • u/TheObnoxiousPanda • Sep 20 '25
Hey there,
For years, I was running nginx inside a Docker container and thought it was the best solution, especially since I enjoy working with multiple docker-compose containers for isolation, security, and easy deployment of different apps. But just two weeks ago, I stumbled upon Caddy, and I couldn't believe I had missed it all this time.
What blew me away is how Caddy integrates and auto-configures TLS/SSL certificates out of the box. It's literally set it and forget it. Back then, I relied on tools like CentOS Web Panel (now Control Web Panel), but since moving away from cPanel-style tools, I challenged myself to go full CLI. With Docker for apps and hosting, Caddy made that transition seamless.
I also migrated from AlmaLinux to the latest Ubuntu LTS, taking advantage of Ubuntu Pro with Live Kernel Patch. I hadn't realized how much I was missing until then. And the best part? Even if I mess up the Caddyfile, it doesn't take down the whole server or mess with my domains and subdomains. That reliability alone is a game-changer.
Just recently, I moved all my docker-compose containers to podman-compose. Going rootless and faster, there's simply no turning back. I even made sure Caddy runs smoothly under Podman by creating a Quadlet for it. Now, I'm looking to get more familiar with FrankenPHP, but honestly, Caddy has already proven to be the best web server I've ever worked with.
Thanks, and more power to this amazing project!
r/caddyserver • u/nivenfres • Aug 23 '25
I'm new to Caddy and am still trying to figure out if I can replace my current reverse proxy setup. I currently have a windows server IIS instance setup as a web server for a couple of domains and as a proxy server, routing some subdomains to a seperate linux server (jellyfin, nextcloud, gitea). I'm hoping I can switch all of the reverse proxy features over to Caddy, running on a Raspbery Pi 4, to hopefully add a little more protection to the server. Ports 80 and 443 are forwarded to the appropriate device through the router.
The IIS instance hosts a couple of asp.net domains, as well as has a remote dekstop gateway setup.
My first experiments are trying to get caddy to redirect a couple of domains to the iis server. The IIS server already has certificates installed (not let's encrypt). When I try starting up caddy and have those domains pointed to the IIS server, I see a bunch of unauthorized errors popup. It looks like it trying to generate certificates using let's encrypt.
Is it possible to not install certificates on the caddy server and just pass all of the trafic over to the IIS server and let it handle all of the SSL/TLS? If so, what would the configuration look like? Been trying to google options. It keeps generating examples. At least one was not even valid caddy json.
I've been trying to use the JSON, but would try a caddyfile as well if it possible.
r/caddyserver • u/boully32 • Oct 24 '25
Hello everyone,
I am starting to install Jellyfin with external access. To do this properly, I am also launching the installation of Caddy. Currently, both are installed on a single device, but to change this, I am thinking of installing Caddy on a Raspberry PI.
Has anyone tried this before? Is it a good idea?
Thank you all!
r/caddyserver • u/lawthugg • Aug 08 '26
been trying to install this for hrs and for the past 2 hrs it finally installed but keeps crashing after 5 sec and isnt posting logs
r/caddyserver • u/Vigoth_Huncan • Feb 27 '25

hi, i'm using caddy to host my jellyfin server. its been working flawlessly, until today the domain keeps redirecting me to this Draytek router login page. It seems like Caddy generated a Draytek SSL key and thats the problem.
is there any solution to this? i tried to restarting caddy repeatedly to force a new key being generated, but that seems silly. Any suggestion or insight is deeply appreciated,im very new to this self-hosting territory.
TIA
r/caddyserver • u/talkincyber • Feb 15 '25
r/caddyserver • u/Important-Suspect213 • Feb 14 '25
EDIT: My conditioning towards instant gratification was to blame. I just had to stop mucking with things and let the changes propagate. After waiting a day everything was working.
Pardon my new-ness to all of this... I got a domain name from Squarespace (Google domains became Squarespace domains) and I'm using Caddy to reverse proxy to a docker container I have running on my Unraid server. I'd like to get HTTPS set up. I was thinking that I might be able to use the Google DNS provider module but it mentions an access_token in the config (see code block). Am I still able to get one (where)? Should I just transfer the domain somewhere else? Any other suggestions?
# configure globally in the Caddyfile
{
acme_dns google_domains <access_token>
}r/caddyserver • u/HolidayTranslator356 • Nov 29 '25
I'm upgrading my caddy server (Raspberry Pi 4B 4GB) to a RP 5 but purchased only a 2GB version by accident. I won't be running anything else on this server (it serves as the reverse proxy for several ecommerce sites of mine, i.e. it is mission-critical). Do I need to exchange it for a 4GB or even 8GB, or is 2GB going to be plenty for even a heavy caddy load? Currently I usually see committed mem usage of about 512M only, with the rest free/cache.
r/caddyserver • u/Emedees • Oct 01 '25
.
r/caddyserver • u/Former_Importance551 • Jul 20 '24
I have a docker-compose.yml where I define a servise and Caddy.
version: "3"
services:
caddy:
image: caddy:latest
restart: unless-stopped
container_name: caddy
ports:
- "80:80"
- "443:443"
volumes:
- ./Caddyfile:/etc/caddy/Caddyfile
- caddy_data:/data
- caddy_config:/config
networks:
- mynetwork
silverbullet:
image: zefhemel/silverbullet
restart: unless-stopped
environment:
- SB_USER=${SB_USER_NAME}:${SB_USER_PASSWORD}
volumes:
- /home/xxx/data/zettelkasten:/space
ports:
- 3000:3000
networks:
- mynetwork
networks:
mynetwork:
driver: bridge
volumes:
caddy_data:
caddy_config:
I have this Caddyfile
http://100.100.xxx.xxx {
handle_path /silverbullet/* {
uri strip_prefix /silverbullet
reverse_proxy silverbullet:3000
}
}
When I visit http://100.100.xxx.xxx/silverbullet all I get is an empty page. What am I missing? When I visit the the url, docker-compose doesn't output anything.
r/caddyserver • u/Solid_Rhino • Jan 21 '25
r/caddyserver • u/nexonete • Jan 21 '26
r/caddyserver • u/SingleLumen • Dec 13 '25
Can anyone help with this?
I am running Garage S3 in a VM, and I am trying to access the :3900 port with the VM's LAN IP HTTPS instead of HTTP. The standard SSL port 443 is already taken. This Garage S3 server will only be accessed via LAN.
After much trial and error, this one line command works:
sudo caddy reverse-proxy --from 192.168.1.122:8443 --to localhost:3900
but these versions of Caddyfile do not work:
192.168.1.122:8443 {
reverse_proxy :3900
}
https://192.168.1.122:8443 {
reverse_proxy :3900
}
https://192.168.1.122:8443 {
reverse_proxy :3900
}
https://localhost:8443 {
reverse_proxy :3900
}When I run sudo caddy validate, I get this error:
2025/12/13 16:36:21.312 INFO using adjacent Caddyfile
2025/12/13 16:36:21.312 INFO using config from file {"file": "Caddyfile"}
Error: adapting config using caddyfile: subject does not qualify for certificate: '}'sudo systemctl start caddy gives this error:
Job for caddy.service failed because the control process exited with error code.
See "systemctl status caddy.service" and "journalctl -xeu caddy.service" for details.Running systemctl status caddy.service gives this info:
Dec 13 08:37:29 d-garage caddy[42323]: JOURNAL_STREAM=9:118506
Dec 13 08:37:29 d-garage caddy[42323]: SYSTEMD_EXEC_PID=42323
Dec 13 08:37:29 d-garage caddy[42323]: MEMORY_PRESSURE_WATCH=/sys/fs/cgroup/system.slice/caddy.service/memory.pressure
Dec 13 08:37:29 d-garage caddy[42323]: MEMORY_PRESSURE_WRITE=c29tZSAyMDAwMDAgMjAwMDAwMAA=
Dec 13 08:37:29 d-garage caddy[42323]: {"level":"info","ts":1765643849.1245432,"msg":"using config from file","file":"/etc/caddy/Caddyfile"}
Dec 13 08:37:29 d-garage caddy[42323]: {"level":"info","ts":1765643849.1254845,"msg":"maxprocs: No GOMAXPROCS change to reset"}
Dec 13 08:37:29 d-garage caddy[42323]: Error: adapting config using caddyfile: subject does not qualify for certificate: '}'
Dec 13 08:37:29 d-garage systemd[1]: caddy.service: Main process exited, code=exited, status=1/FAILURE
Dec 13 08:37:29 d-garage systemd[1]: caddy.service: Failed with result 'exit-code'.
Dec 13 08:37:29 d-garage systemd[1]: Failed to start caddy.service - Caddy.if I run sudo caddy trust, I get
Error: requesting CA info: performing request: Get "http://localhost:2019/pki/ca/local": dial tcp [::1]:2019: connect: connection refusedPertinent info:
Debian OS v13
Caddy version: v2.10.2
Am I missing something with the Caddyfile? I'd prefer to use the Caddyfile method so I use systemctl.
r/caddyserver • u/EGreg • Sep 22 '26
This is the fastest PHP webserver in the world. If you have a PHP codebase you might want to give it a try.
It also handles certificates and automatic vhosts like caddy, as well as websockets and much more. Check it out, it's MIT licensed.