In this tutorial we will prepare our server in digitalocean droplet.
After login and redirect to your dashboard
- Click on the green button Create and choose from Droplets the drop down list, like the following image.
After that it will open new page to complete create your droplet - Select your image: from distributions select Ubuntu like the following image.
- Then choose the suitable plan for you
- After that choose the datacenter region
A good default is selected for you, but for the best performance and minimal latency, choose the datacenter nearest to you and your users.
- Choose your authentication method
Authenticate with SSH or with Password.
We will choose SSH
Create SSH Key
- Open your terminal and type on it the following command
ssh-keygen
- It will ask you about the name of the key and the location you need to save this key on it, the default is
/home/mohamed/.ssh/id_rsa
you can change the name and location for example/home/mohamed/.ssh/newKey/droplet_key
- After that it will ask you to enter the passphrase and confirm it then the key will be generated on the location you selected.
Now we need to add this key to our droplet
From this image click on New SSH Key
It will open screen and ask you to enter your public key, so for that open your terminal and get the public key you created before like that cat /home/mohamed/newKey/droplet_key.pub
and copy the key from the terminal and paste it in the textarea on the screen.
Then write name for this key and click on the button Add SSH Key and now everything is ok let’s go to the next step.
- Finalize and create droplet write on the hostname your droplet name, for example
laravel-app-host
and then select the project if you have more than one project, then click on create droplet, and congratulations your droplet will be created in few minutes.
You can follow the creating progress from like that
After the creating ends it will be like that
and you can open it
See you on the next tutorial we will configure our droplet and install LEMP Stack