How to Install InvoicePlane on Debian Latest

InvoicePlane is an open-source invoicing application that allows users to manage and generate invoices. In this tutorial, we will walk you through the installation of InvoicePlane on Debian Latest. We will assume that you have already installed and configured a web server (e.g., Apache, Nginx, etc.), PHP, and a database server (e.g., MySQL, MariaDB, etc.) on your Debian system.

Step 1: Install Required Packages

First, you need to install some necessary packages on your Debian system. Run the following command to install them:

sudo apt update
sudo apt install curl unzip

Step 2: Install Composer

InvoicePlane uses the Composer package manager to manage its dependencies. If you don't have Composer installed on your system, run the following command to install it:

curl -sS https://getcomposer.org/installer | sudo php -- --install-dir=/usr/local/bin --filename=composer

Step 3: Download and Install InvoicePlane

Next, download and install InvoicePlane on your system by running the following commands:

sudo mkdir -p /var/www/invoiceplane
sudo chown -R www-data:www-data /var/www/invoiceplane
cd /var/www/invoiceplane
sudo composer create-project invoiceplane/invoiceplane --no-dev --prefer-dist .
sudo chmod -R 777 storage
sudo chmod -R 777 uploads

Step 4: Configure Database

Now, we need to create a new database and user for InvoicePlane. You can do this by running the following commands:

sudo mysql -u root -p

Enter your root password when prompted, and then enter the following commands to create a new database and user:

CREATE DATABASE invoiceplane;
CREATE USER 'invoiceplane'@'localhost' IDENTIFIED BY 'password';
GRANT ALL PRIVILEGES ON invoiceplane.* TO 'invoiceplane'@'localhost';
FLUSH PRIVILEGES;
EXIT;

Note: Replace "password" with a secure password of your choice.

Step 5: Configure InvoicePlane

Now, we need to configure InvoicePlane by creating a new configuration file. Run the following command to create a new configuration file:

sudo cp ipconfig.php.example ipconfig.php

Next, edit the configuration file using your favorite text editor:

sudo nano ipconfig.php

Update the following lines with your database details:

define('IP_DB_USER', 'invoiceplane');
define('IP_DB_PASS', 'password');
define('IP_DB_NAME', 'invoiceplane');
define('IP_DB_HOST', 'localhost');
define('IP_DB_PORT', '3306');

Save and close the file.

Step 6: Configure Web Server

Finally, we need to configure our web server to serve InvoicePlane. If you are using Apache, create a new virtual host configuration file:

sudo nano /etc/apache2/sites-available/invoiceplane.conf

Add the following contents to the file:

<VirtualHost *:80>
    ServerAdmin webmaster@localhost
    DocumentRoot /var/www/invoiceplane/public
    <Directory /var/www/invoiceplane/public/>
        Options Indexes FollowSymLinks MultiViews
        AllowOverride All
        Order allow,deny
        allow from all
    </Directory>
    ErrorLog ${APACHE_LOG_DIR}/invoiceplane_error.log
    CustomLog ${APACHE_LOG_DIR}/invoiceplane_access.log combined
</VirtualHost>

Save and close the file. Then, enable the virtual host configuration:

sudo a2ensite invoiceplane.conf

Finally, restart Apache to apply the changes:

sudo systemctl restart apache2

If you are using Nginx or another web server, refer to their documentation on how to configure virtual hosts.

Step 7: Access InvoicePlane

You can now access InvoicePlane by opening your web browser and navigating to http://your-server-ip. You should see the InvoicePlane login page. If you encounter any errors, you can check the Apache error logs at /var/log/apache2/invoiceplane_error.log.

Congratulations! You have successfully installed InvoicePlane on your Debian Latest system. You can now start generating and managing your invoices.

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!