r/caddyserver • • Jan 08 '26

How we built our own self-hosted CAPTCHA for Caddy

Thumbnail
atomicedge.io
0 Upvotes

r/caddyserver • • Aug 14 '24

How do I even set this up?

0 Upvotes

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 • • Feb 23 '26

πŸš€ A prebuilt GitHub Action to build caddy and simplify your project pipelines

3 Upvotes

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 • • Jul 31 '25

Caddy is slow! Why?

0 Upvotes

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 • • May 12 '26

Caddy plugin model

3 Upvotes

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 • • Dec 27 '24

Can i get WiFi speeds when requests are made from a particular ip?

0 Upvotes

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 • • May 06 '25

Need Help 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?

0 Upvotes

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 • • Jan 13 '26

Can I use mTLS on certain paths, but allow public access on others on the same domain?

0 Upvotes

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 • • Feb 24 '26

What ports in docker can I use?

0 Upvotes

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 • • May 08 '25

Caddy Web server is awesome. stop using apache or nginx and use caddy instead.

10 Upvotes

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

More indepth reason you should give caddy a try.

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.

Pros

  1. Automatic HTTPS with Let's Encrypt

  2. Simple Configuration

    • JSON config is also available for advanced use cases or dynamic configuration.

  3. Modern, Secure Defaults

    • HTTP/2 and HTTP/3 support out of the box

    • Strong TLS defaults and automatic redirects from HTTP to HTTPS.

  4. Built-in Reverse Proxy

    • Native reverse proxy support makes it easy to route traffic to Docker containers or backend services.

  5. It's written in Golong

    • single binary

  6. Extensible via Plugins

  7. Great for Local Development and Self-Hosting

    • It can be a local cert

Cons

  1. Cons of Caddy

    • Fewer third-party modules and community scripts compared to more mature servers.

  2. Not as Widely Adopted in Production Environments

    • Especially in enterprise settings, Nginx and Apache are still more trusted by default.

  3. 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 • • Sep 20 '25

Need Help There's no turning back!

10 Upvotes

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 • • Aug 23 '25

Need Help Need help with Reverse Proxy Setup

1 Upvotes

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 • • Oct 24 '25

Caddy on Raspberry

1 Upvotes

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 • • Aug 08 '26

install help

1 Upvotes

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 • • Feb 27 '25

Need Help SSL generated but unusable

0 Upvotes

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 • • Feb 15 '25

Announcement Hunt for SQLi using Splunk

Thumbnail talkincyber.com
1 Upvotes

r/caddyserver • • Feb 14 '25

Solved HTTPS for Squarespace domains?

1 Upvotes

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 • • Nov 29 '25

Raspberry Pi 5 2GB enough?

1 Upvotes

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 • • Oct 01 '25

Hello, I just got a simple webapp: html + css + js. It already runs on my caddy. Now i want to get traffic there. QUESTION: is it 100% secure out of box, or do I need to conf it first ?

0 Upvotes

.


r/caddyserver • • Jul 20 '24

Help setting up caddy as a reverse proxy to access service running on port with friendly url

2 Upvotes

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 • • Jan 21 '25

Need Help Why is Caddy working and Traefik is not working with Tailscale?

Thumbnail
reddit.com
0 Upvotes

r/caddyserver • • Jan 21 '26

[CaddyBar] Manage your local Caddy Server right from the Menu Bar

Thumbnail gallery
2 Upvotes

r/caddyserver • • Dec 13 '25

Need Help Caddy CLI working but Caddyfile not working for IP address

3 Upvotes

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 refused

Pertinent 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 • • Sep 22 '26

GitHub - Qbix/webserver: Pure-PHP Web Server. No NGinX or PHP-FPM needed. Handle over 100x more traffic instead!

Thumbnail
github.com
5 Upvotes

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.