GarageHQ is a powerful web-based tool that allows you to manage your garage sales using your computer or mobile device. It is built on Laravel, a popular PHP web application framework. In this tutorial, we will show you how to install GarageHQ on a Debian Linux system.
Before we begin, make sure that you have the following:
It is always important to ensure that your system is up-to-date before installing any new software. To do this, run the following commands:
sudo apt-get update
sudo apt-get upgrade
GarageHQ requires the following packages to be installed on your system:
To install these packages, run the following command:
sudo apt-get install apache2 mysql-server php7.4 php7.4-mysql git
During the installation process, you will be prompted to set a password for the MySQL root user. Make sure to choose a strong password and remember it.
After installing the required packages, you need to clone the GarageHQ repository to your local machine. Change directory to the Apache webroot directory and clone the repository from GitHub:
cd /var/www/html/
sudo git clone https://github.com/deuxfleurs/GarageHQ.git
By default, Apache webroot directory is /var/www/html/
. If you have changed the Apache document root, go to that directory instead.
The next step is to configure Apache to serve files from the GarageHQ directory. To do this, create a new virtual host file called garagehq.conf
in the /etc/apache2/sites-available/
directory. You can use the nano text editor to create the file:
sudo nano /etc/apache2/sites-available/garagehq.conf
Add the following content to it:
<VirtualHost *:80>
ServerAdmin webmaster@localhost
DocumentRoot /var/www/html/GarageHQ/public
<Directory /var/www/html/GarageHQ>
Options Indexes FollowSymLinks MultiViews
AllowOverride All
Require all granted
</Directory>
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>
Save the file and close it.
To enable the new virtual host configuration, run the following command:
sudo a2ensite garagehq.conf
Finally, restart Apache to apply the changes:
sudo systemctl restart apache2
GarageHQ has some dependencies that need to be installed using the Composer package manager. Change directory to the GarageHQ directory and run the following command:
cd /var/www/html/GarageHQ/
sudo curl -sS https://getcomposer.org/installer | sudo php
sudo php composer.phar install
GarageHQ requires some environment variables to be set. Copy the sample .env.example
file to .env
and edit it:
sudo cp .env.example .env
sudo nano .env
In this file, you will need to set the APP_KEY
, DB_HOST
, DB_PORT
, DB_DATABASE
, DB_USERNAME
, and DB_PASSWORD
variables.
The APP_KEY
variable should be a 32-character random string, which can be generated by running the following command:
sudo php artisan key:generate --show
Copy the output and paste it into the APP_KEY
variable in the .env
file.
The DB_HOST
, DB_PORT
, DB_DATABASE
, DB_USERNAME
, and DB_PASSWORD
variables should be set based on your MySQL installation. For example:
DB_HOST=localhost
DB_PORT=3306
DB_DATABASE=garagehq
DB_USERNAME=garagehquser
DB_PASSWORD=your_password_here
Save the file and close it.
GarageHQ requires some database tables to be created. To do this, run the following command:
sudo php artisan migrate
To ensure that GarageHQ can write to some specific directories, you need to set the correct file permissions. Run the following commands:
sudo chgrp -R www-data /var/www/html/GarageHQ/storage /var/www/html/GarageHQ/bootstrap/cache
sudo chmod -R ug+rwx /var/www/html/GarageHQ/storage /var/www/html/GarageHQ/bootstrap/cache
After completing all the above steps, you can access GarageHQ by visiting your server's IP address or domain name in your web browser.
http://your_server_ip_address/
You will be redirected to the GarageHQ login page, where you can log in with the default username admin
and password password
.
Congratulations! You have successfully installed GarageHQ on Debian Linux. You can now manage your garage sales using this powerful web-based tool.
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!