shadowofgost/derper

By shadowofgost

•Updated 3 days ago

tailscaleā€˜s selfhosted derp-server on alpine docker image both with domain and ip

Image
Networking
6

9.3K

shadowofgost/derper repository overview

⁠Derper

docker workflow docker pulls platfrom

⁠Domain Setup

required: set env DERP_DOMAIN to your domain

docker run -e DERP_DOMAIN=derper.your-domain.com -p 80:80 -p 443:443 -p 3478:3478/udp shadowofgost/derper:main
envrequireddescriptiondefault value
DERP_DOMAINtruederper server hostnameyour-hostname.com
DERP_CERT_DIRfalsedirectory to store LetsEncrypt certs(if addr's port is :443)/app/certs
DERP_CERT_MODEfalsemode for getting a cert. possible options: manual, letsencryptletsencrypt
DERP_ADDRfalselistening server address:443
DERP_STUNfalsealso run a STUN servertrue
DERP_STUN_PORTfalseThe UDP port on which to serve STUN.3478
DERP_HTTP_PORTfalseThe port on which to serve HTTP. Set to -1 to disable80
DERP_VERIFY_CLIENTSfalseverify clients to this DERP server through a local tailscaled instancefalse

⁠IP Only Setup

required: set /app/certs to your self_located cert

docker run -v /your/cert/dir:/app/certs -p 80:80 -p 443:443 -p 3478:3478/udp shadowofgost/derper:ip

cert_dir should contains *.crt and *.key file

you can use build_cert.sh⁠ file to generate your self_located cert Its output file dir is ./cert

envrequireddescriptiondefault value
DERP_DOMAINfalsederper server hostname127.0.0.1
DERP_CERT_DIRtruedirectory to store LetsEncrypt certs(if addr's port is :443)/app/certs
DERP_CERT_MODEfalsemode for getting a cert. possible options: manual, letsencryptmanual
DERP_ADDRfalselistening server address:443
DERP_STUNfalsealso run a STUN servertrue
DERP_STUN_PORTfalseThe UDP port on which to serve STUN.3478
DERP_HTTP_PORTfalseThe port on which to serve HTTP. Set to -1 to disable80
DERP_VERIFY_CLIENTSfalseverify clients to this DERP server through a local tailscaled instancefalse

⁠Usage

Fully DERP setup offical documentation: https://tailscale.com/kb/1118/custom-derp-servers/⁠

Tag summary

Content type

Image

Digest

sha256:6767099f9…

Size

16.1 MB

Last updated

3 days ago

docker pull shadowofgost/derper:main-2026-07-15