Skip to content

ntuangiang/serveo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

GitHub stars GitHub license Docker Stars Docker Pulls Docker Automated build Docker Build Status

Expose local servers to the internet

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.

Usage

  1. Write a docker-compose.yml file.

Basic

version: '3.7'

services:
  serveo:
    image: ntuangiang/serveo
    environment:
      - SERVEO_PUBLISH_PROJECT=serveonginx

  serveonginx:
    image: nginx

Request a particular 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_PUBLISH_PROJECT=serveonginx
      - SERVEO_PUBLISH_PROJECT_PORT=80 If it's 80, you don't need this line

  serveonginx:
    image: nginx

Change 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: nginx

You 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
  1. use docker-compose up to start container.

  2. you need to use docker-compose logs serveo to see your new URL.

Demo

$ 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.

LICENSE

MIT License

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published