BookCars
Overview
BookCars is a popular open-source, self-hosted car rental and booking platform built on the MERN stack. It gives you a complete rental business in one application.
The customer storefront lets visitors search and filter available cars, choose pick-up and drop-off locations and dates, and book and pay online. The administrator panel lets you manage suppliers, vehicles, locations, bookings and customers. A Node and Express REST API backed by MongoDB drives both, with multi-currency and multi-language support and online payment through Stripe or PayPal.
The SecureAnyCloud image installs BookCars natively (no Docker), pinned to release v8.7:
- MongoDB 8.0 runs as a single-node replica set (
rs0) bound to127.0.0.1, with key file internal authentication and authorization enabled. - The BookCars API is pre-built and managed by
bookcars-api.serviceon127.0.0.1:4002. - The customer storefront and admin panel are compiled to static bundles and served by nginx: the storefront on port 80 and the admin panel on port 8080. nginx reverse proxies
/apiand/cdnon both to the API. The compiled front ends therefore call the API on the same origin, and the appliance works by IP address or by your own domain with no rebuild.
Secure by default, no default login. The upstream project seeds a fixed default administrator, and this image never does. On first boot, a bookcars-firstboot.service oneshot generates a unique administrator, unique application secrets (BC_JWT_SECRET, BC_COOKIE_SECRET), and a unique MongoDB credential and key file. It initialises the database, creates exactly one administrator, writes the login to /root/bookcars-credentials.txt (readable only by root), and then disables itself. No shared password, database user or pre-seeded record exists in the image.
Bring your own payments and email. The appliance ships safe default values for Stripe, PayPal and SMTP, so the platform boots and serves fully without them. You add your own keys to enable live checkout and transactional email (covered below).
What you get:
- BookCars v8.7 installed natively on Ubuntu 24.04 LTS
- MongoDB 8.0 as a single-node replica set, loopback only, with key file authentication and authorization
- The Node API under systemd, and the storefront and admin panel served by nginx
- An OS patched at build time, with unattended security upgrades enabled
- 24/7 SecureAnyCloud support
Prerequisites
- An Azure subscription and the BookCars on Ubuntu 24.04 LTS image from the Azure Marketplace.
- A VM size with at least 2 vCPUs and 4 GB RAM (for example,
Standard_B2s). - Inbound access to port 80 (storefront) and port 8080 (admin panel), plus port 22 for SSH, in the VM's network security group. Add 443 if you enable HTTPS.
Deploy from the Azure Portal
- In the Azure Portal, choose Create a resource and select the BookCars image.
- Pick your resource group, region and a size such as
Standard_B2s. - Under Networking, allow inbound 80, 8080 and 22.
- Create the VM and wait for it to boot. First boot provisions the database, generates the per-instance secrets and creates your administrator.
Deploy from the Azure CLI
# Accept the Marketplace terms once per subscription (required before the first CLI deploy)
az vm image terms accept --urn sac1647283583153:bookcars-ubuntu-24-04:default:latest
az vm create \
--resource-group my-bookcars-rg \
--name bookcars \
--image sac1647283583153:bookcars-ubuntu-24-04:default:latest \
--size Standard_B2s \
--admin-username azureuser \
--generate-ssh-keys \
--public-ip-sku Standard
az vm open-port --resource-group my-bookcars-rg --name bookcars --port 80 --priority 900
az vm open-port --resource-group my-bookcars-rg --name bookcars --port 8080 --priority 910Connect via SSH
ssh azureuser@<vm-ip>Verify the services are running
MongoDB, the BookCars API and nginx start automatically after first boot. Confirm that they are active and listening:
sudo systemctl is-active mongod bookcars-api nginx ss -tln | grep -E ':27017 |:4002 |:80 |:8080 'You should see all three services active. MongoDB listens on 127.0.0.1:27017 and the API on 127.0.0.1:4002. nginx serves the storefront on :80 and the admin panel on :8080.
Secure by default, no admin ships
The image ships no known credential. On first boot, BookCars' database is initialised fresh, a unique administrator is created, and the login is written to a root-only file. MongoDB runs as a replica set with key file internal authentication and authorization enabled, bound to loopback.
Read your administrator login:
sudo cat /root/bookcars-credentials.txtThe file holds your storefront and admin URLs, the administrator email and the administrator password, all unique to this VM.
Sign in to the admin panel
Open the admin panel in your browser at http://<vm-ip>:8080/. The BookCars sign-in screen appears.
Sign in with the BOOKCARS_ADMIN_EMAIL and BOOKCARS_ADMIN_PASSWORD from the credentials file. You land on the administrator dashboard, where you manage bookings, cars, suppliers, locations and users.
You can also confirm the administrator credential from the command line. The API returns a signed JSON Web Token for the correct password and rejects a wrong one:
EMAIL=$(sudo grep '^BOOKCARS_ADMIN_EMAIL=' /root/bookcars-credentials.txt | cut -d= -f2-)
PASSWORD=$(sudo grep '^BOOKCARS_ADMIN_PASSWORD=' /root/bookcars-credentials.txt | cut -d= -f2-)
curl -s -X POST http://127.0.0.1/api/sign-in/admin \
-H 'Content-Type: application/json' \
-d "{\"email\":\"$EMAIL\",\"password\":\"$PASSWORD\",\"mobile\":true}" | grep -o accessTokenAn accessToken in the output confirms that the round trip succeeded.
Explore the customer storefront
Open the storefront at http://<vm-ip>/. This is your public car rental site, where customers search for cars by location and dates and complete a booking.
Add suppliers, locations and cars
From the admin panel, populate your catalogue. Create suppliers (the rental companies), locations (pick-up and drop-off points), and cars with their specifications, pricing and availability.
The cars view provides rich filters across rating, range, seats, gearbox, fuel policy, mileage and deposit, so your customers can find the right vehicle.
The runtime stack
Everything is reachable through nginx: the storefront on :80, the admin panel on :8080, and the API's /api and /cdn routes proxied to 127.0.0.1:4002.
The image is patched at build time and ships with unattended security upgrades enabled. The first-boot service disables itself after provisioning the per-instance state.
curl -s -o /dev/null -w 'storefront :80 -> %{http_code}\n' http://127.0.0.1/
curl -s -o /dev/null -w 'admin :8080 -> %{http_code}\n' http://127.0.0.1:8080/Enable payments and email
Live checkout and transactional email are configured in the backend environment file. The front ends are rebuilt into the static bundles. The backend file is /opt/bookcars/backend/.env.
- Stripe or PayPal: set
BC_STRIPE_SECRET_KEY(and the storefront'sVITE_BC_STRIPE_PUBLISHABLE_KEY), orBC_PAYPAL_CLIENT_IDandBC_PAYPAL_CLIENT_SECRET. Then restart the API withsudo systemctl restart bookcars-api. - SMTP email: set
BC_SMTP_HOST,BC_SMTP_PORT,BC_SMTP_USER,BC_SMTP_PASSandBC_SMTP_FROMfor booking confirmations and password resets.
The front-end payment keys are baked in at build time, so rebuild and redeploy the storefront after editing its .env:
cd /opt/bookcars/frontend && sudo npm run build && sudo cp -rf build/* /var/www/bookcars/frontend/Enable HTTPS
For production, put a domain and a TLS certificate in front of the appliance. Point your domain at the VM's public IP address, then use Certbot with the nginx plugin:
sudo apt-get update && sudo apt-get install -y certbot python3-certbot-nginx
sudo certbot --nginx -d your-domain.example.comCertbot obtains a certificate, configures nginx to serve the storefront over HTTPS on port 443, and renews the certificate automatically.
Managing the services
sudo systemctl status bookcars-api --no-pager sudo journalctl -u bookcars-api -n 20 --no-pager sudo systemctl is-active mongod nginxTo follow the API log live, run sudo journalctl -u bookcars-api -f.
To restart the API after a configuration change, run sudo systemctl restart bookcars-api.
The API logs to /var/log/bookcars-api.log. MongoDB data lives under /var/lib/mongodb and uploaded images under /var/www/cdn, both on the OS disk.
Support
Every SecureAnyCloud deployment includes 24/7 support. If you have any questions about this image, contact the SecureAnyCloud support team through the Azure Marketplace listing.
Deploy on Azure
Launch BookCars on Ubuntu 24.04 LTS on Azure with 24/7 support from SecureAnyCloud.
View this image
Need Help?
Our support team is available 24/7.
sales@secureanycloud.com
Overview
BookCars is a popular open-source, self-hosted car rental and booking platform built on the MERN stack. It gives you a complete rental business in one application.
The customer storefront lets visitors search and filter available cars, choose pick-up and drop-off locations and dates, and book and pay online. The administrator panel lets you manage suppliers, vehicles, locations, bookings and customers. A Node and Express REST API backed by MongoDB drives both, with multi-currency and multi-language support and online payment through Stripe or PayPal.
The SecureAnyCloud image installs BookCars natively (no Docker), pinned to release v8.7:
- MongoDB 8.0 runs as a single-node replica set (
rs0) bound to127.0.0.1, with key file internal authentication and authorization enabled. Its data directory is on a dedicated EBS data volume mounted at/var/lib/mongodb. - The BookCars API is pre-built and managed by
bookcars-api.serviceon127.0.0.1:4002. - The customer storefront and admin panel are compiled to static bundles and served by nginx: the storefront on port 80 and the admin panel on port 8080. nginx reverse proxies
/apiand/cdnon both to the API. The compiled front ends therefore call the API on the same origin, and the appliance works by public IP address or by your own domain with no rebuild.
Secure by default, no default login. The upstream project seeds a fixed default administrator, and this image never does. On first boot, a bookcars-firstboot.service oneshot generates a unique administrator, unique application secrets (BC_JWT_SECRET, BC_COOKIE_SECRET), and a unique MongoDB credential and key file. It initialises the database, creates exactly one administrator, writes the login to /root/bookcars-credentials.txt (readable only by root), and then disables itself. No shared password, database user or pre-seeded record exists in the image, and MongoDB is never exposed to the network.
Bring your own payments and email. The appliance ships safe default values for Stripe, PayPal and SMTP, so the platform boots and serves fully without them. You add your own keys to enable live checkout and transactional email (covered below).
What you get:
- BookCars v8.7 installed natively on Ubuntu 24.04 LTS
- MongoDB 8.0 as a single-node replica set, loopback only, with key file authentication and authorization, on a dedicated data volume
- The Node API under systemd, and the storefront and admin panel served by nginx
- A fully patched OS with unattended security upgrades enabled
- 24/7 SecureAnyCloud support
Connecting to your instance
Connect over SSH as the default login user for your operating system variant:
OS variant SSH login user
Ubuntu 24.04 ubuntu
ssh ubuntu@<public-ip>Launch the instance
- Subscribe to the BookCars listing in AWS Marketplace and choose Launch.
- Pick an instance type with at least 2 vCPUs and 8 GB RAM. The recommended type is
m5.large. - In the security group, allow inbound 80 (storefront), 8080 (admin panel) and 22 (SSH) from the addresses you will manage the instance from. Add 443 if you enable HTTPS.
- Launch, then wait for the instance to reach the running state. First boot provisions the database, generates the per-instance secrets and creates your administrator.
You can also launch from the CLI:
aws ec2 run-instances \
--image-id <bookcars-ami-id> \
--instance-type m5.large \
--key-name <your-key> \
--security-group-ids <sg-with-22-80-8080> \
--tag-specifications 'ResourceType=instance,Tags=[{Key=Name,Value=bookcars}]'Verify the services are running
MongoDB, the BookCars API and nginx start automatically after first boot. Confirm that they are active and listening:
sudo systemctl is-active mongod bookcars-api nginx ss -tln | grep -E ':27017 |:4002 |:80 |:8080 'You should see all three services active. MongoDB listens on 127.0.0.1:27017 and the API on 127.0.0.1:4002. nginx serves the storefront on :80 and the admin panel on :8080.
Secure by default, no admin ships
The image ships no known credential. On first boot, BookCars' database is initialised fresh, a unique administrator is created, and the login is written to a root-only file. MongoDB runs as a replica set with key file internal authentication and authorization enabled, bound to loopback.
Read your administrator login:
sudo cat /root/bookcars-credentials.txtThe file holds your storefront and admin URLs, the administrator email and the administrator password, all unique to this instance.
Sign in to the admin panel
Open the admin panel in your browser at http://<public-ip>:8080/. The BookCars sign-in screen appears. There is no default account. You sign in with the unique administrator generated on this instance.
Sign in with the BOOKCARS_ADMIN_EMAIL and BOOKCARS_ADMIN_PASSWORD from the credentials file. You land on the administrator dashboard, where you manage bookings, cars, suppliers, locations and users.
You can also confirm the administrator credential from the command line. The API returns a signed JSON Web Token for the correct password and rejects a wrong one:
EMAIL=$(sudo grep '^BOOKCARS_ADMIN_EMAIL=' /root/bookcars-credentials.txt | cut -d= -f2-)
PASSWORD=$(sudo grep '^BOOKCARS_ADMIN_PASSWORD=' /root/bookcars-credentials.txt | cut -d= -f2-)
curl -s -X POST http://127.0.0.1/api/sign-in/admin \
-H 'Content-Type: application/json' \
-d "{\"email\":\"$EMAIL\",\"password\":\"$PASSWORD\",\"mobile\":true}" | grep -o accessTokenAn accessToken in the output confirms that the round trip succeeded.
Explore the customer storefront
Open the storefront at http://<public-ip>/. This is your public car rental site, where customers search for cars by location and dates and complete a booking.
Add suppliers, locations and cars
From the admin panel, populate your catalogue. Create suppliers (the rental companies), locations (pick-up and drop-off points), and cars with their specifications, pricing and availability.
The cars view provides rich filters across rating, range, seats, gearbox, fuel policy, mileage and deposit, so your customers can find the right vehicle.
The runtime stack
Everything is reachable through nginx: the storefront on :80, the admin panel on :8080, and the API's /api and /cdn routes proxied to 127.0.0.1:4002.
The image is fully patched with unattended security upgrades enabled. The first-boot service disables itself after provisioning the per-instance state.
curl -s -o /dev/null -w 'storefront :80 -> %{http_code}\n' http://127.0.0.1/
curl -s -o /dev/null -w 'admin :8080 -> %{http_code}\n' http://127.0.0.1:8080/Both endpoints return HTTP 200 once first boot has completed.
Enable payments and email
Live checkout and transactional email are configured in the backend environment file. The front ends are rebuilt into the static bundles. The backend file is /opt/bookcars/backend/.env.
- Stripe or PayPal: set
BC_STRIPE_SECRET_KEY(and the storefront'sVITE_BC_STRIPE_PUBLISHABLE_KEY), orBC_PAYPAL_CLIENT_IDandBC_PAYPAL_CLIENT_SECRET. Then restart the API withsudo systemctl restart bookcars-api. - SMTP email: set
BC_SMTP_HOST,BC_SMTP_PORT,BC_SMTP_USER,BC_SMTP_PASSandBC_SMTP_FROMfor booking confirmations and password resets.
The front-end payment keys are baked in at build time, so rebuild and redeploy the storefront after editing its .env:
cd /opt/bookcars/frontend && sudo npm run build && sudo cp -rf build/* /var/www/bookcars/frontend/Enable HTTPS
For production, put a domain and a TLS certificate in front of the appliance. Point your domain at the instance's public IP address, then use Certbot with the nginx plugin:
sudo apt-get update && sudo apt-get install -y certbot python3-certbot-nginx
sudo certbot --nginx -d your-domain.example.comCertbot obtains a certificate, configures nginx to serve the storefront over HTTPS on port 443, and renews the certificate automatically.
Managing the services
sudo systemctl status bookcars-api --no-pager sudo journalctl -u bookcars-api -n 20 --no-pager sudo systemctl is-active mongod nginxTo follow the API log live, run sudo journalctl -u bookcars-api -f.
To restart the API after a configuration change, run sudo systemctl restart bookcars-api.
The API logs to /var/log/bookcars-api.log. MongoDB data lives under /var/lib/mongodb on a dedicated, independently resizable EBS data volume. Uploaded images live under /var/www/cdn.
Support
Every SecureAnyCloud deployment includes 24/7 support. If you have any questions about this image, contact the SecureAnyCloud support team through the AWS Marketplace listing.
Deploy on AWS
Launch BookCars with 24/7 support from SecureAnyCloud.
View on Marketplace
Need Help?
Our support team is available 24/7.
sales@secureanycloud.com