Home Forums Support Invoice Ninja on A Raspberry Pi?

This topic contains 13 replies, has 5 voices, and was last updated by  theFlash 1 month ago.

Viewing 14 posts - 1 through 14 (of 14 total)
  • Author
    Posts
  • #14435

    theFlash
    Participant

    Anyone tried running Invoice Ninja on a Raspberry Pi? Would it be possible?

    #14441

    Mikey242
    Participant

    Haven’t tried it but I would have thought it was possible. Like many web apps, the raspberry pi can often run them but with reduced performance compared to conventional server hardware.

    #14443

    Titanfail
    Participant

    As long as you can find ARM-compatible builds for all the prerequisites (PHP, MySQL, Apache/nginx, etc.) It should run just fine. I’ve run it on a pretty low-tier Debian VM before and had no issues.

    I’d recommend a Pi3 and the ARM port of Debian (use the netinst image to get a bare-bones install). The main place I see performance possibly being an issue is if you have a large database to query against. The application itself should be fine, though.

    #14446

    theFlash
    Participant

    Thanks. Not sure I’m up to speed enough on the Linux side of things, but may give it a go. I may have compounded things by buying a Pi3B+, for which there seems to be few official Linux builds at the moment.

    Ideally I’d like officially supported distro’s so that I don’t have problems with updates etc.

    Being slighlty more familiar with Ubuntu, I’ve found this page, which appears, if I’m reading it correctly, to give details on how to edit the Pi2 distro of Ubuntu to install ubuntu 18.04 on a Pi3B+. I’m not sure yet of the difference between ARMHF and ARM64 in terms of ease of installation or performance:

    https://wiki.ubuntu.com/ARM/RaspberryPi

    Anyy helpful comments most welcome! I suspect, if it spossible, there are quite a few people who may want to run Invoice Ninja this way (rather than using VM’s).

    #14460

    Mikey242
    Participant

    I would definitely use Rasbian if I were you. It’s the official OS for the raspberry pi and is well optimized and runs really well. It is also based on Debian (like Ubuntu), so if your more comfortable with Ubuntu this is the one to use. There is also a lot of support out there for using Rasbian.

    Raspbian

    I would go with Raspbian Stretch Lite as the normal one includes a lot of extras you won’t need.

    #14463

    theFlash
    Participant

    Thanks Mikey242. If that works it will save a lot of fiddly work as it looks like the Raspberry users are still waiting for others to update their official distro’s to run on the new Pi3B+.

    I’ll try that once I’ve ordered Pi power supply I’ve just lost.

    I’m surprised there appears to be no posts on this forum of others that have tried this – perhaps its so easy its not worth these posts (wishful thinking).

    #14464

    Mikey242
    Participant

    Yeah I’ve used Raspbian to host a number of web apps and it seems to work well enough. I would recommend you install a nginx rather than apache. Nginx generally uses less resources (something you will need running on the pi).

    https://www.raspberrypi.org/documentation/remote-access/web-server/nginx.md

    Good luck and let us know how it goes!

    #14465

    theFlash
    Participant

    Just looking at this (may use Apache for other reasons)…does anyone know where I can find an up to date list of system requirements for installing Invoice Ninja?

    I used to refer to this page:
    http://docs.invoiceninja.com/en/latest/install.html

    Which, for Ubuntu/Apache refers to this page which appears quite outdated:
    http://blog.technerdservices.com/index.php/2015/04/techpop-how-to-install-invoice-ninja-on-ubuntu-14-04/

    If I want to install php 7.2 for example, what do we do about mcrypt?

    If anyone has a list of which libraries to install, that would be very handy.

    #14466

    Titanfail
    Participant

    Here’s the list I have. Although keep in mind this is just what I ended up installing on my initial setup many moons ago and I just wanted Composer to stop griping. Also, I THINK the mcrypt requirement was dropped a few versions back, but Hillel would be the one who would know for sure.

    • libapache2-mod-php
    • php-cli
    • php-gd
    • php-curl
    • php-mcrypt
    • php-dom
    • php-zip
    • php-mbstring
    • php-xml

    As for Apache vs nginx, for something like IN it really doesn’t make that much of a difference (that I’ve found) unless you have a huge database to query. My Debian server VM runs on a single core (Pi3 is a quad-core) with 1024mb of RAM and has zero issues. It might make a difference with Raspbian if you’re using the desktop, but if you’re just installing something with a command-line only setup, you should have plenty of breathing room.

    #14467

    theFlash
    Participant

    Thanks. I’ve got it working, but will do it all again tomorrow as I think I installed a load junk when trying to install a custom font I use (tried to install grunt/npm and got a load of errors).

    Regarding any custom fonts, it looks like, to avoid the above issue, I can just copy over any font files in invoice-fonts and also .js font files in js/vfs_fonts and then the PDF’s render as expected. Originally I had to do a sudo php artisan db:seed --class=FontsSeeder operation.

    I used php 7.0 (which is fine with mcrypt) and Raspian is now defaulting to MariaDB, so had to use that also.

    In fact, once I’ve installed the usual requirements, can’t I just copy the entire ninja directory from another (Ubuntu) working installation, then dump and import the matching database, and then add the two cron jobs? Or is it not that simple?

    #14470

    Titanfail
    Participant

    In theory it might work. But I’ve always been in the “fresh install is best install” camp when it comes to most things.

    As for MariaDB, if you install the MySQL .deb file, it should default to that instead of installing Maria. But technically Maria is a drop-in replacement, so there should be no differences whatsoever from a usage standpoint. That being said, I still went with MySQL just because.

    And the Pi should run off of just about any USB port, since it maxes out at like 6w (under full load). You could probably just use a phone charger, as most of those can do 10w easily.

    #15248

    ccall48
    Participant

    Backup your database and reinstall onto new system and upload the the database into the new installation should keep all you settings. I’ve done it a few times over the last few days when bulk importing csv files with data – i did a test rollback and upload of saved database and it worked fine.

    I’m also running trialing invoice ninja on a pi3.

    to backup your database (maria or mysql): mysqldump -u[mysql-username] -p[mysql-password] your_ninja_database > ninja_backup.sql

    #18447

    nnako
    Participant

    Hi @theflash, hi all,

    I’ve tried for several days to install any Invoicing Application on my Raspberry Pi. But I have not been succesful, yet, as the documentation regarding e.g. InvoicePlane v1.5.9 seems to be too lossy or I am just too stupid to make it hapen. As This seems to be best choices for Raspberrys, my favorite configuration would be:

    – NGINX web service
    – MARIADB database system
    – PHP v7.0 including all necessary extensions

    Would it be possible to post a “recipe” for successful installation of InvoiceNinja on a recent RaspberryPi?

    Thanks in advance.
    Nnako

    #18448

    theFlash
    Participant

    Hi Nnako,

    I went through testing various opensource invoicing apps, and in my opinion, you’ll find it well worthwhile installing/using Invoice Ninja. I’ll have to revisit the Pi install for more detail (and I intend to use it on the pi after the next upgrade, so will do it all again and update here), but in summary, hoping this doesn’t lead to more confusion, as I have a lots of notes, and may leave out something important:

    – Installed Raspbian Stretch Lite
    – Installed Apache/mysql/php
    – Installed composer
    – Created Ninja database
    – git cloned Invoice Ninja (see install docs)
    – composer install of above
    – changed file permissions (see install docs)
    – configured ninja.conf
    – installed any fonts I was using (optional)

Viewing 14 posts - 1 through 14 (of 14 total)

You must be logged in to reply to this topic.

Posted in: