Hey everyone,
I’m having trouble integrating Nginx Proxy Manager (NPM) with my existing Cloudflare tunnel setup. Here’s my situation:
- I’ve got several self-hosted services using Cloudflare tunnels (subdomain.domain.com)
- Recently got a VPS to host some services due to Cloudflare’s 100MB file limit
- Trying to set up NPM and services on the VPS using Docker with an external network
- Created A records for NPM (proxy.domain.com) and a service (app.subdomain.com)
- Got an SSL cert using Let’s Encrypt’s DNS challenge
But it’s not working as expected. I’m thinking of removing the Cloudflare tunnel DNS entries and starting fresh. Has anyone successfully combined NPM with Cloudflare tunnels? Any tips or tricks would be much appreciated!
Update: Found a solution in the comments. Thanks for your help, everyone!
hey sophialee92, i’ve used NPM with cloudflare before. one thing to check - make sure ur cloudflare DNS is set to proxy (orange cloud) for the A records. also, double-check ur firewall rules on the VPS. sometimes that can cause issues. good luck with ur setup!
I’ve been in a similar situation, and it can be tricky to get everything working smoothly. One thing that really helped me was setting up a reverse proxy on my VPS using Traefik instead of NPM. It integrates well with Docker and can handle the SSL certificates automatically.
For the Cloudflare part, I kept the tunnels for my home-hosted services and used Cloudflare’s API to automatically update the DNS records for my VPS-hosted services. This way, I could still benefit from Cloudflare’s DDoS protection and caching for all my services.
The key is to clearly separate your home and VPS setups in your mind and in your configurations. It takes some trial and error, but once you get it right, it’s a really powerful setup. Don’t be afraid to start fresh if needed - sometimes that’s the quickest way to a working solution.
I’ve encountered similar challenges when integrating NPM with Cloudflare tunnels. One approach that worked for me was to use Cloudflare tunnels for internal services and NPM for external-facing applications. This setup allows you to leverage the benefits of both systems.
For your VPS-hosted services, consider creating a separate Cloudflare zone and managing those through NPM exclusively. This separation can help avoid conflicts between the two systems.
Also, ensure your NPM Docker container has the correct network configuration to communicate with your other services. You might need to adjust your Docker network settings or use Docker Compose to define the relationships between containers.
Remember to regularly update both NPM and Cloudflare tunnel configurations to maintain optimal security and performance.