Full ALPR Database System for Blue Iris!

I have a small bat file I run through windows scheduler. only three lines:

net stop "CodeProject.AI Server"
timeout /t 120 /nobreak
net start "CodeProject.AI Server"
I'll give it a try. Thanks
 
Im running ALPR on a Linux Mint VM in Unraid and managed to tank my VM as well as my VM backup. I lost all my plates data. Oh well.

Ive got VM snapshot now which should make it easier to restore things.

Was wondering if there is an easy way to backup the ALPR database to another location and have option to restore.
 
Try running the following commands in the db container (per janhaus):

Code:
psql -d postgres -U postgres -f /docker-entrypoint-initdb.d/schema.sql

Code:
psql -d postgres -U postgres -f /docker-entrypoint-initdb.d/migrations.sql

If you get an error because there was no schema or migration file in the container, but you can see the file listed in the files tab for the container, see if there is a note with the word "mount." If so it means the container is accessing the file externally. If you copy the latest version of the file into your container and run the command again, it should work.

I get the no migration file error. It does say mount. How can I copy the latest version into the container? Using command prompt I always get "Error response from daemon: unlinkat /migrations.sql: device or resource busy". Even if the containers are stopped
 
Also, is anyone able to access the server remotely?

I can get the login page, but when putting in my password it just refreshes the page.

Blue iris and codeproject have no problems with accessing via local IP
 
What is mean is that locally, when I try and log in using the local ip address, I get the login page, prompting for a password, but it won't log me in.
It sounds like a firewall issue. You need to create an inbound and outbound rule allowing the port you setup for the app (typically 3000).

Here's an example of mine. I'm using port 3001.

Screen Shot 2025-06-10 at 10.15.57 PM.png
 
It sounds like a firewall issue. You need to create an inbound and outbound rule allowing the port you setup for the app (typically 3000).

Here's an example of mine. I'm using port 3001.
I tried and still no go

Logging into the ALPR database only works on the local machine it is running on.

Here is my error log, **** replacing session IDs

6/11/2025, 8:55:50 AM [WARN] No whitelisted IPs configured
6/11/2025, 8:55:50 AM [INFO] No session or IP not whitelisted, redirecting to /login.
6/11/2025, 8:55:50 AM [INFO] GET /login
6/11/2025, 8:55:51 AM [INFO] Middleware checking path: /login, Session ID from cookie: null
6/11/2025, 8:55:59 AM [INFO] GET /
6/11/2025, 8:55:59 AM [INFO] Middleware checking path: /, Session ID from cookie: null
6/11/2025, 8:55:59 AM [INFO] No session ID found in cookie. Checking IP whitelist or redirecting to login.
6/11/2025, 8:55:59 AM [INFO] POST /api/verify-whitelist
6/11/2025, 8:55:59 AM [INFO] Checking IP: 172.18.0.1
6/11/2025, 8:56:03 AM [INFO] Attempting login...
6/11/2025, 8:56:03 AM [INFO] Session limit reached. Removing oldest session: ****************
6/11/2025, 8:56:03 AM [INFO] Created session ID: ****************
6/11/2025, 8:56:04 AM [ERROR] Login error: Error: NEXT_REDIRECT
 
Not sure what is going on but if you go into the HomeAssistant tab and add the IP address of your docker container (172.18.0.1) to the whitelist it should work.

Screen Shot 2025-06-11 at 3.38.35 PM.png
 
Im running ALPR on a Linux Mint VM in Unraid and managed to tank my VM as well as my VM backup. I lost all my plates data. Oh well.

Ive got VM snapshot now which should make it easier to restore things.

Was wondering if there is an easy way to backup the ALPR database to another location and have option to restore.

Yes, there is a way to backup and restore the database, but it's very manual.

To backup a database:

pg_dump -U postgres -d postgres > dump-filename.sql

To restore it, the DB should be empty, so drop it:

dropdb -U postgres postgres

and then create an empty database:

createdb -U postgres postgres

then copy the backup over via docker cp

now use that file to re-create the database:

psql -U postgres -d postgres -f dump-filename.sql

Check if the entries in the db is correct from the app

Would you like to see an easy button for this? If so, up vote this: Backup and restore · algertc ALPR-Database · Discussion #42