๐Clone Repo
login to your server using your terminal with SSH with the user of a created project
If you are using a password to log in, the SSH command would be:
If you are using a private key to log in, the SSH command would be:
Login via SSH to the Server.
you are on the server user and you can generate an SSH key to link it with your GitHub Project to generate this key use this command line
and you can just click enter after finishing you will get a path ending with .pub
copy the path and then use this command to view the path SSH key content and then copy it
where.ssh/rsa.pub
is the path of your key
now go to your GitHun Repo and on the Settings Tab, select Deploy keys and then add deploy Key and then select a name add your SSH key then save it.
now your server has access to this repo and you can clone it so go back to your server and then on the path of the project it can look like this
and clone your repo like this
it will clone the project on the current directory
now it's time to install the composer packages and set up the project .env file follow these steps
Copy .env file
use this command to copy .env.example
now update your details and create a new database from Cloudpanel on the Database Tab create a new database, then add the details of the database to .env
change the main URL in .env file
Install Composer packages and clean the project
to install composer packages just use this command
then you can run your project command and the important one is
now your app is ready for Frontend assets to make this work you need to install npm
Install NVM/NPM/Yarn
Install nvm with the following command:
Update the current shell environment:
Install your required Node.js version e.g. 18:
Activate the installed Node.js version:
Done! Check the Node.js version:
now you can install Yarn using this command
now you can easily run yarn to build assets
your project is ready now and you can view it on your browser.
Last updated