Skip to content

Instantly share code, notes, and snippets.

@ElectronicWar
Created February 16, 2026 12:42
Show Gist options
  • Select an option

  • Save ElectronicWar/a2109e44a0c9a3be060cccce0da96ad9 to your computer and use it in GitHub Desktop.

Select an option

Save ElectronicWar/a2109e44a0c9a3be060cccce0da96ad9 to your computer and use it in GitHub Desktop.
External Caddy Reverse Proxy Caddyfile for Seafile v13 + Notification Server + SeaDoc v2
yourURL.tld {
# Seafile
reverse_proxy http://127.0.0.1:yourSeafileDockerPort
# Notification Server
@websockets {
header Connection *Upgrade*
header Upgrade websocket
}
handle_path /notification/ping* {
rewrite * /ping{uri}
reverse_proxy http://127.0.0.1:8083
}
handle /notification {
reverse_proxy @websockets http://127.0.0.1:8083
}
# Seadoc v2 seadoc-server
handle_path /sdoc-server/* {
rewrite * {uri}
reverse_proxy http://127.0.0.1:yourSeadocDockerPort
}
# Seadoc v2 websocket server
handle_path /socket.io* {
rewrite * /socket.io{path}
reverse_proxy http://127.0.0.1:yourSeadocDockerPort
}
}

This Caddyfile can be used to reverse-proxy latest Seafile v13.x CE official docker setup including Notification Server and Seadoc v2 Make sure to set your ports according to your docker compose yml files.

I highly recommend that you bind your docker ports to 127.0.0.1 to not expose them publicly directly on the machine (using port:port only instead of 127.0.0.1:port:port circumvents ufw and other firewalls dueto the way Docker is working)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment