How to Install GarageHQ on Ubuntu Server Latest

GarageHQ is a self-hosted platform designed for car enthusiasts to keep track of their car records and maintenance. This tutorial will guide you on how to install GarageHQ on your Ubuntu Server.

Prerequisites

Before we proceed with the installation, ensure that you have the following:

Step 1: Update your Ubuntu Server

The first step is to ensure that your Ubuntu Server is up-to-date. Run the following command to update the installed packages:

sudo apt update && sudo apt upgrade -y

Step 2: Install Required Packages

GarageHQ requires the following packages to be installed on your Ubuntu Server:

To install these packages, run the following command:

sudo apt install git curl unzip apache2 php7.4 php7.4-curl php7.4-gd php7.4-mbstring php7.4-mysql php7.4-xml libapache2-mod-php7.4 -y

Step 3: Download and Install GarageHQ

Next is to download and install GarageHQ. Follow the steps below:

  1. Create a directory where you want to install GarageHQ. For this tutorial, we will create a directory called garagehq inside the /var/www/html directory:
cd /var/www/html
sudo mkdir garagehq
  1. Navigate to the newly created garagehq directory:
cd garagehq
  1. Download the latest release of GarageHQ by running the following command:
sudo curl -LOk https://github.com/deuxfleurs/GarageHQ/releases/latest/download/GarageHQ.zip
  1. Unzip the downloaded file by running:
sudo unzip GarageHQ.zip
  1. Give the Apache web server permissions to read and write the GarageHQ files:
sudo chown -R www-data:www-data /var/www/html/garagehq
sudo chmod -R 755 /var/www/html/garagehq

Step 4: Configure Apache Web Server

Now we need to configure Apache web server to serve GarageHQ. Follow the steps below:

  1. Open the default Apache virtual host configuration file:
sudo vi /etc/apache2/sites-available/000-default.conf
  1. Add the following lines at the end of the <VirtualHost> section:
Alias /garagehq /var/www/html/garagehq/public
<Directory /var/www/html/garagehq/public>
    AllowOverride All
    Order allow,deny
    allow from all
    Require all granted
    DirectoryIndex index.php
</Directory>
  1. Save the file.

  2. Restart the Apache web server:

sudo systemctl restart apache2

Step 5: Configure GarageHQ

Next, we need to configure some settings in GarageHQ.

  1. Navigate to the garagehq directory:
cd /var/www/html/garagehq
  1. Rename the .env.example file to .env:
sudo mv .env.example .env
  1. Open the .env file with any text editor of your choice:
sudo vi .env
  1. Change the two lines:
APP_URL=http://localhost:8000
APP_ENV=production

to:

APP_URL=http://your_IP_address/garagehq
APP_ENV=production
  1. Save the file.

Step 6: Run GarageHQ

Finally, we need to run GarageHQ. Follow the steps below:

  1. Navigate to the garagehq directory:
cd /var/www/html/garagehq
  1. Install the required dependencies by running:
sudo composer install
  1. Generate a new application key by running:
sudo php artisan key:generate
  1. Migrate the database by running:
sudo php artisan migrate --seed
  1. Start the built-in PHP web server:
sudo php artisan serve
  1. Access GarageHQ in your browser by visiting http://your_IP_address:8000/garagehq.

  2. To stop the PHP web server, press CTRL + C on your keyboard.

Conclusion

Congratulations! You've successfully installed and configured GarageHQ on your Ubuntu Server. Now you can start using GarageHQ to keep track of your car records and maintenance.

If you want to self-host in an easy, hands free way, need an external IP address, or simply want your data in your own hands, give IPv6.rs a try!

Alternatively, for the best virtual desktop, try Shells!