On this page
Deploy your Astro Site to Kinsta Application Hosting
You can use Kinsta Application Hosting to host an Astro site on their cloud hosting.
Configuring your Astro project
Static hosting
To host your project on Kinsta Application Hosting, you need to:
- Include a
name
field in yourpackage.json
. (This can be anything, and will not affect your deployment.) - Include a
build
script in yourpackage.json
. (Your Astro project should already include this.) - Install the
serve
package and set thestart
script toserve dist/
.
Here are the necessary lines in your package.json
file:
SSR
To host your project on Kinsta Application Hosting, you need to:
- Include a
name
field in yourpackage.json
. (This can be anything, and will not affect your deployment.) - Include a
build
script in yourpackage.json
. (Your Astro project should already include this.) - Install the
@astrojs/node
package and set thestart
script tonode ./dist/server/entry.mjs
. - Set the
astro.config.mjs
to use@astrojs/node
and to usehost: true
.
Here are the necessary lines in your package.json
file:
Here are the necessary lines in your astro.config.mjs
file:
How to deploy
Once your project’s GitHub repository is connected, you can trigger manual deploys to Kinsta Application Hosting in the MyKinsta Admin Panel. You can also set up automatic deployments in your admin panel.
Configuring a new Kinsta application
- Go to the My Kinsta admin panel.
- Go to the Applications tab.
- Connect your GitHub repository.
- Press the Add service > Application button.
- Follow the wizard steps.
- Your application is deployed.
More Deployment Guides
Filter by deploy type© 2021 Fred K. Schott
Licensed under the MIT License.
https://docs.astro.build/en/guides/deploy/kinsta/