Deploy Louez | (Just Updated) Equipment Rental Platform, Admin Login Generated, Sign-Up Closed

Louez self-hosted equipment rental platform, online booking, MySQL, MinIO

Deploy Louez | (Just Updated) Equipment Rental Platform, Admin Login Generated, Sign-Up Closed

Just deployed

/data

Just deployed

/var/lib/mysql

Just deployed

Deploy and Host Louez on Railway

Built for an LLM agent to deploy and use. The deploy form has no fields to fill: the owner login, the session secret and the database and storage passwords are generated, the server cannot start without them, and the owner account exists before the first request. Louez is a self-hosted equipment rental platform: an online storefront with booking and availability, and a dashboard for the owner with the catalogue, reservations, rental contracts, payments, a calendar and customer email.

About Hosting Louez

This template runs three services: louez, the upstream Louez image (v2.3.1) pinned by digest through a thin wrapper, mysql, a MySQL 8.4 database with a volume at /var/lib/mysql that holds the catalogue, reservations and accounts, and minio, a private S3 storage service with a volume at /data that holds uploaded product photos and documents. Louez keeps nothing on its own disk, so the louez service has no volume. One public domain serves the storefront, the dashboard and the API, and product images are served from the same domain under /files. The server listens on Railway's injected PORT, and the healthcheck is GET /api/health.

What the wrapper fixes. Upstream has no first account until someone registers in a browser, and the first registration becomes the owner: whoever reaches a fresh deploy first owns it. Every setting (database address, storage endpoint and keys, the app URLs and the session secret) is also something to type. The wrapper bakes the fixed settings into the image so the deploy form is empty, starts the server on a loopback port, registers the owner from ADMIN_EMAIL and ADMIN_PASSWORD, which closes public registration, and only then starts the real server on PORT, so the open sign-up page is never reachable from outside. It refuses to start without a strong admin password and session secret, and a restart leaves the existing account unchanged. Read from the upstream source and checked on a Railway deploy: sign-up from outside answers 403, the generated login signs in. Not reproduced on a Railway control of an incumbent listing.

Using it. Open the domain, sign in with ADMIN_EMAIL and ADMIN_PASSWORD, create your store and add equipment to the catalogue. Everything is stored in MySQL and MinIO on volumes, so redeploys keep it.

Agent contract

  • Public URL: https://RAILWAY_PUBLIC_DOMAIN (the generated domain of the louez service)
  • Private URL: http://louez.railway.internal:8080
  • Credentials: the variables ADMIN_EMAIL and ADMIN_PASSWORD on the louez service (plain text; ADMIN_EMAIL is admin@ plus the public domain)
  • Auth: POST /api/auth/sign-in/email with {"email","password"} and an Origin header equal to the public URL sets a session cookie; send the cookie back on later calls. A wrong password answers 401; a write without the cookie answers 401.
  • Health: GET /api/health returns 200 without credentials
#!/bin/sh
# needs: RAILWAY_PUBLIC_DOMAIN, ADMIN_EMAIL, ADMIN_PASSWORD (variables of the louez service); also curl, grep.
R="https://$RAILWAY_PUBLIC_DOMAIN"; J="content-type: application/json"; O="origin: $R"; C=$(mktemp)
n=0; until [ "$(curl -s -o /dev/null -w '%{http_code}' "$R/api/health")" = 200 ]; do n=$((n+1)); [ "$n" -le 60 ] || break; sleep 5; done
curl -s -o /dev/null -w "health: %{http_code}\n" "$R/api/health"
# Louez signs in over REST (better-auth): the session is a cookie, sent back with -b.
# a wrong password does not sign in
curl -s -o /dev/null -w "wrong password: %{http_code}\n" -H "$J" -H "$O" -d '{"email":"'"$ADMIN_EMAIL"'","password":"not-the-admin-secret"}' "$R/api/auth/sign-in/email"
# the generated login signs in
curl -s -o /dev/null -c "$C" -w "login: %{http_code}\n" -H "$J" -H "$O" -d '{"email":"'"$ADMIN_EMAIL"'","password":"'"$ADMIN_PASSWORD"'"}' "$R/api/auth/sign-in/email"
echo "signed in as: $(curl -s -b "$C" "$R/api/auth/get-session" | grep -o '"email":"[^"]*"' | head -1)"
# write-auth: a write (rename the owner) with the session succeeds, the same write without it is refused
curl -s -o /dev/null -b "$C" -w "write with session: %{http_code}\n" -H "$J" -H "$O" -d '{"name":"Agent Owner"}' "$R/api/auth/update-user"
curl -s -o /dev/null -w "write without key: %{http_code}\n" -H "$J" -H "$O" -d '{"name":"Anon"}' "$R/api/auth/update-user"
# public signup: a stranger's registration is refused with 403
curl -s -o /dev/null -w "public signup: %{http_code}\n" -H "$J" -H "$O" -d '{"name":"Stranger","email":"stranger@example.org","password":"Stranger-Pass-Abcdef"}' "$R/api/auth/sign-up/email"

Expected output against a fresh deploy (measured on the Railway demo; the control-deploy output of the published code is recorded in template.md):

health: 200
wrong password: 401
login: 200
signed in as: "email":"admin@YOUR_PUBLIC_DOMAIN"
write with session: 200
write without key: 401
public signup: 403

The refusals are the contract: a wrong password answers 401 (wrong password: 401), a write without the session answers 401 (write without key: 401), and a stranger's sign-up answers 403 (public signup: 403).

Why Deploy Louez on Railway?

Railway is a singular platform to deploy your infrastructure stack. Railway will host your infrastructure so you don't have to deal with configuration, while allowing you to vertically and horizontally scale it.

By deploying Louez on Railway, you are one step closer to supporting a complete full-stack application with minimal burden. Host your servers, databases, AI agents, and more on Railway.

  • Agent-ready - no deployer fields, a contract block, and one script that proves the server is healthy, a wrong password and a stranger do not get in, and the generated login does.
  • Locked from the first request - the owner is registered before the server is public, registration is closed, and the server will not start without strong secrets.
  • Data survives redeploys - bookings and accounts live in MySQL on a volume, uploaded photos in MinIO on a volume.
  • Works on first deploy - the listener follows Railway's injected PORT, the database and storage are reached over the private network, and the schema migrates itself.
  • Pinned - the upstream image is pinned by digest and the wrapper by tag and digest.

Common Use Cases

  • A rental shop's online booking - publish a catalogue with prices and availability and take reservations on your own domain.
  • Equipment, tool, bike or event-gear hire - manage stock, bookings, contracts and customer email from one dashboard.
  • A self-hosted alternative to a hosted rental SaaS - keep customer and booking data on your own database.

Dependencies for Louez Hosting

  • The louez service, a MySQL service and a MinIO service, the two data services each with their volume, created by the template.

Deployment Dependencies


Template Content

More templates in this category

View Template
Rocky Linux
Hosted Rocky Linux 9 workspace with SSH and persistent storage. 🚀

codestorm
51
View Template
Foundry Virtual Tabletop
Self-hosted virtual tabletop for role-playing games (license required)

Lucas
71
View Template
NEW
Double Commander in your browser
The Double Commander file manager in the cloud, from any device

Nermin Sabanovic
0