LogicBit Inventory / Account Management System — Complete Business Stock & Accounting Platform
by LBS Market in MongoDB
- React 19
- React Router 7
- Vite 8
Self-hosted business-listing & booking platform for garages, auto parts, rentals, washing centers & more
install.sh, update.sh, backup.sh, restore.sh, and setup-smtp.sh)|
File / folder
|
What it is
|
|---|---|
AutoHub.zip |
The application. Upload this to your server.
|
documentation/index.html |
This documentation.
|
licensing/ |
Licence terms and third-party credits.
|
README.txt |
Quick start.
|
AutoHub.zip:|
You need
|
Details
|
|---|---|
|
A VPS with root access
|
Ubuntu 22.04 / 24.04 or Debian 12, 2 GB RAM or more (the first build needs it) and some free disk space. Shared or cPanel hosting will not work.
|
|
A domain
|
Two DNS A records pointing at the server's IP:
app.yoursite.com (the website) and api.yoursite.com (the API). Both names must share one parent domain, because the login cookie needs it. |
|
Free ports
|
80 and 443.
|
|
Google Maps key
|
Your own key (Google Cloud), restricted to your site address. Maps do not work without it.
|
|
An email account (SMTP)
|
For password reset and email confirmation. You can add it after installing.
|
Note: The installer installs Docker for you if it is missing. Images are built on your server, so the first install takes 5 to 15 minutes, depending on the server.
AutoHub.zip. On your computer (PowerShell on Windows, Terminal on Mac or Linux), in the folder that holds it:
scp AutoHub.zip root@YOUR_SERVER_IP:/root/Then log in to the server, install unzip and unpack the file into /opt. This creates the folder /opt/autohub:
ssh root@YOUR_SERVER_IP
apt-get update && apt-get install -y unzip
cd /opt && unzip /root/AutoHub.zip
cd /opt/autohubIf you log in as a normal user instead of root, put sudo in front of apt-get and unzip. Everything below is run from inside /opt/autohub.
sudo bash install.sh yoursite.com you@email.comRun it without arguments and it asks for the domain and your email instead.
.env with fresh random secrets, builds and starts the site, waits until it is healthy, checks the HTTPS addresses and schedules a daily backup at 02:00.install-credentials.txt.Note: The installer is safe to run again. It never replaces an existing.envand never touches the database.
Important: Always start the scripts withsudo bash(for examplesudo bash install.sh), not./install.sh.
|
Option
|
What it does
|
|---|---|
--app-domain HOST |
Use HOST for the website instead of
app.<domain>. |
--api-domain HOST |
Use HOST for the API instead of
api.<domain>. Both names must share one parent domain. |
--dry-run |
Show what would happen; change nothing.
|
--yes, -y |
Never ask questions. The domain and email are then required as arguments.
|
--skip-checks |
Skip the system, port and DNS checks.
|
--skip-docker-install |
Do not install Docker; stop if it is missing.
|
--no-verify |
Do not wait for the HTTPS check at the end.
|
--no-backup |
Do not schedule the daily backup (see Backup & restore).
|
--help, -h |
Show the help text.
|
https://app.yoursite.com/install.Note: The web installer creates only the admin. Email, Google/Facebook login and AI keys stay in.env(see Email (SMTP)).
sudo bash setup-smtp.sh (next section)..env as NEXT_PUBLIC_GOOGLE_MAPS_API_KEY, then run sudo docker compose up -d --build frontend..env in a safe place. It holds your database password and JWT secret.backups folder off the server now and then (see Backup & restore).Note: Settings starting withNEXT_PUBLIC_andCSP_MODEare built into the website. After changing one, rebuild withdocker compose up -d --build. Other settings only needdocker compose up -d.
sudo bash setup-smtp.sh.env and restarts the API only. The password is typed hidden and never printed. It keeps a copy of .env first (.env.bak-<date>, readable by root only), tests the connection, and prints a clear error if the login fails. Run it again any time; press Enter to keep a saved value. Use --no-restart to apply the change later with docker compose up -d --force-recreate backend.smtp.gmail.com, port 587, and an app password (Google account → Security → 2-Step Verification → App passwords). Your normal Gmail password does not work.Note: WithREQUIRE_EMAIL_VERIFICATION=true(the default), new users must confirm their email before logging in. Keep SMTP working, or nobody can sign up. The admin created by the web installer is exempt.
sudo bash update.shsudo bash update.sh /opt/autohub. It then:previous-version/ and copies the new ones in;.env.example to your .env without changing your values (a copy is saved as .env.bak-update-<date>);previous-version/ and the unpacked update folder.|
Option
|
What it does
|
|---|---|
--dry-run |
Show what would happen; change nothing.
|
--yes |
Never ask questions. It does not delete anything by itself.
|
--clean |
Delete the old version and the unpacked update folder after a successful update (skipped if the HTTPS check fails).
|
--skip-backup |
Skip the backup. Not recommended.
|
--no-verify |
Do not wait for the HTTPS check.
|
Note: Your data is kept. The update replaces all program files, but never deletes.env,backups/orinstall-credentials.txt. The database and uploaded images live in Docker volumes and are untouched. Deleting.envwould make Postgres reject its password and sign everyone out.
Note: If you editeddocker-compose.ymlordeploy/Caddyfile, the update overwrites them. Your old copy is inprevious-version/.
backups/, and the old program files are in previous-version/. The new files are not removed automatically, so go back like this, inside the install folder:sudo cp -a previous-version/. .sudo docker compose up -d --buildWait a minute, then check sudo docker compose ps: the API should say healthy.
backups/:
sudo bash ops/backup/restore.sh restore backups/<the .dmp file> backups/<the uploads .tar.gz file>sudo docker compose logs --tail 50 backend. If you cannot tell, send that output to support./etc/cron.d/autohub-backup, and logs what it did to backups/backup.log. To change the time, edit that file; to stop the daily backup, delete it. Run a backup by hand at any time from the install folder:sudo bash ops/backup/backup.shbackups/: the database (autohub-<date>.dmp) and the uploaded images (autohub-uploads-<date>.tar.gz). A failed or empty backup is deleted and reported as an error, so a broken file never looks valid. Backups older than 14 days are removed.|
Setting (environment variable)
|
What it does
|
|---|---|
BACKUP_DIR |
Where backups go (default
./backups). |
KEEP_DAYS |
Delete local backups older than this (default 14).
|
GPG_RECIPIENT |
Encrypt every file for this GPG key before storing it.
|
RCLONE_REMOTE |
Also copy every file off the server with rclone, e.g.
r2:autohub-backups. |
--no-backup, or cron was not available? Schedule it yourself: open root's crontab with sudo crontab -e and add (change the folder to yours):0 2 * * * cd /opt/autohub && bash ops/backup/backup.sh >> backups/backup.log 2>&1Note: The backup holds real user data (emails, password hashes, chats). Thebackups/folder is readable by root only, so usesudoto list it. Encrypt (GPG_RECIPIENT) any copy that leaves the server. The backup does not contain.env: keep a separate private copy of it.
sudo bash ops/backup/restore.sh verify backups/autohub-YYYYMMDD-HHMMSS.dmpsudo bash ops/backup/restore.sh restore backups/autohub-YYYYMMDD-HHMMSS.dmp backups/autohub-uploads-YYYYMMDD-HHMMSS.tar.gz.gpg files must be decrypted first: gpg --decrypt file.gpg > file.backups/ folder..env, the old secrets can be reused; otherwise users simply have to sign in again.https://app.yoursite.com/admin/login with the account you created in the web installer.|
Area
|
What you do there
|
|---|---|
|
Dashboard
|
Overview of the site.
|
|
Review
|
Approve or reject new business listings before they go public. Open a listing to check every field the owner submitted.
|
|
Listings
|
Open and manage every listing.
|
|
Users
|
See users, change roles, ban or unban. A broadcast button sends one email to every user (banned accounts are skipped), so SMTP must work.
|
|
Categories
|
Add and edit the service categories.
|
|
Chats
|
Watch the visitor chats on listings.
|
|
Audit log
|
Who did what and when: sign-ins, failures, lockouts, password resets, role and ban changes, approvals and announcements.
|
|
Settings
|
The homepage hero images (add or remove) and the entry popup ad (upload its image and switch it on or off).
|
sudo bash create-admin.sh/install stays locked..env, and lets the owner take over.|
What they can do
|
How it works
|
|---|---|
|
Find a business
|
The home page shows hero images, the categories you added and nearby businesses.
/listings lists every approved business, with a search by location and filters for category, minimum rating, price and open now, plus a map view (the map needs your Google Maps key). |
|
Read a listing
|
Each business has its own page: photo gallery, description, services, amenities, opening hours, call and WhatsApp buttons, social links, a map, reviews and, if the owner added any, products.
|
|
Book or send an enquiry
|
The Book button opens a form: date, time, service and contact name, phone and email. Guests can book without an account if they give their contact details. The owner confirms or declines the request, and the visitor can cancel it. Booking emails are sent when SMTP is set up. The form is rate-limited to 5 requests a minute.
|
|
Review a business
|
Logged-in visitors give 1 to 5 stars and a comment. One review per business per person, and owners cannot review their own business. The business's average rating updates automatically.
|
|
Chat
|
A chat button answers questions about a business or finds the closest one. See Chat assistant.
|
|
Account
|
Sign up with email and password, or with Google or Facebook if you set them up. With
REQUIRE_EMAIL_VERIFICATION=true the email must be confirmed before the first login. Forgotten passwords are reset by an emailed link. A user can edit or delete their own account. |
|
Contact you
|
The contact page sends a message to
CONTACT_INBOX_EMAIL, and admins can read the messages. |
/register). The form has five steps: Business Details, Location & Contact (the address is searched and placed on the map), Services Offered, Hours & Amenities and Review & Submit.Note: A new listing is pending and invisible to visitors until you approve it under Admin → Review.
|
Dashboard page
|
What the owner does there
|
|---|---|
/dashboard |
Their listings and their status, editing details and photos (a photo can be removed), and their account.
|
|
Bookings (
/dashboard/bookings) |
"Booking Requests": see each request and confirm or decline it. The customer is emailed.
|
|
Customers (
/dashboard/customers) |
People who booked or reviewed this business. The owner can send one customer a personal email, or send an announcement to all of them or to chosen customers. Replies go to the owner's own email address.
|
|
Chats (
/dashboard/chats) |
Visitor chats on the owner's listings. Read, reply and end them. See Chat assistant.
|
/dashboard/chats); admins open Chats in the admin panel. The list refreshes by itself every 5 seconds while the page is open.AI_PROVIDER=none). To turn it on, set AI_PROVIDER (openai, anthropic or groq) and the matching key in .env, then run sudo docker compose up -d. See Settings reference (.env). The AI is asked only when the built-in rules found no match. If it is off, slow or failing, the visitor gets the normal general reply, so the chat never breaks. Using a provider costs money on your account with it, and the visitor's question is sent to that provider, so mention it in your privacy policy..env in the install folder. Edit it as root, then run sudo docker compose up -d (rebuild with --build for NEXT_PUBLIC_* and CSP_MODE).|
Setting
|
Meaning
|
|---|---|
APP_DOMAIN, API_DOMAIN |
Website and API names. One parent domain, both pointing at this server. Required.
|
ACME_EMAIL |
Email for certificate expiry notices. Required.
|
POSTGRES_PASSWORD |
Database password (letters and digits). Never change it after the first start.
|
JWT_SECRET |
Login signing secret, 32+ characters. Changing it signs everyone out.
|
SETUP_CODE |
One-time code for the web installer (16+ characters). Stops working once an admin exists.
|
SMTP_HOST, SMTP_PORT, SMTP_SECURE, SMTP_USER, SMTP_PASS, MAIL_FROM |
Outgoing email. Set with
setup-smtp.sh. |
CONTACT_INBOX_EMAIL |
Where contact-form messages go.
|
REQUIRE_EMAIL_VERIFICATION |
true (default): new users confirm their email before logging in. |
GOOGLE_CLIENT_ID, GOOGLE_CLIENT_SECRET |
Optional Google login. Redirect address:
https://api.yoursite.com/auth/google/callback. |
FACEBOOK_APP_ID, FACEBOOK_APP_SECRET |
Optional Facebook login. Redirect address:
https://api.yoursite.com/auth/facebook/callback. |
AI_PROVIDER, AI_MODEL, OPENAI_API_KEY, ANTHROPIC_API_KEY, GROQ_API_KEY |
Optional AI chat replies.
AI_PROVIDER is none (default), openai, anthropic or groq; fill in the matching key. |
NEXT_PUBLIC_GOOGLE_MAPS_API_KEY |
Your Google Maps key, restricted to your site address. Needs a rebuild.
|
NEXT_PUBLIC_ANALYTICS_PROVIDER and related |
Optional:
ga4 (with NEXT_PUBLIC_GA_MEASUREMENT_ID) or plausible (with NEXT_PUBLIC_PLAUSIBLE_DOMAIN), or blank for none. Needs a rebuild. |
CSP_MODE |
report-only (default) logs what the security policy would block; enforce blocks it. Needs a rebuild. |
Note: LeaveIMAGE_PREFIXandIMAGE_TAGunset: they are only for the developer's deployment pipeline.
.env private. It holds the database password and JWT secret. Never email it or put it in git.sudo apt update && sudo apt upgrade) and the database port closed to the internet.sudo docker compose exec backend npm run prune-audit-log -- --days=365 --confirm.JWT_SECRET (everyone is signed out) and any SMTP or API keys they knew.CSP_MODE=enforce (see docs/DEPLOYMENT.md).|
Problem
|
What to do
|
|---|---|
command not found when running a script |
Start it with
sudo bash script.sh. |
|
The installer complains about DNS, or HTTPS does not work
|
Check both A records point at this server, ports 80 and 443 are open, and wait for DNS to spread. Run the installer again; it is safe.
|
|
The build is killed or very slow
|
The server has too little memory. Use 2 GB RAM or more.
|
/install shows "not found" (404) |
An admin already exists (the page locked itself), or
SETUP_CODE is shorter than 16 characters. |
|
"Too many attempts" (429) in the web installer
|
Wait one minute; 5 attempts per minute are allowed.
|
ls backups says permission denied |
The folder is root-only. Use
sudo. |
|
No emails arrive, or "Invalid login"
|
Run
sudo bash setup-smtp.sh again. For Gmail use an app password, not your normal password. |
|
New users cannot log in
|
With
REQUIRE_EMAIL_VERIFICATION=true they must confirm their email first, so SMTP must work. |
|
A
NEXT_PUBLIC_ change has no effect |
Rebuild:
sudo docker compose up -d --build. |
|
The database rejects its password, or everyone is signed out
|
.env was replaced or edited. Restore your saved copy. Never regenerate it on a running site. |
|
The category filter or home page categories are empty
|
The installer adds nine starter categories when the admin account is created. If they were deleted, add yours under Admin → Categories.
|
|
I forgot the admin password
|
Use Forgot password on the login page, or run
sudo bash create-admin.sh (see Admin panel tour). |
|
No backups appear in
backups/ |
Check that
/etc/cron.d/autohub-backup exists and read sudo tail backups/backup.log. If you installed with --no-backup, schedule it yourself (see Backup & restore). |
|
A new business does not appear on the site
|
It is waiting for approval. Open Admin → Review and approve it.
|
|
The chat answers every unknown question with the same general reply
|
That is the built-in assistant. Turn on AI answers if you want more: see Chat assistant.
|
|
An update failed
|
If the configuration check fails, the update restores the old files itself. If the rebuild fails or the API is not healthy after 5 minutes, it prints the steps to go back: see If an update fails. Your old files are in
previous-version/ and a backup is in backups/. |
sudo docker compose ps and sudo docker compose logs -f backend (press Ctrl+C to stop).db (PostgreSQL 16), backend (port 3001, health check at /health), frontend (port 3000), caddy (HTTPS). Volumes: pgdata, uploads, caddy_data, caddy_config.npm run start:prod:migrate: it applies database migrations, then starts. sudo docker compose ps
sudo docker compose logs -f backend
sudo docker compose restart backend
sudo docker compose exec db psql -U autohub -d autohubdocs/: DEPLOYMENT.md, SECURITY.md and TESTING.md.--app-domain and --api-domain for names other than app. and api..APP_DOMAIN and API_DOMAIN in .env, point DNS at the server, then run sudo docker compose up -d --build.pgdata for the database, uploads for images), not in the program folder.licensing/ folder.cat VERSION) and what you were doing;sudo docker compose logs backend.Note: Never send your.env, passwords, setup code or backup files.
create-admin.sh to create an admin or reset its password, and nine starter categories added when the admin account is created.Item support includes: answering questions about how to use the item, help with reported bugs and issues, and help with included third-party assets.
Item support does not include: customization and installation services, or support for third-party plugins.
by LBS Market in MongoDB
by LBS Market in AI Tools
by LBS Market in Next.js
by LBS Market in Next.js
LogicBit AutoHub — The Ultimate Auto Services Business Directory Platform (Next.js + NestJS + PostgreSQL)
Pay via eSewa, Khalti, Fonepay or bank transfer. Send the purchase request and we will email you the payment details and your license within a few hours.