Setting up an Ubuntu Linux Server for Laravel

Configuring a Linux server can be stressing and a hassle, but since we’ve done this few times and struggled, We thought to share.

Let’s begin then

  1. Login to yourself
  2. add a Laravel user
    1. “`adduser dev“`
    2. check if user exists “`cut -d: -f1 /etc/passwd | grep “`
  3. Install NGINX
    1. sudo apt update
      sudo apt install nginx nginx-extras -y
  4. Start NGINX sudo service nginx start
  5. sudo ufw enable


Installing PHP and Extensions

Install Composer


  1. Clone branch
  2. Copy .env
  3. Install dependencies
  4. Migrate db
  5. Run any Seeds if appliccable
  6. Symlink Storage folder
  7. File Permission