https://serveo.net Serveo is an SSH server just for remote port forwarding. When a user connects to Serveo, they get a public URL that anybody can use to connect to their localhost server.
ntuangiang/serveo can let you secure URL to your localhost server through any NAT or firewall in Docker.
- Write a
docker-compose.ymlfile.
version: '3.7'
services:
serveo:
image: ntuangiang/serveo
environment:
- SERVEO_PUBLISH_PROJECT=serveonginx
serveonginx:
image: nginxversion: '3.7'
services:
serveo:
image: ntuangiang/serveo
environment:
- SERVEO_SUB_DOMAIN=ntuangiang
- SERVEO_SUB_DOMAIN_PORT=80 // If it's 80, you don't need this line
- SERVEO_PUBLISH_PROJECT=serveonginx
- SERVEO_PUBLISH_PROJECT_PORT=80 If it's 80, you don't need this line
serveonginx:
image: nginxChange the SSH username to get assigned a different subdomain:
version: '3.7'
services:
serveo:
image: ntuangiang/serveo
environment:
- SERVEO_SUB_DOMAIN=ntuangiang
- SERVEO_SUB_DOMAIN_PORT=80 // If it's 80, you don't need this line
- SERVEO_SSH_USER=ntuangiang
- SERVEO_PUBLISH_PROJECT=serveonginx
- SERVEO_PUBLISH_PROJECT_PORT=80 If it's 80, you don't need this line
serveonginx:
image: nginxYou can also add your custom command:
version: '3.7'
services:
serveo:
image: ntuangiang/serveo
environment:
- SERVEO_CUSTOM_COMMAND=ssh -R 80:serveonginx:80 serveo.net
serveonginx:
image: nginx-
use
docker-compose upto start container. -
you need to use
docker-compose logs serveoto see your new URL.
$ git clone https://github.com/ntuangiang/serveo.git
$ cd example
$ sudo docker-compose up
$ sudo docker-compose logs serveo
Attaching to serveo_serveo_1
serveo_1 | Warning: Permanently added 'serveo.net,195.201.91.242' (RSA) to the list of known hosts.
serveo_1 | Forwarding HTTP traffic from https://excolo.serveo.net/
serveo_1 | Press g to start a GUI session and ctrl-c to quit.MIT License