Remote access options now I am using docker

Hi there.

I used this video to successfully set up remote access via Cloudflare and have been using it perfectly for quite some time, now.

However, I have just upgraded my system from OS to Container and suddenly realised that the Cloudflare method no longer works.

Is there a commonly recommended method to still have remote access, please, that can sill be used with a Container installation?

look at “SWAG” from LinuxServer.io on Docker Hub that will get you your reverse proxy and Let’s Encrypt

1 Like

Traefik is easy and works really well, plus it has support for LetsEncrypt.

You can also continue using Cloudflare. Just add the following to your compose file:

  cloudflared:
    container_name: cloudflared
    image: cloudflare/cloudflared
    restart: unless-stopped
    command: tunnel run
    env_file: cloudflared.env

cloudflared.env contains your token, like:

TUNNEL_TOKEN=blahblahblah

Then just configure tunnel as before.

1 Like

Thanks guys - much appreciated.

Networking, in particular, is still a bit of mystery to me - especially now I am using containers, which seems to add an extra layer of complication.

I think I shall get Cloudflare up and running and I can always migrate to something else (as mentioned), once I have learnt a bit more.

May I just double check something, please -

If I run the following container:

cloudflared:
    container_name: cloudflared
    image: cloudflare/cloudflared
    restart: unless-stopped
    command: tunnel run
    env_file: cloudflared.env

How does that get linked to Home Assistant?

I get how it does, when the HA Cloudflare add-on, is used but the above does not seem to have any specific link to HA.

That’s done at the Cloudflare end:

1 Like

Thanks Tinkerer - I think I am starting to understand how this all fits together.

As I previously followed that video, when I had a previous OS installation, I logged back into my Cloudflare account. I managed to find a page called API Tokens.

Two keys are there, viewable by password - one of these is Global API Key and the other is Origin CA Key. Which of these, if either, is the TUNNEL_TOKEN above?

Look at the Tunnel configuration page, under Overview, you’ll find the token under Install and run connector:

    1. Run the following command:
$ cloudflared.exe service install TOKEN_HERE