docker build -t keepwn/ngrok-self-hosting .
cd ~
mkdir ngrok-bin
docker run --rm -e DOMAIN="tunnel.mydomain.com" -v $(pwd)/ngrok-bin:/release keepwn/ngrok-self-hosting
Ngrok server and client binaries will be available in $(pwd)/ngrok-bin
on the host.
variables | default | meaning |
---|---|---|
DOMAIN | required | domain name that ngrok running on |
TUNNEL_PORT | 4443 |
port that ngrok server's control channel listens |
HTTP_PORT | 80 |
port that ngrok server's http tunnel listents |
HTTPS_PORT | 443 |
port that ngrok server's https tunnel listents |
You need copy ngrok-bin
to server, and docker
must be installed in server.
cd ngrok-bin
./run_server.sh