Knowledge Base


Knowledge Base / XFilesharing Pro / How to ...

Using Cloudflare with XFileSharing (v.3.0+)
09/11/2018 11:01 AM

Question

I'd like to use Cloudflare with my XFileSharing site. Is it possible and what should I do?

Answer

Cloudflare setup guide for main server

1) Login to each of your file servers with root SSH and point the direct IP of your main server in /etc/hosts file. The records has the following format:

<your_direct_ip> <your_domain> www.<your_domain>

2) Open XFileConfig.pm and set 'accept_cf_connecting_ip' to '1'

3) Unless you're also going to apply Cloudflare setup guide for file servers, set your main server to READONLY in order to avoid upload problems (as least one working external file server is required).

Cloudflare setup guide for file servers (Advanced download mod required)

1) Add each file server's direct IP to /etc/hosts on main server:

<direct_ip> <file_server_domain>

2) Enable chunked upload in admin_settings -> Mods in order to bypass max file size limitation implied by Cloudflare.