I couldn’t actually verify the repo/license from here — `dock-it.dev` did not resolve through the tools I have. So I’m using the safest default: **All Rights Reserved**. That means nobody gets reuse rights unless you explicitly grant them later with a real `LICENSE` file.
A local maintenance script for self-hosted Invoice Ninja installations.
**DelableInvoiceNinja** is intended to help server administrators apply local white-label customization changes to their own self-hosted Invoice Ninja instance **only when they are authorized to do so**.
> ⚠️ This project is not a free white-label license, not an Invoice Ninja license generator, and not a tool for bypassing Invoice Ninja’s commercial licensing terms.
---
## Important Legal Notice
Invoice Ninja offers self-hosted builds, but removing Invoice Ninja branding from client-facing parts of the app may require a valid Invoice Ninja white-label license or other written authorization from Invoice Ninja LLC.
Before using this project, you are responsible for making sure you have the required permission, license, or authorization from Invoice Ninja LLC.
Do **not** use this project to bypass payment, licensing, white-label requirements, subscription checks, feature restrictions, or any other commercial controls.
---
## What This Project Does
This project is designed for administrators who run their own self-hosted Invoice Ninja instance and want to automate local customization work after install or update.
Depending on your script version, this may include:
* Creating a backup of the target Invoice Ninja file before modification
* Locating specific Invoice Ninja source-code functions
* Applying local patch changes
* Running a PHP syntax check before replacing the file
If that does not fix the issue, restore your full Invoice Ninja backup or VM/container snapshot.
---
## Updating Invoice Ninja
Invoice Ninja updates may overwrite modified files.
After updating Invoice Ninja:
1. Verify your white-label/license status
2. Review the updated source file
3. Re-run the patch only if it is still compatible
4. Check the logs
5. Test invoices, quotes, client portal pages, emails, and PDFs
Do not blindly apply patches across major Invoice Ninja updates. Internal function names and behavior may change.
---
## Docker Notes
If you run Invoice Ninja in Docker, changes made inside a running container may be lost when the container is recreated.
For Docker deployments, consider one of these approaches:
* Use Invoice Ninja’s supported license configuration where applicable
* Build a custom image
* Mount a controlled override file
* Apply the patch as part of your container startup process
* Keep a documented rollback path
Be careful when patching live containers.
---
## Security Notes
This script modifies application source code and runs with elevated permissions.
Review the code before running it.
Do not run scripts from the internet as root unless you understand exactly what they do.
Recommended safety practices:
* Run only on your own server
* Review the diff before applying changes
* Keep backups
* Test on a staging instance first
* Restrict file permissions
* Do not expose patch scripts publicly on production servers
* Remove the script from the server after use if it is no longer needed
---
## Compatibility
This project may break when Invoice Ninja changes its internal file structure.
Known assumptions:
* Invoice Ninja is installed at `/var/www/invoiceninja`
* The target file exists at `app/Models/Account.php`
* The expected PHP functions still exist
* The web server user is `www-data`
* PHP CLI is installed
* Laravel Artisan commands are available
If any of these assumptions are wrong, edit the script before use.
---
## Troubleshooting
### `Must be run as root`
Run the script with `sudo`:
```
sudo python3 delable_invoiceninja.py
```
### `File missing`
Check your Invoice Ninja install path and update `FILE_PATH`.
### `Invalid Account.php file structure`
Your Invoice Ninja version may have changed. Do not force the patch. Review the file manually first.
### `PHP syntax check failed`
The script detected invalid PHP and did not install the patched file. Check the generated temp file and logs.
### Cache clear failed
Run manually:
```
cd /var/www/invoiceninja
sudo -u www-data php artisan optimize:clear
```
### Patch disappears after update
Invoice Ninja updates can overwrite modified files. Re-check compatibility before reapplying.
---
## Responsible Use
This project should only be used in environments where the administrator has the right to make the intended changes.
You should not use this project to:
* Avoid paying for a white-label license
* Misrepresent Invoice Ninja as your own software
* Remove required attribution without permission
* Resell Invoice Ninja hosting without authorization
* Circumvent licensing or commercial restrictions
Support the developers of Invoice Ninja by purchasing the proper license when required.
---
## Legal Disclaimer
This project is an unofficial, third-party tool intended only for use by administrators of self-hosted Invoice Ninja installations who are authorized to modify their own server files.
This project is not affiliated with, endorsed by, sponsored by, or approved by Invoice Ninja LLC. “Invoice Ninja” and related names, marks, and branding belong to their respective owners. Use of those names in this project is for identification and compatibility purposes only.
Invoice Ninja’s self-hosted software is provided under Invoice Ninja’s applicable license and self-hosting terms. Self-hosted users may be able to modify and extend the source code, but removing Invoice Ninja attributions, branding, or other client-facing marks may require a valid white-label license or written authorization from Invoice Ninja LLC.
Users are solely responsible for reviewing and complying with Invoice Ninja’s current Terms of Service, self-hosting terms, license terms, trademark rules, and any other applicable agreements before using this project.
This project must not be used to bypass payment, licensing, white-label requirements, feature restrictions, subscription checks, or any other commercial controls unless the user has explicit authorization from Invoice Ninja LLC or a valid license that permits such use.
The maintainers of this project do not provide legal advice and make no representation that use of this project is lawful in any particular jurisdiction or situation. By using this project, you accept full responsibility for your own compliance with all applicable laws, licenses, contracts, and terms of service.
Do not use this project to resell, rebrand, white-label, host, bundle, or commercially offer Invoice Ninja as your own SaaS or service unless you have the required agreement or license from Invoice Ninja LLC.
Use at your own risk. The maintainers are not responsible for broken installations, lost data, failed updates, license violations, account issues, legal claims, or any other damages resulting from use or misuse of this project.
This repository is currently distributed under an **All Rights Reserved** license unless a separate `LICENSE` file states otherwise.
You may not copy, redistribute, sublicense, sell, repackage, or publish modified versions of this project without permission from the repository owner.
This project’s license does not override Invoice Ninja’s license, Terms of Service, trademark rights, white-label requirements, or any agreement you may have with Invoice Ninja LLC.