Articles on: Websites & APIs
This article is also available in:

How to host a Qwik application

How to Host Qwik Applications on Square Cloud


Qwik rebuilds the browser user experience without the burden of initial JavaScript. To host a Qwik City application on Square Cloud, build it with an adapter: the static adapter (recommended, served by the static runtime with no Node.js process) or the Express adapter for SSR.



1. Adding the Static Adapter


Without an adapter, the build fails with "Missing an integration". At the root of your local project, add the static adapter:


npm run qwik add static



2. Running the Production Build


npm run build


This command writes one HTML file per page and a 404.html into the dist/ folder.



3. Configuring the Static Runtime


Create a squarecloud⁠.app file inside dist/ (see the configuration file docs):


MAIN=index.html
MEMORY=512
VERSION=recommended
DISPLAY_NAME=My Qwik Site
SUBDOMAIN=my-qwik-site


Don't rename index.html: unknown routes will serve your 404.html. No start command or port setting is needed; Square Cloud serves the files for you.



4. What to Include in the .zip File?


Zip the contents of dist/ (not the folder itself), including the squarecloud⁠.app file. The static runtime doesn't need package.json or node_modules.



5. Qwik with SSR (Optional)


If you need SSR, use the Express adapter instead:


  1. Add the adapter: npm run qwik add express.
  2. Move two dependencies out of devDependencies, which are not installed on Square Cloud: npm install --save-prod undici dotenv.
  3. Run npm run build. In squarecloud⁠.app, use MAIN=server/entry.express.js, plus MEMORY, VERSION=recommended, DISPLAY_NAME and SUBDOMAIN.
  4. Zip dist/, server/, package.json and squarecloud⁠.app. The server reads PORT=80, which the platform sets.

Updated on: 10/04/2026

Was this article helpful?

Share your feedback

Cancel

Thank you!