Sign inSign up

barbarbar338/ncfs

By barbarbar338

•Updated about 1 year ago

🧩 Make your local game server accessible by everyone with your custom domain!

Image
1

769

barbarbar338/ncfs repository overview

⁠🚀 NGROK to Cloudflare Tunnel Script

  • This script will help you to create a tunnel to your local game server using ngrok and cloudflare.
  • The best solution for people behind NAT or firewall.
  • Creates a ngrok tcp tunnel and sets required dns record on cloudflare.
  • Opens your local game server to world without any hassle.
  • Port forwarding, firewall settings or any other configuration is not required, everything is handled by ngrok and cloudflare.

⁠🐋 Use with docker

  • To start using this script, you need to install docker and docker-compose.
  • Download docker-compose.yml⁠ file
services:
    ncfs:
        image: barbarbar338/ncfs:buildx-latest 
        container_name: ncfs
        restart: unless-stopped
        ports:
            - 4040:4040
        networks:
            - ncfs-net
        environment:
            NGROK_TCP_PORT: <game server port here>
            NGROK_AUTH_TOKEN: <Your NGROK auth token here>
            CLOUDFLARE_AUTH_EMAIL: <Your Cloudflare email here>
            CLOUDFLARE_API_KEY: <Your Cloudflare Global API key here>
            # You can also use API Token instead of API Key for better security
            CLOUDFLARE_API_TOKEN: <Your Cloudflare API token here>
            CLOUDFLARE_ZONE_ID: <Your domain's Cloudflare Zone ID here>
            CLOUDFLARE_CNAME_RECORD_NAME: server.example.com
            # If the game supports SRV records, use the standard format
            CLOUDFLARE_SRV_RECORD: _service._tcp.example.com
  • Edit docker-compose.yml file as you wish.
  • Run docker-compose up -d and wait
  • You (and everyone in the world!) can now connect to your game server using your domain name.

⁠SRV Records

SRV records allow clients to look up connection information (including port) using just a domain name. For games that support SRV records, use the standard format:

_service._protocol.domain.tld

For example:

  • Minecraft: _minecraft._tcp.example.com

⁠📦 Templates

⁠🧦 Contributing

Feel free to use GitHub's features.

  1. Fork the Project
  2. Create your Feature Branch (git checkout -b feature/my-feature)
  3. Commit your Changes (git commit -m 'my awesome feature my-feature')
  4. Push to the Branch (git push origin feature/my-feature)
  5. Open a Pull Request

⁠🔥 Show your support

Give a ⭐️ if this project helped you!

⁠📞 Contact

Tag summary

Content type

Image

Digest

sha256:d9c4b983f…

Size

21.8 MB

Last updated

about 1 year ago

docker pull barbarbar338/ncfs:ngrok-latest