Ploi is a hosting and deployment platform custom built for PHP and MySQL developers. Out of the box the platform supports Laravel and Wordpress deploys in conjunction with related technologies you’ll need for web apps like Node.js and Redis. It’s free to get started and you can login with your Bitbucket or Github account.

In this tutorial we’re going to deploy a Laravel 5.6 app to the internet!

1. Create Ploi account

Login to Ploi and head to Profile > Server Providers page

Digital Ocean is a cloud hosting platform that provides internet infrastructure for applications.

2. Create Digital Ocean API key

Sign up using this link and get $10 free credit

Login to Digital Ocean and Applications & API > Tokens/Keys > Generate New Token that has write access. Paste in the token to the API Key input field. The label can be the name you give to your token. In my case I named it “Ploi”.

Input a write access Digital Ocean token to Ploi.

3. Input your SSH keys

SSH keys are a way for the server to identify your particular machine. SSH stands for Secure Shell and is how you can enter remote servers from your local machine. We need to give Ploi our SSH keys so that we can communicate directly with the remote server that we set up. By identifying our SSH public key the server will know it’s us and not a malicious computer trying to hack our server.

You can copy your SSH public key to your clipboard by running:

$ pbcopy < ~/.ssh/id_rsa.pub

Github and Digital Ocean both rely on SSH keys and have documentation here and here if you’re having trouble or haven’t done this type of thing before.

4. Create a server

Enter the information for the server that you want Ploi to provision.

From the Ploi dashboard select Create Server > Digital Ocean. This process can take 20–30 minutes so be patient!

When your server is provisioned you’ll get an email from Ploi. The server will be visible in both your Ploi and Digital Ocean dashboards. In the email you’ll have this info:

Server IP

User

Sudo password Database user

Database password

5. Create a site for your server on Ploi

Once we have a server we need a place to store our website. Create a site for your server under the sites tab. You will need to buy a domain name to deploy your site to for this to work.

Buy a domain name and add that url to the public folder under the Sites tab.

6. Create a new Laravel app and push to Github

Create a Laravel application on your local machine and push to Github.

This is a handy shell script I sometimes use when creating new Laravel apps.

Push your code up to a new Github repository or use a repo you already have.

7. Add Github repo to your site

Add the

After the side is added to your server add the Github repo. Once it’s added you’ll see the deployment script that will launch your application.

8. Deploy!

Click deploy now

Deploy your app with Ploi, Github and Digital Ocean.

9. (optional) SSH into your server

SSH stands for secure shell access. Sometimes it’s nice to go into a production server and see what’s up. You can use SSH to log into the remote server IN THE CLOUD from your local machine. Use the username (probably “ploi” and the Server IP value:

$ ssh {User}@{Server IP}

When prompted “Are you sure you want to continue connecting?” type yes and hit enter. YOU’RE IN!