# Web hosting

> Run website hosting from FeatherPanel with FeatherQuilld. Add web nodes, write WebPlates, set hosting packages, and create and manage WebSpaces for users.

Source: https://featherpanel.com/docs/admin/web-hosting/

Web hosting runs on [FeatherQuilld](https://featherpanel.com/docs/quilld), a separate daemon for websites. The pieces in the admin area:

| Piece | Where | What it is |
| --- | --- | --- |
| Web node | Infrastructure, Nodes (Web) | A machine running FeatherQuilld. |
| Mail, DNS hosts | Infrastructure | Mail servers and PowerDNS servers on web nodes. |
| WebPlate | Templates, WebPlates | How a site is installed and run, like a spell for websites. |
| Hosting package | `/admin/hosting-packages` | A named preset of limits. |
| WebSpace | Servers, WebSpaces | One hosted site owned by a user. |

Web hosting is marked alpha. Creating a Web Hosting location asks you to accept that notice.

## Web nodes

1. Create a location of type Web Hosting under [Locations](https://featherpanel.com/docs/admin/locations-and-nodes#locations).
2. Admin area, Nodes (Web), Create Web Node, then install and join FeatherQuilld as described in
   [Installing FeatherQuilld](https://featherpanel.com/docs/quilld/installation) and [Joining a web node](https://featherpanel.com/docs/quilld/configuration).
3. Open the node's **Hosting setup** tab. It checks FeatherQuilld, the reverse proxy, Docker and ACME before you put
   customer sites on the node. Install the proxy and other services from the **Package manager** tab.

The node edit page also has Status, Diagnostics and Self-update tabs, and settings for the panel connection, SFTP (host
key algorithm, key-only login) and optional classic FTP on port 21 with a passive port range. FTP sends passwords in
clear text, so prefer SFTP. Proxy, DNS and mail on the node are covered in [Reverse proxy and DNS](https://featherpanel.com/docs/quilld/proxy-and-dns)
and [Mail](https://featherpanel.com/docs/quilld/mail).

## WebPlates

Admin area, WebPlates, Create WebPlate:

| Section | Fields |
| --- | --- |
| Basics | Name, author, description. |
| Runtime | Runtime image (for example `php:8.3-fpm` or `node:20`; empty serves static files), runtime (detected from the image), document root (`public`, `dist`, or blank for the WebSpace root), startup command for Node or Python apps, container port (0 uses the runtime default: 80 for PHP and custom, 3000 for Node, 8000 for Python). |
| Install script | Install container, entrypoint and script. |
| Default schedules | Cron tasks copied onto every new WebSpace made from this plate. |

A WebPlate cannot be deleted while WebSpaces use it.

## Hosting packages

Hosting packages are presets that fill in a WebSpace's limits: disk (MiB), CPU cores, memory (MiB), bandwidth
(GiB per month), databases, mailboxes and an optional default WebPlate. 0 means unlimited for CPU, memory and
bandwidth. The page has no sidebar entry; open `/admin/hosting-packages` directly. Packages then show up in the Create WebSpace form.

## Creating a WebSpace

Admin area, WebSpaces, Create WebSpace:

1. **Node & WebPlate.** Web node, WebPlate, optional document root override. The wizard warns when hosting is not
   ready on the node.
2. **Resources & domains.** Hosting package or custom limits, and one domain per line for the reverse proxy.
3. **Details & owner.** Name, description, owner, Automatic HTTPS, Skip install script, Start after install.
4. **Review & create.** Create & sync sends the site to FeatherQuilld and starts the install.

Automatic HTTPS issues Let's Encrypt certificates once DNS points at the node, using the owner's email address.

## Managing a WebSpace

The WebSpace page in the admin area has Start, Stop, Restart, Reinstall, Force sync (creates the site on the daemon
again if it is missing), Recreate runtime, Check DNS, Transfer, Suspend and Unsuspend. Suspending stops the site.
Backups can be created, downloaded, restored, imported and reconciled from the same page. Banning a user suspends all
of their WebSpaces.

What users see is described in [WebSpaces](https://featherpanel.com/docs/user/webspaces).

## API

| Method | Path | Permission |
| --- | --- | --- |
| GET, PUT | `/api/admin/web-nodes` | admin.nodes.view, admin.nodes.create |
| POST | `/api/admin/web-nodes/{id}/reset-token` | admin.nodes.edit |
| GET | `/api/admin/web-nodes/{id}/health` | admin.nodes.view |
| GET, PUT | `/api/admin/webplates` | admin.webplates.view, admin.webplates.create |
| GET, PUT | `/api/admin/hosting-packages` | admin.webspaces.view, admin.webspaces.create |
| GET, PUT | `/api/admin/dns-hosts`, `/api/admin/mail-hosts` | admin.webspaces.view, admin.webspaces.create |

## Frequently asked questions

### Is web hosting ready for production?

The panel labels FeatherPanel WebHosting as alpha, and you must accept that notice when you create a web hosting location. Expect bugs and keep your own backups.

### What is the difference between a WebPlate and a spell?

A spell is a template for a game server on FeatherWings. A WebPlate is a template for a website on FeatherQuilld, with a runtime image, document root and install script.

### Do WebSpaces need a Docker image?

No. A WebPlate without an image serves static files with no container.
