3. Create a Cloudflare Tunnel
Cloudflare Tunnel allows you to securely publish your MyFin server to the Internet without exposing your public IP address or opening ports on your router.
Instead of incoming connections, your server establishes an encrypted outbound connection to Cloudflare. Remote users connect to Cloudflare, which securely forwards the traffic through the tunnel to your server.
3.1 Open the Cloudflare Dashboard
Log in to your Cloudflare account.
Select your domain.
Navigate to:
Zero TrustIf prompted, create a Zero Trust account (the free plan is sufficient for most installations).
3.2 Create a Tunnel
Navigate to:
Networks → TunnelsClick:
Create a TunnelChoose:
CloudflaredGive your tunnel a name.
Example:
MyFinClick Save Tunnel.
3.3 Copy the Tunnel Token
Cloudflare will display several installation methods.
Choose:
DockerYou will be shown a command similar to:
docker run cloudflare/cloudflared:latest tunnel run --token eyJh...It will have a copy icon next to it. Click on it to copy it.
In the next step:
Running MyFin
We will create the .env file were we will add the token part of it
For now paste it somewhere safe so we can use it in the next step
3.5 Add application / Set the destination
if you are using a subdomain, for example myfin.yourserver.com then you will add myfin in the host input.
Since we are only using the main domain in this guide, we will leave this blank.
In th domain input, you will select the domain, in this case yourserver.com
Under the services section, for the type, you can choose either http.
Nginx Proxy Manager will redirect it to SSL if you are using one.
In the url input, we will use the Nginx Proxy Manager container host name npm
You can then click on the Complete Setup button to finish the tunnel creation.
Note
Since this creates a new DNS entry, It will take a couple of minutes to propagate so you will not be able to access the tunnel right away. For example mine took around 20 minutes before I could access it.