Invoice Ninja is a popular open-source platform for managing invoices, clients, and payments. However, due to their frequent release cycle, installation can sometimes be challenging.

This guide provides a step-by-step working method to install Invoice Ninja on a self-hosted Debian 12 Bookworm system. Before you start, ensure you have MariaDB, NGINX, and PHP 8.2 installed and configured.

Step 1: Install Required PHP Modules

Invoice Ninja requires several PHP modules to function correctly. Run the following command to install them:

Step 2: Create the Installation Directory

Create a directory for Invoice Ninja under /var/app:

Step 3: Download Invoice Ninja

Download the latest release of Invoice Ninja from their official GitHub repository. At the time of writing, version v5.9.6 is the latest stable version:

Step 4: Extract the Files

Extract the downloaded .tar file:

Once extracted, delete the compressed file to save space:

Step 5: Set Proper Ownership

Change the ownership of the invoiceninja directory and its contents to the www-data user:

Step 6: Install Composer Dependencies

If Composer is not installed, you can install it with:

Then, install the required dependencies for Invoice Ninja:

Step 7: Configure the Environment File

Copy the default .env file and make necessary updates for your environment:

Change the ownership of the .env file to www-data:

Edit the .env file to match your database and system configuration. Ensure you update the following values:

Step 8: Generate the Application Key

Generate a secure application key:

Step 9: Clear Config Cache

Clear any cached configurations:

Final Steps

At this point, Invoice Ninja is installed and ready to configure in your browser. Ensure your NGINX configuration points to the /var/app/invoiceninja/public directory as the root. Restart PHP-FPM and NGINX to apply changes:

Troubleshooting

If you encounter any issues, ensure all dependencies are installed and check the NGINX and PHP-FPM logs for errors:

With this guide, you should have a fully functional Invoice Ninja setup on your Debian 12 Bookworm server. Enjoy managing your invoices efficiently!

Leave A Comment

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.