Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add cloudflared #522

Open
HitLuca opened this issue Mar 29, 2022 · 0 comments · May be fixed by #545
Open

Add cloudflared #522

HitLuca opened this issue Mar 29, 2022 · 0 comments · May be fixed by #545

Comments

@HitLuca
Copy link
Contributor

HitLuca commented Mar 29, 2022

Useful for creating direct tunnels to couldflare endpoints, allows the user to set up public services while behind CG NAT and similar. Contrarily to cloudflare dynamic dns, this container would allow putting ansible-nas services on the internet on demand (turn on or off the cloudflared app), since the only point of access would be provided by this container.

This involves some setup first, since you need to:

  • get a cloudflare domain purchased
  • create a cloudflare tunnel to use from your machine
  • add DNS rules to connect your machine to the cloudflare domain using the cloudflare tunnel
  • save the configuration data to a known folder, to be mapped inside the container for use

More info for the setup part on this link. The cloudflared container can be used to do the login/auth/tunnel creation steps as well.

My setup currently uses this container, and the docker-compose I created in Portainer looks like this

version: "2"
services:
  cloudflared:
    image: cloudflare/cloudflared:2022.1.2
    container_name: cloudflared
    environment:
      - TZ=${TZ}
    volumes:
      - /path_to_my_cloudflared_directory:home/nonroot/.cloudflared/
    restart: unless-stopped
    command: tunnel run ${TUNNEL_NAME}
    network_mode: host

Let me know if you need other info regarding my setup!

@HitLuca HitLuca linked a pull request Jul 22, 2022 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant