how to use traefik to connect it to a domain with caddy

how to use traefik to connect it to a domain with canddy
48 Replies
Codercord
Codercord5mo ago
What are you creating this issue for?
Alex{ᵈˢ}
Alex{ᵈˢ}OP5mo ago
@Nanoi did
Nano
Nano5mo ago
So essentially you would use just caddy Caddy is it's own reverse proxy
Alex{ᵈˢ}
Alex{ᵈˢ}OP5mo ago
if the trarfik id better that ngings then i rather use that also
Nano
Nano5mo ago
Would you prefer to use caddy or traefik?
Alex{ᵈˢ}
Alex{ᵈˢ}OP5mo ago
wich one is better?
Nano
Nano5mo ago
I would recomend caddy
Alex{ᵈˢ}
Alex{ᵈˢ}OP5mo ago
then caddy
Nano
Nano5mo ago
Sweet Are you running coder inside of a docker container or on the os
Alex{ᵈˢ}
Alex{ᵈˢ}OP5mo ago
i run it inside a ubuntu host
Nano
Nano5mo ago
Sweet
Alex{ᵈˢ}
Alex{ᵈˢ}OP5mo ago
i have access to the terminal
Nano
Nano5mo ago
ok so installing caddy is really simple
Alex{ᵈˢ}
Alex{ᵈˢ}OP5mo ago
kk
Nano
Nano5mo ago
Install - Caddy Documentation
Caddy is a powerful, enterprise-ready, open source web server with automatic HTTPS written in Go
Alex{ᵈˢ}
Alex{ᵈˢ}OP5mo ago
sudo apt install -y debian-keyring debian-archive-keyring apt-transport-https curl
curl -1sLf 'https://dl.cloudsmith.io/public/caddy/stable/gpg.key' | sudo gpg --dearmor -o /usr/share/keyrings/caddy-stable-archive-keyring.gpg
curl -1sLf 'https://dl.cloudsmith.io/public/caddy/stable/debian.deb.txt' | sudo tee /etc/apt/sources.list.d/caddy-stable.list
sudo apt update
sudo apt install caddy
sudo apt install -y debian-keyring debian-archive-keyring apt-transport-https curl
curl -1sLf 'https://dl.cloudsmith.io/public/caddy/stable/gpg.key' | sudo gpg --dearmor -o /usr/share/keyrings/caddy-stable-archive-keyring.gpg
curl -1sLf 'https://dl.cloudsmith.io/public/caddy/stable/debian.deb.txt' | sudo tee /etc/apt/sources.list.d/caddy-stable.list
sudo apt update
sudo apt install caddy
Nano
Nano5mo ago
yes
Alex{ᵈˢ}
Alex{ᵈˢ}OP5mo ago
i did install it
Nano
Nano5mo ago
Ok, sweet So now all you have to do is edit your /etc/caddy/Caddyfile
Alex{ᵈˢ}
Alex{ᵈˢ}OP5mo ago
No description
Alex{ᵈˢ}
Alex{ᵈˢ}OP5mo ago
i have to create it> ?
Nano
Nano5mo ago
Its a file not a dir you can just type nano /etc/caddy/Caddyfile
Alex{ᵈˢ}
Alex{ᵈˢ}OP5mo ago
No description
Alex{ᵈˢ}
Alex{ᵈˢ}OP5mo ago
yeah
Nano
Nano5mo ago
So remove all of that info
Alex{ᵈˢ}
Alex{ᵈˢ}OP5mo ago
now i have to install docker
Nano
Nano5mo ago
Why?
Alex{ᵈˢ}
Alex{ᵈˢ}OP5mo ago
i did .
Nano
Nano5mo ago
No Scroll down
Alex{ᵈˢ}
Alex{ᵈˢ}OP5mo ago
oh now i see
Nano
Nano5mo ago
I need to just redo that whole doc atp XD
Alex{ᵈˢ}
Alex{ᵈˢ}OP5mo ago
LOL i see
Nano
Nano5mo ago
coder.example.com, *.coder.example.com {
reverse_proxy 192.168.0.250:8030
tls {
dns cloudflare your_api_key
}
}
coder.example.com, *.coder.example.com {
reverse_proxy 192.168.0.250:8030
tls {
dns cloudflare your_api_key
}
}
This is how i have mine set up I have my domain on cloudflare so i also use cloudflare to manage my tls
Alex{ᵈˢ}
Alex{ᵈˢ}OP5mo ago
i see i use cloudflare too
Nano
Nano5mo ago
So in order to get that to work though, i also had to build a version of caddy with that module
Nano
Nano5mo ago
Build from source - Caddy Documentation
Caddy is a powerful, enterprise-ready, open source web server with automatic HTTPS written in Go
Nano
Nano5mo ago
Caddy is a powerful, enterprise-ready, open source web server with automatic HTTPS written in Go
Alex{ᵈˢ}
Alex{ᵈˢ}OP5mo ago
i did that
Nano
Nano5mo ago
And make sure you also setup the cloudflare module
Alex{ᵈˢ}
Alex{ᵈˢ}OP5mo ago
No description
Nano
Nano5mo ago
Yes, you have to build that package first
Alex{ᵈˢ}
Alex{ᵈˢ}OP5mo ago
i see
Alex{ᵈˢ}
Alex{ᵈˢ}OP5mo ago
there is no option for ubuntu
No description
Nano
Nano5mo ago
Ubuntu would fall under Linux Just make sure you select the right chipset (chances are its going to be amd64)
Alex{ᵈˢ}
Alex{ᵈˢ}OP5mo ago
my brain is not braning anymore do you have time for voice ill share my screen ?
Nano
Nano5mo ago
I don't sadly Ill make a guid later today when I have a bit more free time sorry about the inconvience
Alex{ᵈˢ}
Alex{ᵈˢ}OP5mo ago
ok bro ty
Want results from more Discord servers?
Add your server