Photo by Science in HD on Unsplash

Configure Ubuntu Server for Laravel Application

Hafiq Iqmal
Geek Culture
Published in
12 min readFeb 16, 2021

--

Day by day, some fresh developers have problem on how to setup application on some dedicated server. For full stack developer or back-end developer, configuring a server should be consider as important knowledge

In this tutorial, LEMP stack will be used and deploy a simple Laravel project into server, which requires a few common steps. This tutorial based on my deployment in Digital Ocean and it might be similar to most other cloud server configuration.

Lets get started

First thing first after you install your OS or bought a server from any hosting is to configure administrative setting. This is the crucial part. You must create non-root user for your application to avoid major security issue.

So, go ahead to your terminal and ssh into your server

ssh root@SERVER_IP

You might receive a warning, just complete the login process. You will also be prompted to change the root password for the first time logon into the server.

Next is to set up a new user account with less privilege. Create new user by simply use adduser command. Let’s go for username “laravel”

adduser laravel

You will be asked some question and set new password.

--

--

Hafiq Iqmal
Geek Culture

Technical Lead | Software Engineer | Laravel Enthusiasts | Tech writer | UiTM Alumni | Husband | Proud father of a beautiful daughter