How to Install Invoice Ninja on Windows 11
This tutorial will guide you through the steps to install Invoice Ninja on a Windows 11 operating system. Invoice Ninja is an open-source invoicing and accounting software that allows businesses to create, send, and manage invoices.
Before starting, you will need:
- A web browser
- PHP 7.3 or later
- A web server such as Apache or IIS
- MySQL or MariaDB
Step 1: Download and Extract Invoice Ninja
- Go to the Invoice Ninja website and click on the "Download" button.
- Select the self-hosted option and save the file to your computer.
- Extract the downloaded files to the desired location on your computer.
Step 2: Configure the Web Server
- Open the Apache or IIS configuration file.
- Add the following lines to the server's configuration file before any other virtual hosts:
<VirtualHost *:80>
ServerName invoices.example.com
DocumentRoot /path/to/invoiceninja/
<Directory /path/to/invoiceninja/>
Options FollowSymLinks
AllowOverride All
Require all granted
</Directory>
</VirtualHost>
Note: Replace invoices.example.com with your actual domain name and replace /path/to/invoiceninja/ with the path to the Invoice Ninja directory on your computer.
- Save the configuration and restart the web server.
Step 3: Create a Database
- Open your MySQL or MariaDB command-line client.
- Create a new database for Invoice Ninja:
CREATE DATABASE `invoiceninja_db`;
Note: Replace invoiceninja_db with your desired database name.
- Create a new user and grant privileges to the database:
CREATE USER `invoiceninja_user`@`localhost` IDENTIFIED BY 'password';
GRANT ALL PRIVILEGES ON `invoiceninja_db`.* TO `invoiceninja_user`@`localhost`;
Note: Replace invoiceninja_user with your desired username and replace password with your desired password.
- Exit the command-line client.
Step 4: Configure Invoice Ninja
- Open the
env.examplefile located in the Invoice Ninja directory and copy its contents. - Create a new file named
.envin the Invoice Ninja directory and paste the copied contents into the file. - Update the following variables in the
.envfile:
APP_URL=http://invoices.example.com
DB_CONNECTION=mysql
DB_HOST=127.0.0.1
DB_PORT=3306
DB_DATABASE=invoiceninja_db
DB_USERNAME=invoiceninja_user
DB_PASSWORD=password
Note: Replace http://invoices.example.com with your actual domain name and replace the database variables with the values you used in Step 3.
- Save the
.envfile.
Step 5: Install Invoice Ninja
- Open a terminal or command prompt and navigate to the Invoice Ninja directory.
- Install the dependencies using the following command:
composer install --no-dev
- Generate the application key:
php artisan key:generate --force
- Run the migration:
php artisan migrate
- Seed the database:
php artisan db:seed
Step 6: Access Invoice Ninja
- Open a web browser and navigate to your Invoice Ninja domain, for example,
http://invoices.example.com. - Follow the on-screen instructions to complete the installation process and start using Invoice Ninja.
Congratulations, you have successfully installed Invoice Ninja on Windows 11!