Thank you for explaining everything so simply and with great energy! This video is extremely under viewed and under liked. I will set up caddy in Docker and keep it simple, I got to deep into technical setups with rancher, kubernettes and traefik but this looks much easier and more in line with my needs.
🤣🤣 The bloopers... am dead!! and btw... i use traefik as a reverse proxy just because it was the first i learnt how to use when i was playing with my little homelab. though such a steap learning curve. i love it because of its technicalities, i am SHOCKED by how simple caddy is!!, just wOw!. Thanks for the video.
and btw... there is this product called authelia i use. its an authentiaction server that works with reverse proxies, its fully supported in traefik, nginx and HA-proxy but not caddy. That's also a reason am not using it but honestly... it's soooooooo simple am blown away by how fast that caddy setup was!.
Interesting, i haven't heard of authelia before. Bummer it doesnt' work with Caddy. Because yeah, while I dont' know that it's any better than the other options, it sure is simple. Sorta like me. :D
The DNS has to be set up apart from Caddy. Make sure the domain name resolves to the IP of your server. (Or to your external IP address and your router port forwards into your caddy server)
I'm so sorry I missed this, and I'm 1000% sure you're not still wondering. I'll answer in case someone else sees your question and wonders. They can both do the exact same thing. Traefik can be simpler, and a little more confusing at first to set up (IMHO) -- Nginx requires a little more ongoing maintenance, but is slightly easier to understand out of the box, and can do more complicated things if you need it to. (Again, IMHO) Both can do the job, both are powerful. If one is working well for you, there's probably no need to switch, unless you just want to learn how the other works.
Sorry for the late reply, I've been really sick -- you might need to "sudo" in order to edit the file with root privilege. I think the file is owned by root, so without sudo, you won't be able to write to it...
Thank you very much , I got my dns working with https now :) I don't klnow if anyone used immich before , I'm not able to redirect to the web page , can you try to help me please ? Thank you in advance
Had been trying to set up Caddy in docker for a while with Duckdns and the challenges always failed. I used your video as guide and was finally able to get it working outside of docker. Only issue I had was it was trying to connect to my router instead of the docker container, I added :443 to the domain name in the caddy file and was finally able to reach the container. Much thanks sir.
Yes! That’s what I was using before, but Caddy has an even smaller footprint, and configuration is simpler. It has a ton of modules for more complex needs, but out of the box I’m using it on 10-15 sites and apps.
Hi Victor. :) I might do that -- but honestly, it's just a matter of putting the info inside curly braces. So you have a domain, info about that domain inside curly braces, then another domain, and another set of curly braces for that domain, etc, etc.
4 роки тому
@@shawnp0wers It's true! I noticed that shortly after commenting! Caddy is amazing and super easy!
So, the process is largely the same, but there's a problem if they're running on the same machine. By default, Caddy listens on both port 80 and port 443. If you have Apache on the same server, it will try to listen on port 80 (by default at least). If you have Apache on a different machine, or different VM (or listening on a different port), you could set it up to proxy to the non-SSL apache port. If you have apache use a different port on the same machine, you'd just set Caddy to proxy to localhost:THAT_NEW_PORT -- or if it's on another machine/VM/or_IP, you'd have Caddy point to other_internal_IP:80 Does that help?
@@ddrci88 No problem! I really like Caddy for its simplicity and automatic certificate handling. I've struggled to get Wordpress to work behind a reverse proxy of any sort though. It really wants to run in SSL mode, but having another machine do the SSL part seems to cause a lot of trouble. I'll probably play with it more at some point, but right now, I have my Wordpress installs running on another server. :/
@@shawnp0wers You can also change the default ports for caddy. You put it in the global variable section of your Caddyfile ie. http_port 8080 https_port 4430 if you want to use some other ports
@@shawnp0wers one question since I think this works the same as the one in openmediavault. since something is already using port 80/443, you can't really point your main domain to something internally and you need to use subdomains. Is my understanding correct?
I point everything to caddy, and then forward into different servers/services based on DNS names. I’m not familiar with openmediavault, but caddy will forward to internal SSL ports as well. You can even force it to accept internal self-signed SSL. (I try to run everything unencrypted internally though, and have caddy handle all the certs) Honestly though, Wordpress has given me fits. I’m hosting directly via caddy/PHP for it instead of forwarding to another server.
@@shawnp0wers Thanks.. I might test this out tomorrow. You sir earned a sub As for wordpress, it doesn't like ports for some reason. Happened to me a few times before when I was stilling using it. I moved on to static webpages uses less resources, no database, easier to back up just copy and paste
I like your energy. Cool video :-) Please, I have a question: How do you reverse-proxy two subdomains to a local domain with two different ports? user.example.com -----> localhost:4000 admin.example.com -----> localhost:4001 I'm not interested in load balancing, in this case, just reverse proxy. Just subscribed by the way!
Thanks! Here's a copy/pasta of the comment I made on a similar question one of my other recent videos: The Brain of Shawn • 5 days ago Yes! Mine looks something like this: site1.domain.com { reverse_proxy internet.ip.address:port } site2.domain.com, alias.domain.com { root * /var/www/mysql file_server encode gzip php_fastcgi unix//run/php/php7.2-fpm.sock }
That example is one reverse proxy and one standard website, but each "stanza" can be a reverse proxy. As long as the domain resolves to the IP of the caddy server, it should match up the correct info in your Caddyfile.
I’m not sure what you mean, but my infrastructure was offline when I woke up this morning and I just got things going. (Power surge overnight from the power company)
@@saurabhjain8904 hmm... I'd check permissions, or see if you can find any details in the logs to see what's going wrong. (probably in /var/log/caddy*)
I have absolutely no idea how I got here or what is going on
Dear lord! This is a life savior web server. Came to this video after spending like 4 hours trying to set up SSL with Nginx.
I made this video shortly after I first learned about Caddy -- that was 2 years ago, and I've never gone back. It's just so SO simple.
Short, easy to follow and straight to the point. Good job
Thank you for explaining everything so simply and with great energy! This video is extremely under viewed and under liked.
I will set up caddy in Docker and keep it simple, I got to deep into technical setups with rancher, kubernettes and traefik but this looks much easier and more in line with my needs.
Thanks Maurice! I appreciate that. And yeah, it makes managing docker apps just like other apps on the system. I find it super easy.
🤣🤣 The bloopers... am dead!! and btw... i use traefik as a reverse proxy just because it was the first i learnt how to use when i was playing with my little homelab. though such a steap learning curve. i love it because of its technicalities, i am SHOCKED by how simple caddy is!!, just wOw!. Thanks for the video.
and btw... there is this product called authelia i use. its an authentiaction server that works with reverse proxies, its fully supported in traefik, nginx and HA-proxy but not caddy. That's also a reason am not using it but honestly... it's soooooooo simple am blown away by how fast that caddy setup was!.
Interesting, i haven't heard of authelia before. Bummer it doesnt' work with Caddy. Because yeah, while I dont' know that it's any better than the other options, it sure is simple. Sorta like me. :D
@@shawnp0wers 🤣🤣 i agree you are a simple man.
@@abdirahmann Caddy has its own "basicauth" or there are auth plugins you can use.
Wow, I have been missing out. Now 'm subscribed!
NOICE! Welcome welcome welcome. :)
Does this not work for remote access?
Hello,
Caddy does everything under the hood ,
Can you give some general idea how can I do the same with nginx.
easy to fallow! thank you so much for the content you provide !!! :)
This doesn't work for me. I can install caddy but then i go to bw."TLD".com and it doesnt resolve. Are we suppose to do anything there?
The DNS has to be set up apart from Caddy. Make sure the domain name resolves to the IP of your server. (Or to your external IP address and your router port forwards into your caddy server)
What is the difference with traefik and nginx proxy manager ?
I'm so sorry I missed this, and I'm 1000% sure you're not still wondering. I'll answer in case someone else sees your question and wonders.
They can both do the exact same thing. Traefik can be simpler, and a little more confusing at first to set up (IMHO) -- Nginx requires a little more ongoing maintenance, but is slightly easier to understand out of the box, and can do more complicated things if you need it to. (Again, IMHO)
Both can do the job, both are powerful. If one is working well for you, there's probably no need to switch, unless you just want to learn how the other works.
Thank you so much ,What a man.you made me a caddy lover
So glad! I still use it so often. :)
Thank you Shawn. Works like a charm
I can't edit /etc/caddy/Caddyfile, it says this file is unwritable. Any help?
Sorry for the late reply, I've been really sick -- you might need to "sudo" in order to edit the file with root privilege. I think the file is owned by root, so without sudo, you won't be able to write to it...
You have any more videos on Caddy 2?
Subbed and liked :)
Not yet, but I keep using it more and more.
OMG this looks so helpful!!!! THX!
This was amazing. Thanks Shawn!
Glad you enjoyed it!
You are the best teacher for me thanks
Wow, thanks.
Hey Shawn, how can i install caddy on windows, i have node project and docker got issues with node on windows
I don’t actually know - I’d check out their website to see.
Absolutely excellent channel. SOLID and CLEAR explanations. Are you still using Caddy?
Aww, thanks! Yes - I still LOVE caddy.
Really helpful, thanks Shawn!
This was so easy! Thank you!
You're so welcome!
Thank you for explaining soo well
Glad it was helpful!
Thank you very much , I got my dns working with https now :)
I don't klnow if anyone used immich before , I'm not able to redirect to the web page , can you try to help me please ?
Thank you in advance
Had been trying to set up Caddy in docker for a while with Duckdns and the challenges always failed. I used your video as guide and was finally able to get it working outside of docker. Only issue I had was it was trying to connect to my router instead of the docker container, I added :443 to the domain name in the caddy file and was finally able to reach the container. Much thanks sir.
That’s awesome!
How come I never saw you before 😂, more of those vids please 🙏
I plan on releasing regular content in 2022, please stick around and help me decide what topics to cover! :)
If I already enabled remote access for Plex, will Caddy interfere with this? 🤔
Excellent video, by the way!
Ugh, sorry I missed this -- no, plex should use a different port.
@@shawnp0wers Hey! Much appreciated! Better late than never, I always say. There are other UA-camrs of your size that just don't respond at all.
@@NyneIX9 That's incredibly kind, thank you. :)
Hi Shawn,,, nice video. Can it be used for nginx as reverse proxy?
Yes! That’s what I was using before, but Caddy has an even smaller footprint, and configuration is simpler. It has a ton of modules for more complex needs, but out of the box I’m using it on 10-15 sites and apps.
Congrats by the video. It's realy great😊
Thank you very much. This is very helpful.
Glad it was helpful!
this is great. i got some esxi vm's that have some websites that run lots of compute i need to serve and i aint gonna be paying aws an arm and a leg.
Sweet! It's been a long time, and this still works so well it's creepy. Seriously like zero maintenance. :)
Hi sir wonderful video 👌 ..I like this and also expecting more tips like this on your channel👑
Thanks Vikram! I'm trying to decide what the best "day of the week" to release tech tips might be. But I'm going to keep posting them, for sure!
Amazing content. As a follow up, maybe you could guide us through an example of more than one reverse proxy!
Hi Victor. :)
I might do that -- but honestly, it's just a matter of putting the info inside curly braces. So you have a domain, info about that domain inside curly braces, then another domain, and another set of curly braces for that domain, etc, etc.
@@shawnp0wers It's true! I noticed that shortly after commenting! Caddy is amazing and super easy!
Hey Shawn, can you make caddy reverse proxy to apache tutorial?
So, the process is largely the same, but there's a problem if they're running on the same machine.
By default, Caddy listens on both port 80 and port 443. If you have Apache on the same server, it will try to listen on port 80 (by default at least). If you have Apache on a different machine, or different VM (or listening on a different port), you could set it up to proxy to the non-SSL apache port.
If you have apache use a different port on the same machine, you'd just set Caddy to proxy to localhost:THAT_NEW_PORT -- or if it's on another machine/VM/or_IP, you'd have Caddy point to other_internal_IP:80
Does that help?
@@shawnp0wers thanks a lot. I’m looking for a new stack now :) I wa saying Nginx reverse to Apache. Want to try out candy to Apache
@@ddrci88 No problem! I really like Caddy for its simplicity and automatic certificate handling.
I've struggled to get Wordpress to work behind a reverse proxy of any sort though. It really wants to run in SSL mode, but having another machine do the SSL part seems to cause a lot of trouble. I'll probably play with it more at some point, but right now, I have my Wordpress installs running on another server. :/
@@shawnp0wers You can also change the default ports for caddy. You put it in the global variable section of your Caddyfile ie. http_port 8080 https_port 4430 if you want to use some other ports
do you need to open ports to get the ssl certificate?
It uses ports 80 & 443. 80 is redirected to 443, but it’s also used to renew certs.
ok searching for nginx proxy server and openmediavault got me here.. I think I need to switch to caddy
That was my path to caddy too! :)
@@shawnp0wers one question since I think this works the same as the one in openmediavault. since something is already using port 80/443, you can't really point your main domain to something internally and you need to use subdomains. Is my understanding correct?
I point everything to caddy, and then forward into different servers/services based on DNS names. I’m not familiar with openmediavault, but caddy will forward to internal SSL ports as well. You can even force it to accept internal self-signed SSL. (I try to run everything unencrypted internally though, and have caddy handle all the certs)
Honestly though, Wordpress has given me fits. I’m hosting directly via caddy/PHP for it instead of forwarding to another server.
@@shawnp0wers Thanks.. I might test this out tomorrow. You sir earned a sub
As for wordpress, it doesn't like ports for some reason. Happened to me a few times before when I was stilling using it. I moved on to static webpages uses less resources, no database, easier to back up just copy and paste
I like your energy. Cool video :-)
Please, I have a question: How do you reverse-proxy two subdomains to a local domain with two different ports?
user.example.com -----> localhost:4000
admin.example.com -----> localhost:4001
I'm not interested in load balancing, in this case, just reverse proxy.
Just subscribed by the way!
Thanks! Here's a copy/pasta of the comment I made on a similar question one of my other recent videos:
The Brain of Shawn
• 5 days ago
Yes! Mine looks something like this:
site1.domain.com
{
reverse_proxy internet.ip.address:port
}
site2.domain.com, alias.domain.com
{
root * /var/www/mysql
file_server
encode gzip
php_fastcgi unix//run/php/php7.2-fpm.sock
}
That example is one reverse proxy and one standard website, but each "stanza" can be a reverse proxy. As long as the domain resolves to the IP of the caddy server, it should match up the correct info in your Caddyfile.
AWESOME
I still love Caddy. Use it for everything these days!
Its not working
I’m not sure what you mean, but my infrastructure was offline when I woke up this morning and I just got things going. (Power surge overnight from the power company)
@@shawnp0wers I mean I did all the steps but caddy status shows failed
@@saurabhjain8904 hmm... I'd check permissions, or see if you can find any details in the logs to see what's going wrong. (probably in /var/log/caddy*)
You have to port forward 80 and 443 in your router. Did you do that ?
Hi, cool&perfect
Hey, thanks!
nice
this guy doesn't follow best practices at all.
I wash my hands after using the bathroom... And signal when changing lanes. So I follow *some* best practices. ;)