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
Codercord3mo ago
What are you creating this issue for?
Alex{ᵈˢ}
Alex{ᵈˢ}3mo ago
@Nanoi did
Nano
Nano3mo ago
So essentially you would use just caddy Caddy is it's own reverse proxy
Alex{ᵈˢ}
Alex{ᵈˢ}3mo ago
if the trarfik id better that ngings then i rather use that also
Nano
Nano3mo ago
Would you prefer to use caddy or traefik?
Alex{ᵈˢ}
Alex{ᵈˢ}3mo ago
wich one is better?
Nano
Nano3mo ago
I would recomend caddy
Alex{ᵈˢ}
Alex{ᵈˢ}3mo ago
then caddy
Nano
Nano3mo ago
Sweet Are you running coder inside of a docker container or on the os
Alex{ᵈˢ}
Alex{ᵈˢ}3mo ago
i run it inside a ubuntu host
Nano
Nano3mo ago
Sweet
Alex{ᵈˢ}
Alex{ᵈˢ}3mo ago
i have access to the terminal
Nano
Nano3mo ago
ok so installing caddy is really simple
Alex{ᵈˢ}
Alex{ᵈˢ}3mo ago
kk
Nano
Nano3mo ago
Install - Caddy Documentation
Caddy is a powerful, enterprise-ready, open source web server with automatic HTTPS written in Go
Alex{ᵈˢ}
Alex{ᵈˢ}3mo 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
Nano3mo ago
yes
Alex{ᵈˢ}
Alex{ᵈˢ}3mo ago
i did install it
Nano
Nano3mo ago
Ok, sweet So now all you have to do is edit your /etc/caddy/Caddyfile
Alex{ᵈˢ}
Alex{ᵈˢ}3mo ago
No description
Alex{ᵈˢ}
Alex{ᵈˢ}3mo ago
i have to create it> ?
Nano
Nano3mo ago
Its a file not a dir you can just type nano /etc/caddy/Caddyfile
Alex{ᵈˢ}
Alex{ᵈˢ}3mo ago
No description
Alex{ᵈˢ}
Alex{ᵈˢ}3mo ago
yeah
Nano
Nano3mo ago
So remove all of that info
Alex{ᵈˢ}
Alex{ᵈˢ}3mo ago
now i have to install docker
Nano
Nano3mo ago
Why?
Alex{ᵈˢ}
Alex{ᵈˢ}3mo ago
i did .
Nano
Nano3mo ago
No Scroll down
Alex{ᵈˢ}
Alex{ᵈˢ}3mo ago
oh now i see
Nano
Nano3mo ago
I need to just redo that whole doc atp XD
Alex{ᵈˢ}
Alex{ᵈˢ}3mo ago
LOL i see
Nano
Nano3mo 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{ᵈˢ}3mo ago
i see i use cloudflare too
Nano
Nano3mo ago
So in order to get that to work though, i also had to build a version of caddy with that module
Nano
Nano3mo ago
Build from source - Caddy Documentation
Caddy is a powerful, enterprise-ready, open source web server with automatic HTTPS written in Go
Nano
Nano3mo ago
Caddy is a powerful, enterprise-ready, open source web server with automatic HTTPS written in Go
Alex{ᵈˢ}
Alex{ᵈˢ}3mo ago
i did that
Nano
Nano3mo ago
And make sure you also setup the cloudflare module
Alex{ᵈˢ}
Alex{ᵈˢ}3mo ago
No description
Nano
Nano3mo ago
Yes, you have to build that package first
Alex{ᵈˢ}
Alex{ᵈˢ}3mo ago
i see
Alex{ᵈˢ}
Alex{ᵈˢ}3mo ago
there is no option for ubuntu
No description
Nano
Nano3mo ago
Ubuntu would fall under Linux Just make sure you select the right chipset (chances are its going to be amd64)
Alex{ᵈˢ}
Alex{ᵈˢ}3mo ago
my brain is not braning anymore do you have time for voice ill share my screen ?
Nano
Nano3mo 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{ᵈˢ}3mo ago
ok bro ty
Want results from more Discord servers?
Add your server