This guide walks you through hosting your WordPress site directly from your Android phone, using Cloudflare Zero Trust Tunnels and a custom domain name. You do not need root access. All steps are beginner-friendly and explained clearly.
-
π± Android phone (no root required)
-
π Internet access (Wi-Fi recommended)
-
π A domain name (from Namecheap, GoDaddy, Freenom, etc.)
-
βοΈ A free Cloudflare account
-
π¦ Apps:
- Termux (from F-Droid)
- KSWeb (from Google Play Store)
Buy a domain from any registrar you prefer:
After purchasing, do not close the tab, you'll need to update nameservers later.
-
Go to https://cloudflare.com
-
Create a free account and log in.
-
In the Cloudflare dashboard, click "Add a Site" and enter your domain.
-
Select the Free Plan.
-
Cloudflare will give you two nameservers (e.g.,
sue.ns.cloudflare.com,ivan.ns.cloudflare.com). -
Go back to your domain provider and:
- Locate your domain's nameserver/DNS settings
- Replace existing nameservers with the ones provided by Cloudflare
- Save the changes (DNS propagation may take a few minutes to hours)
-
In Cloudflare dashboard, click the hamburger icon (β°) and go to Zero Trust.
-
Click Start for Free and create a Zero Trust account.
- You may be asked to enter a credit card for verification (you won't be charged).
-
Go to Access > Tunnels > Create Tunnel
-
Enter any tunnel name (e.g.,
android-wordpress-tunnel) and click Save
Leave the install screen open β we'll use it later.
- Install Termux: Go to F-Droid and install Termux
- Install KSWeb: Download from Google Play Store
Open Termux and copy-paste:
yes | pkg update && pkg install wget curl proot tar -y
wget https://raw.githubusercontent.com/AndronixApp/AndronixOrigin/master/Installer/Ubuntu22/ubuntu22.sh -O ubuntu22.sh
chmod +x ubuntu22.sh
bash ubuntu22.shNow you'll be inside the Ubuntu terminal.
Run the following to prepare the system:
apt update && apt upgrade -y
apt install sudo curl nano wget -ysudo mkdir -p --mode=0755 /usr/share/keyrings
curl -fsSL https://pkg.cloudflare.com/cloudflare-main.gpg | sudo tee /usr/share/keyrings/cloudflare-main.gpg >/dev/null
echo 'deb [signed-by=/usr/share/keyrings/cloudflare-main.gpg] https://pkg.cloudflare.com/cloudflared any main' | sudo tee /etc/apt/sources.list.d/cloudflared.list
sudo apt-get update && sudo apt-get install cloudflared -y-
In your Cloudflare Zero Trust dashboard β Your tunnel β "Install and run connector"
-
Choose:
- OS:
Debian/Ubuntu - Architecture:
ARM 64-bit
- OS:
-
Copy the full command (it should start with
sudo cloudflared service install ...) -
Paste and run it in your Ubuntu Termux terminal
-
Tunnel should now be active!
You can check its status from the Cloudflare dashboard.
- Open KSWeb and start Apache server
- Go to https://wordpress.org/download/
- Download and extract the WordPress ZIP
- Move the extracted contents to the
htdocsfolder in KSWeb:
- In KSWeb tools, enable phpMyAdmin and MySQL
- Navigate to:
http://localhost:with your port
-
Login with:
- User:
root - Password: (leave blank)
- User:
-
Create a database named
wordpress
-
In Cloudflare β Zero Trust β Tunnels β Your Tunnel
-
Under Public Hostname, click Add:
- Domain:
yourdomain.com - Service:
HTTP - URL:
http://localhost:with your port
- Domain:
-
Save
Now your domain should point to your Android-hosted WordPress site!
- Open browser and go to:
https://yourdomain.com
-
Follow the WordPress installation wizard
-
Enter:
- DB Name:
your created name - User:
root - Password: (blank)
- DB Name:
-
Complete installation and start building your site π
Cloudflare provides free SSL. To make it work smoothly:
- Install the plugin: Really Simple SSL
- Add to
wp-config.php:
define('FORCE_SSL_ADMIN', true);
if (strpos($_SERVER['HTTP_X_FORWARDED_PROTO'], 'https') !== false)
$_SERVER['HTTPS']='on';This will force SSL and prevent mixed content errors.
Youβve successfully hosted a WordPress website on your Android device using your own domain and Cloudflare Tunnel. No expensive hosting, no root, and youβre in full control.
- To re-enter Ubuntu in Termux:
./start-ubuntu22.sh - You can restart the Cloudflare tunnel with:
sudo cloudflared tunnel run <TUNNEL_NAME> - Use lightweight WordPress themes for better phone performance
- Bookmark your phpMyAdmin and WordPress admin links
- Ubuntu provisioning by Andronix
- Cloudflared APT source from Cloudflare Docs