#Deploy in VPS server
7 messages · Page 1 of 1 (latest)
Hi @nimble depot. I'm kapa.ai, your friendly support bot. I will try to answer your question by searching through the knowledge base. :wave:
To deploy your Astro project on a Virtual Private Server (VPS), you can use Cleavr, a server and app deployment management tool. Here are the steps you need to follow:
- In Cleavr, navigate to the server where you want to add your Astro project.
- Select Add Site and fill in the details for your application, such as domain name.
- For App Type, select 'NodeJS Static' or 'NodeJS SSR' according to how you are setting up your Astro app.
- For Static apps, set Artifact Folder to
dist. - For SSR apps:
- Set Entry Point to
entry.mjs. - Set Artifact Folder to
dist/server.
- Set Entry Point to
- Select Add to add the site to your server.
Once your new site is added, click Setup and deploy. Select the VC Profile, Repo, and Branch for your Astro Project. Make any additional configurations necessary for your project. Click on the Deployments tab and then click on Deploy.
Please note that you need a Cleavr account and a server on your VPS provider using Cleavr to get started.
For more details, you can check out the Astro guide in Cleavr’s docs (https://docs.cleavr.io/guides/astro) or the Astro deployment guide (https://docs.astro.build/en/guides/deploy/cleavr/#_top).
Note: you can ask me a follow up question by @ mentioning me again :speech_balloon:
@nimble depot kapa.ai is still learning and improving, please let us know how it did by reacting below
@delicate laurel Is it possible to do it without using Cleavr?
Let me check the knowledge base for you. One moment! :books:
Yes, it's possible to deploy your Astro project on a VPS without using Cleavr. However, the exact steps can vary depending on the specific VPS and its configuration. Generally, you would need to:
-
Build your Astro project locally or on the server. This can be done by running the
astro buildcommand which generates adistfolder with your built project. -
Transfer the
distfolder to your VPS. This can be done using various methods likescporrsyncif you're using a Unix-like system, or tools like FileZilla for a more graphical approach. -
On your VPS, you would need to serve the
distfolder. This can be done using a web server like Nginx or Apache. You would need to configure the web server to serve thedistfolder at the desired subfolder location.
Please note that these are general steps and might need to be adjusted based on your specific VPS and its configuration. For more detailed instructions, you should refer to the documentation of your VPS provider or the web server software you're using.