How to Publish an HTML, CSS & JS Website from Your Phone

You can build a website and put it online using only an Android phone. This guide uses SrcNexus, a free code editor that includes hosting: your site goes live at https://your-username.srcnexus.app/your-project. A simple page takes about ten minutes.

Last checked:

What you need

Steps

  1. Install SrcNexus. Install SrcNexus from Google Play. It is free.
  2. Create a project. On the home screen tap +, then choose Web Project for a ready-made index.html, style.css and script.js, or Empty Project to start from nothing.
  3. Write your page. Open index.html from the file drawer and edit it. Tabs at the top switch between files, and a row of coding keys sits above the keyboard.SrcNexus editor on Android with index.html open
  4. Preview and debug. Tap the run button to open the live preview. Choose DevTools from the preview menu to see console messages, network requests and localStorage/sessionStorage, and fix any errors.SrcNexus DevTools console showing a log message and an uncaught TypeError with file and line numbers
  5. Sign in. Publishing needs a free SrcNexus account. Sign in, and verify your email if you want to publish more than one project.
  6. Publish. Open the ⋮ menu in the editor and choose Publish. SrcNexus uploads the project, skipping anything in .gitignore, and shows a progress dialog.SrcNexus publish dialog showing the live link https://ankit.srcnexus.app/my-awesome-project
  7. Share the link. When the dialog says Project Published Successfully, copy the link. Your site is live at https://your-username.srcnexus.app/your-project.
  8. Update the site. Edit your files and choose Publish again. Only the files that changed are uploaded, and deleted files are removed from the live site.

A starter page to try

Paste this into index.html, run it, then publish:

<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>My first site</title>
  <link rel="stylesheet" href="./style.css">
</head>
<body>
  <h1>Hello from my phone</h1>
  <p>Built and published with SrcNexus.</p>
  <script src="./script.js"></script>
</body>
</html>

Keep an index.html in the project root (or set a serve directory, below). Without one, the root URL of your published project returns 404, although each file is still reachable at its own path.

Publishing a React, Vue or Vite project

Build tools run in the SrcNexus terminal, which connects to Termux after a one-time setup (terminal guide). Then:

  1. Run npm run build. Vite writes the site to dist.
  2. Remove dist from .gitignore, because ignored files are not published.
  3. In the ⋮ menu choose Serve Directory and enter dist. This writes serve = "/dist" to redirects.txt.
  4. For client-side routing, add /* /index.html 200 to redirects.txt so deep links load your app instead of a 404.
  5. Publish.

The React guide covers this in detail, including the Vite base path.

Troubleshooting

Want the bigger picture? See how one-tap publishing works in SrcNexus or the FAQ.

SrcNexus is free on Google Play.

Download SrcNexus