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

Did you find this page helpful?