I am trying to install the latest Invoice Ninja from the terminal. I have tried several guides, and none seem to produce results…
The server is Debian 12. Tried PHP 8.1 and 8.2. All attempts were on Apache2
These are the guides I followed, all on fresh installs…
Install Invoice Ninja v5 on Ubuntu 20.04
If you are self-hosting, installing on Ubuntu is the best possible method, and highly suggested. Running Ubuntu as a host allows you to install with the least amount of effort, fewer dependencies, and auto-update the application through the admin portal user interface. The ‘invoiceninja.zip’ package that is compiled by the Invoice NInja team every release has many dependency packages bundled into it, but it is only compatible with Ubuntu, and maybe oth…
# This is a basic tutorial for a
# default installation of a InvoiceNinja instance on Ubuntu
# You can also find this and report a bug on https://github.com/jameskimmel/InvoiceNinja-V5-on-Ubuntu
# update and upgrade
sudo apt update && sudo apt upgrade -y
# optional step for QEMU VM
sudo apt install qemu-guest-agent -y
# install dependencies
# At the time of writing this, Ubuntu 22.04 uses PHP 8.1
# install php
sudo apt install php-fpm -y
# install php extensions
sudo apt install php-{bcmath,ctype,fileinfo,json,mbstring,pdo,tokenizer,xml,curl,zip,gmp,gd,mysqli,mysql} -y
# check PHP
This file has been truncated. show original
InvoiceNinja is an open-source, self-hosted invoice software, a low-cost alternative to commercial online invoice platforms such as Freshbooks. Learn how to install InvoiceNinja on Ubuntu 20.04
Est. reading time: 10 minutes
Can someone please give me some direction that actually gets me somewhere…
hillel
November 26, 2023, 8:34am
2
Hi,
Are you seeing a specific error?
I managed to come right through trial and error and just dumb luck.
I now have the entire process scripted in Bash, even the /public/setup part including testing PDF, DB and Email.
If anyone wants, I can share my script with them.
Also discovered a lot of uses for artisan… like A LOT of VERY useful things.
I am very much interested in your bash script if you don’t mind sharing.
I’m in the process of trying to build a new ansible playbook to install invoiceninja now.
Thanks in advance!
Sure, I will stick it on my Git Server for you…
Would this script work on Ubuntu and what does it assume is already in place on a fresh OS install? (Docker already present etc)
Thanks!
Ubuntu should work, though I never tested it.
It is a blank server with nothing installed except the system tools installed by the ISO. You can install SSH if you want.
It will install Apache2 and configure it, PHP8.2-FPM + modules and configure it, MariaDB and harden it, Optional Let’s Encrypt Certificate, and Invoice Ninja. When done, you can just open your browser to Invoice Ninja and log on.
1 Like
Must be run as root or sudo
I am busy downloading Ubuntu Server 22.04 and 23.10. Will set them both up and do a test run and post here the results.
2 Likes
Awesome! Please report back on Ubuntu. And I am willing to try it also.
Realized I mentioned docker above…mixing up the methods to install this. I definitely want to try your script. Thanks for sharing it!
My script will not touch any docker installation or containers, so if you have docker installed it is fine, but if you have any vhosts setup in Apache, or you are running a different webservice, you will run into trouble
It fails at the command a2dismod php8.2 (EXIT CODE: 1)
I am investigating why
1 Like
Even though the script explicitly runs apt -y install php8.2-{mods,go,here} it has install php8.3.
Figured it out… seems all PHP versions come preinstalled on ubuntu. This is why I prefer Debian, no bloat preloaded. I have patched the script and I am testing again.
1 Like
Awesome! appreciate your updates.
Earlier we were having electricity issues, on and off on and off… now it is Shabbos so I will continue on Saturday night or Sunday.
We are going into a winter storm here also. Stay safe! Look forward to your updates.