Is that possible to create tunnel with subfolder?


I am using Raspberry Pi 4 with Dietpi OS. I got a few apps online with cloudflared tunnel. One of them is Nextcloud. While connecting to other applications via port on localhost (e.g. localhost:5112), I can connect to Nextcloud via localhost/nextcloud by default.

Is that possible to create a tunnel for localhost/nextcloud app to connect with nextcloud. domain. com subdomain?

Unfortunately I cant answer your question.

However I may have a work around.

I created a Page Rule with a 301 Permenant Redirect to go from to

Hopefully that helps someone.

It would be nice if we could add subfolders to Tunnels.

Redirect would be the only option. It sounds like you’re going to end up with a directory mismatch, otherwise. Nextcloud’s URLs will all be referencing /nextcloud/, but you want it to all work in /.

Though if you’re willing to have it show up as, that would be feasible. You’d still need the redirect for to 301 to

1 Like

You could configure your Nextcloud to run on the root and avoid all the redirection. I run my ownCloud at

You will need to know how to configure the relevant virtual host in your webserver and adjust your Nextcloud configuration to match, both of which are outside the scope of Cloudflare Community discussion topics.

1 Like