# Setup on VPS

This section will demonstrate how to set up Shipboard on VPS environment.

You can use any SSH Client to access your VPS like Bitvise SSH. In the following example, we will upload the content into /var/www/shipboard on the VPS.

First make the Apacher web server user (assuming it's www-data) as the owner of the project folder.

sudo chown -R www-data:www-data /var/www/shipboard

Then add your user to www-data group so you can use SFTP

sudo usermod -a -G www-data username

Then you set all your directories to 755 and your files to 644

sudo find /var/www/shipboard -type f -exec chmod 644 {} \;
sudo find /var/www/shipboard -type d -exec chmod 755 {} \;
chmod 775 /var/www/shipboard/storage -R	

Now login into MySQL server to create a database

mysql -u username -p

Create a new database user, database and grant permissions to them

GRANT ALL ON shipboard.* TO 'username'@'localhost' IDENTIFIED BY 'password';

After that go to the project root directory and run the following command

php artisan shipboard:install

This command will run the built-in installer, and you will see the following output.

Verifying PHP version..
PHP Version is verified successfully.
Verifying PHP extensions..
PHP extensions verified successfully.
Verifying folder write permissions..
Folder permissions are verified successfully.
Generating application key..
Application key set successfully.
Application key generated successfully.
Installing the database...
Database installed successfully.
Configuring system settings...
System settings configured successfully.
Creating admin user..
Admin user created successfully.
Finished installing Shipboard successfully.

Finally you need to setup cron job to handle sending emails in background. To do so write the following command

crontab -e

An editor will be open and insert the following line at the end of cron file

* * * * * cd /var/www/shipboard && php artisan schedule:run >> /dev/null 2>&1

Save and exit the cron file.