> ## Documentation Index
> Fetch the complete documentation index at: https://docs.squarecloud.app/llms.txt
> Use this file to discover all available pages before exploring further.

# Website and API Hosting: Node.js, Python, Static Sites

> Website and API hosting behind Cloudflare: included squareweb.app subdomain, auto-renewing TLS, global CDN, WAF and custom domains on Standard and up.

<Frame>
  <img src="https://squarecloud.app/banners/en/sites.png" alt="Square Cloud Sites service overview" style={{ borderRadius: "0.2rem" }} />
</Frame>

## Why choose Square Cloud?

Every site is served from behind Cloudflare's global network, with free TLS, a free CDN and DDoS protection wired in by default: the same production-grade edge whether you deploy a static landing page or a full framework SSR app. You configure a subdomain; we handle certificates, caching and routing.

<CardGroup cols={2}>
  <Card title="Cloudflare edge + Square Shield" icon="shield-check">
    Every site sits behind the **Cloudflare WAF** with **Square Shield** on top: DDoS mitigation, bot filtering and free, auto-renewing TLS included at no extra cost.
  </Card>

  <Card title="NVMe + 10Gbps, isolated" icon="bolt">
    **Enterprise NVMe SSDs** and **10Gbps** uplinks, with your app in an isolated container. Paired with a **free global CDN**, static assets are cached at the edge and served close to every visitor.
  </Card>

  <Card title="Managed DNS" icon="globe">
    **Bring your own domain, certificate handled for you**: [attach a domain you already own](https://help.squarecloud.app/en-us/article/how-to-set-up-your-own-domain-cnamedns-1fzbrgh/) (Standard and up), create the DNS records the dashboard shows at your DNS provider, and Square Cloud issues and renews the TLS certificate as soon as they propagate.
  </Card>

  <Card title="Instant snapshots" icon="server">
    **One-click restore points**, included at no extra cost. Recover from a broken deploy in seconds with no data loss and **zero downtime**.
  </Card>
</CardGroup>

## Supported environments

Host your site with the stack you already use. Start with the [website and API hosting guide](/en/tutorials/how-to-deploy-your-website), then pick your framework below: each card opens a step-by-step guide with code.

### Frameworks

<CardGroup cols={3}>
  <Card title="Angular" icon="angular" href="/en/tutorials/website/angular" />

  <Card title="Astro" icon="rocket-vertical" href="/en/tutorials/website/astrojs" />

  <Card title="Gatsby" icon="g" href="/en/tutorials/website/gatsby" />

  <Card title="Next.js" icon="n" href="/en/tutorials/website/nextjs" />

  <Card title="Nuxt" icon="mountains" href="/en/tutorials/website/nuxt" />

  <Card title="Phoenix" icon="phoenix-framework" href="/en/tutorials/website/phoenix" />

  <Card title="Preact" icon="atom-simple" href="/en/tutorials/website/preact" />

  <Card title="Qwik" icon="circle-bolt" href="/en/tutorials/website/qwik" />

  <Card title="React" icon="react" href="/en/tutorials/website/react" />

  <Card title="React Router (Remix)" icon="bolt" href="/en/tutorials/website/remix" />

  <Card title="Ruby on Rails" icon="gem" href="/en/tutorials/website/ruby-on-rails" />

  <Card title="SolidJS" icon="s" href="/en/tutorials/website/solidjs" />

  <Card title="Vite" icon="v" href="/en/tutorials/website/vite" />

  <Card title="Vue" icon="vuejs" href="/en/tutorials/website/vue" />

  <Card title="Static HTML/CSS" icon="html5" href="/en/articles/getting-started-with-html" />
</CardGroup>

### APIs and backends

<CardGroup cols={4}>
  <Card title="Django" icon="python" href="/en/tutorials/api/django" />

  <Card title="Express" icon="network-wired" href="/en/tutorials/api/express" />

  <Card title="FastAPI" icon="bolt" href="/en/tutorials/api/fastapi" />

  <Card title="Fastify" icon="cat" href="/en/tutorials/api/fastify" />

  <Card title="Flask" icon="ethernet" href="/en/tutorials/api/flask" />

  <Card title="Laravel" icon="laravel" href="/en/tutorials/api/laravel" />

  <Card title="NestJS" icon="wifi" href="/en/tutorials/api/nestjs" />

  <Card title="Spring Boot" icon="leaf" href="/en/tutorials/api/spring-boot" />
</CardGroup>

<Info>
  Not on the list? Virtually any other framework or library runs too: if it starts a web server on port 80, it runs on Square Cloud.
</Info>

### Languages

<CardGroup cols={3}>
  <Card title="JavaScript" icon="node-js" href="../articles/getting-started-with-nodejs" />

  <Card title="Bun" icon="bread-slice" href="../articles/getting-started-with-bun" />

  <Card title="Deno" icon="t-rex" href="../articles/getting-started-with-deno" />

  <Card title="Python" icon="python" href="../articles/getting-started-with-python" />

  <Card title="Java" icon="java" href="../articles/getting-started-with-java" />

  <Card title="Rust" icon="rust" href="../articles/getting-started-with-rust" />

  <Card title="Elixir" icon="droplet" href="../articles/getting-started-with-elixir" />

  <Card title="PHP" icon="php" href="../articles/getting-started-with-php" />

  <Card title="Go" icon="golang" href="../articles/getting-started-with-go" />

  <Card title="C#" icon="c" href="../articles/getting-started-with-csharp" />

  <Card title="Ruby" icon="gem" href="../articles/getting-started-with-ruby" />

  <Card title="HTML/CSS" icon="html5" href="../articles/getting-started-with-html" />
</CardGroup>

## Developer ecosystem

Deploy and manage your site from wherever you work:

* **[Square Cloud CLI](/en/cli-reference/quickstart):** deploy, restart and follow logs from the terminal.
* **[VS Code extension](/en/vscode-extension/installation):** manage your applications without leaving the editor.
* **GitHub:** every push to your repository can deploy automatically, by [connecting your GitHub repository](https://help.squarecloud.app/en-us/article/how-to-connect-your-github-repository-and-deploy-automatically-mr6srt/) or from a [GitHub Actions workflow](https://help.squarecloud.app/en-us/article/workflow-github-actions-automated-deploy-ff34mk/).
* **[SDKs](/en/sdks/introduction) and [REST API](/en/api-reference/introduction):** automate anything the dashboard does.

## How to host my website?

<Steps>
  <Step title="Add a configuration file" icon="file">
    Create a `squarecloud.app` file at the root of your project. The [configuration file guide](/en/getting-started/config-file) explains every field. A website also needs:

    * **SUBDOMAIN:** the address of your site. `SUBDOMAIN=test` serves it at `test.squareweb.app`.
    * **MEMORY:** the RAM reserved for it, **512 MB at least**.

    <Warning>Set `SUBDOMAIN` before the first upload. An application deployed without it can't become a website later: you would have to upload it again as a new application.</Warning>
  </Step>

  <Step title="Include your dependencies file" icon="box">
    Keep your dependencies file in the project: `package.json` for Node.js, `requirements.txt` or `pyproject.toml` for Python. Square Cloud installs everything it lists on the server. Leave out built-in modules, such as `fs` in Node.js or `random` in Python, since they come with the language.
  </Step>

  <Step title="Zip the project" icon="file-zip">
    Compress your code, the configuration file and the dependencies file into a `.zip`. Leave out `node_modules`, `__pycache__`, lockfiles such as `package-lock.json` and other generated files: dependencies are installed on the server, and a smaller upload deploys faster. The CLI and the VS Code extension leave lockfiles out for you. Need pinned versions? Add `!package-lock.json` to your [squarecloud.ignore](/en/getting-started/squarecloud-ignore) file.
  </Step>

  <Step title="Upload your site" icon="arrow-up">
    <Tip>Your app must listen on **port 80** and host **`0.0.0.0`**. The runtime images already set the `PORT` and `HOST` [environment variables](/en/platform/environment-variables) to these values, so a server that reads them needs no change. Visitors reach your site over HTTPS, and Square Cloud handles the certificate.</Tip>
    Send the `.zip` on the [upload page](https://squarecloud.app/en/dashboard/new). Square Cloud installs the dependencies, sets up the environment from your configuration file and puts your site online.

    <Frame>
      <img src="https://cdn.squarecloud.app/docs/articles/dashboard/uploading.gif" alt="Uploading application to Square Cloud" style={{ borderRadius: "0.2rem" }} />
    </Frame>
  </Step>
</Steps>

## Something went wrong?

<CardGroup cols={2}>
  <Card title="App won't start" icon="triangle-exclamation" href="/en/platform/troubleshooting/app-wont-start">
    Fix a deploy that fails or crashes on boot: a port already in use, missing modules, `INVALID_DEPENDENCY` or not enough RAM.
  </Card>

  <Card title="All troubleshooting guides" icon="life-ring" href="/en/platform/troubleshooting">
    Find the fix for an error code or a symptom across apps, bots and databases.
  </Card>
</CardGroup>

## Frequently asked questions

<AccordionGroup>
  <Accordion title="How much does it cost to host a website?">
    We recommend the **Standard** plan, from **R$44.99/month** with 4 GB of RAM and 4 vCPUs, which also unlocks custom domains. A lighter site also runs on the **Hobby** plan, from **R$12.49/month**: a website needs at least 512 MB of RAM. See [Plans and Pricing](/en/platform/plans) for the full comparison.
  </Accordion>

  <Accordion title="Do I get a free subdomain?">
    Yes. Every web deploy includes a `*.squareweb.app` subdomain at no extra cost, as part of your plan. It's ready to use as soon as you set the `SUBDOMAIN` field in your configuration file.
  </Accordion>

  <Accordion title="Can I use my own domain?">
    Custom domains are available from the **Standard** plan and up. Square Cloud does not register or sell domain names: the feature connects a domain you already own at a registrar, one hostname per application (such as `example.com` or `www.example.com`). Follow [how to set up your own domain](https://help.squarecloud.app/en-us/article/how-to-set-up-your-own-domain-cnamedns-1fzbrgh/) for the DNS records, and see [why a domain hasn't propagated yet](https://help.squarecloud.app/en-us/article/why-hasnt-my-domain-propagated-yet-dns-f5jzoy/) if it doesn't load. To attach it from code, use [Set Custom Domain](/en/api-reference/endpoint/apps/network/custom).
  </Accordion>
</AccordionGroup>


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.