For this caddy config, I am getting e URL like this ‘’ http://name.website.com "
But I want to create a WebSocket URL like this ‘’ wss://name.website.com ‘’. So, that I can use this URL to connect with my WebSocket server.
Please help me to properly set up a WebSocket on Caddy and create a WebSocket protocol URL.
WebSocket upgrades are automatic. Remove all the @websocket stuff in your config (it isn’t being used anyway) and just have your client connect with wss:// and it will be proxied to your backend as a websocket.
but if I make these changes, I am still getting some errors like in my client I try to connect the socket through - http://name.website.com
I am getting this error -
wss means “Websockets over HTTPS”. You only configured Caddy to listen for HTTP, not HTTPS (because of http://). So you need to use ws:// for now until you enable HTTPS.