Static sites and web hosting on Renode
How RE:NODE web hosting serves your files: the web root, index.html at its root, committing built output, how GitHub deploys reach the folder, and why nothing is built or started.
All docs pages
A web hosting server (the HTML CSS JS PHP line, and Engines) is different from an app server: its image already runs a web server - nginx, with PHP - bound to the server's port. It serves a folder, the web root, exactly as it is. Nothing from your repository is started, and nothing is built.
What has to be in the repository#
- `index.html` (or `index.php`) at the root of the served folder. That file is your home page.
- The built output, if your project has a build step. A React, Vue, Svelte or Astro project that builds into
dist/orbuild/must have that folder committed, or the path on the GitHub tab pointed at it. The server never runsnpm run build. - No server process and no port. Do not add a Node or Python server and do not bind a port: the web server is already bound to it.
A typical layout for a site built with Vite:
my-site/ src/ your source dist/ committed build output - the folder that is served index.html assets/ package.jsonBuild locally with npm run build, commit dist/, and set the path on the GitHub tab to dist.
How files reach the server#
On web hosting the panel writes your repository into the web root - not the server itself. It does so:
- when you link the repository,
- when you save changes on the GitHub tab,
- on every push to the branch, with "Restart the server when someone pushes to this branch" on.
Restarting the server fetches nothing. And files the branch no longer has are left in place rather than deleted, so remove an old file through the Files tab if it must disappear.
You can also skip GitHub entirely and upload files through the Files tab or SFTP.
Single-page apps#
A single-page app with client-side routing has one real file, index.html. A reader who refreshes on /about asks the web server for a file called about, which does not exist, and gets a 404. Use hash-based routing (/#/about), or ask support about a fallback to index.html for unknown paths.
Never commit secrets here#
Everything in the web root can be downloaded by anybody who guesses its name. Never put .env, credentials or private keys in the served folder. A static site that needs a secret - an API key for a payment provider, a database password - needs a server-side component on an app server instead.
Checklist#
index.htmlorindex.phpis at the root of the served folder.- The built output is committed, or the path on the GitHub tab points at it.
- No server process, no port binding.
- Nothing secret is in the served folder.
- If routes 404 on refresh, the app uses hash routing or a fallback has been arranged.
Common errors#
A directory listing or the placeholder page instead of the site. There is no index.html at the root of the served folder - usually because the site builds into dist/ and the path still points at the repository root.
The site did not change after a push. Restart on push is off, so the panel did not write the new commit. Save the GitHub tab, or turn the switch on. A restart alone does nothing here.
A deleted page still loads. Files removed from the branch are not removed from the server. Delete it through the Files tab.
Pages other than the home page 404 on refresh. See Single-page apps above.
Questions this does not answer? Open a ticket from the panel, or start from the overview. These pages are also available as plain text for AI assistants at /llms.txt.