Skip to content
Infotech

Environment variables

The API reads its configuration from environment variables. Where you set them depends on how you run it:

SetupFile
Your computerspring-admin/.env (copied from .env.example), read by Docker Compose and run-dev.sh. With mvn spring-boot:run, export them in the shell
Your own VPS/opt/infotech-pos/shared/.env (from deploy/env.production.example), passed to Docker Compose by deploy.sh
Buyer release.env next to docker-compose.yml, written by install.sh

After changing a value on a VPS, run sudo /opt/infotech-pos/app/deploy/deploy.sh --all. In the buyer release, run docker compose up -d. Keep every .env file out of Git and backed up.

Database

VariableMeaning
DB_URLJDBC URL, e.g. jdbc:postgresql://localhost:5432/pos_admin. The Compose files set it for you
DB_USERNAMEDatabase user
DB_PASSWORDDatabase password. Generated by server-setup.sh and install.sh. Do not change it once the database exists
DB_POOL_SIZEConnection pool size (release default 10)
DEV_DB_PORTLocal only: host port of the dev PostgreSQL container (default 5433)

The user that runs migrations must be allowed to install the pg_trgm extension. Flyway creates and upgrades the schema on every start.

Addresses

VariableMeaning
APP_URLPublic address of the web app, e.g. https://pos.example.com. Payment gateways return shop owners here after paying. Alternatively set it under Payments › Billing settings › Application URL
CORS_ORIGINSComma-separated web app origins allowed to call the API and open the live-updates WebSocket, e.g. https://pos.example.com. Locally: http://localhost:5173,http://127.0.0.1:5173
RESET_URLPassword-reset page of the web app, e.g. https://pos.example.com/reset-password
API_PORTVPS only: host port the API container listens on at 127.0.0.1 (default 8091). Must match the nginx site
VITE_API_URLWeb app build only: address of the API, e.g. https://api.example.com. Baked into the JavaScript at build time, so change it and rebuild. Not needed locally (Vite proxies /api) or in the buyer release (same origin)

Security and sign-in

VariableMeaning
APP_ENCRYPTION_KEYBase64 32-byte key (openssl rand -base64 32). Encrypts payment gateway secrets and the mail outbox. Required for email, password recovery and online payments. Keep it permanent and backed up: changing it makes saved secrets unreadable
BOOTSTRAP_EMAIL, BOOTSTRAP_PASSWORDCreate the first super administrator on start, only while none exists. Never overwrite an existing password. Remove the password after the first start. Without them, the setup wizard creates the administrator
SETUP_TOKENToken the setup wizard asks for. If empty, one is generated and written to the API log at start
TOKEN_MINUTESLifetime of an access token (default 30)
REFRESH_IDLE_DAYS, REFRESH_MAX_DAYSHow long a sign-in can be refreshed when idle, and at most. env.production.example uses 14 and 60
REFRESH_SECURE_COOKIEtrue behind HTTPS. install.sh sets false (as SECURE_COOKIE) when you install on a plain-HTTP IP address

Email

VariableMeaning
MAIL_ENABLEDtrue to send email. Sign-up codes, password resets and billing reminders need it
MAIL_FROMSender address, e.g. no-reply@example.com
SMTP_HOST, SMTP_PORTSMTP server and port (default 587)
SMTP_USERNAME, SMTP_PASSWORDSMTP login
SMTP_AUTH, SMTP_STARTTLStrue by default
MAIL_POLL_MSHow often the mail outbox is processed, in milliseconds (default 10 seconds)

Without mail configured, password recovery answers "service unavailable" rather than pretending to send. See Email.

Verification codes and SMS

VariableMeaning
OTP_TTL_SECONDSHow long a sign-up code stays valid (default 600, 10 minutes)
OTP_LOG_CODESDevelopment only: true writes codes to the API log when mail is disabled. Keep false in production
OTP_URL, OTP_USERNAME, OTP_SENDER, OTP_KEYSMS gateway settings. Currently unused: codes are sent by email

License

VariableMeaning
LICENSE_SERVER_URLLicense server for activation and daily check-in (default https://license.infotech.center)
APP_VERSIONRelease version, used to tag the api and web images. Set by install.sh and update.sh from the VERSION file

The license public key is built into the API and cannot be set by a variable. See License.

Demo and load-test data

VariableMeaning
DEMO_SEEDtrue only on a public demo server: on every start the API creates the demo accounts below if missing and fills the demo shop with data and pictures. Never on a server that sells to real shops
DEMO_SEED_ADMIN_EMAIL, DEMO_SEED_ADMIN_PASSWORDDemo super administrator
DEMO_SEED_SHOP_NAMEDemo shop name (example: DEMO Shop)
DEMO_SEED_OWNER_EMAIL, DEMO_SEED_OWNER_PASSWORDDemo shop owner
DEMO_DATA_ENABLEDtrue adds a Demo data button (Shops page, POS header) that creates large catalogues and up to two million test sales. Leave unset in production

Existing accounts are never changed by the demo seed.

Buyer release only

Written by install.sh into the release .env:

VariableMeaning
SITE_ADDRESSYour domain (Caddy gets an HTTPS certificate) or :80 for plain HTTP on an IP address or behind your own proxy
ACME_EMAILEmail for Let's Encrypt
HTTP_PORT, HTTPS_PORTHost ports of the web container (default 80 and 443). Change them to run behind your own nginx, see Reverse proxy
SECURE_COOKIEPassed to the API as REFRESH_SECURE_COOKIE
JAVA_OPTSJVM options for the API (default -XX:MaxRAMPercentage=70)

In the release, CORS_ORIGINS and RESET_URL are derived from APP_URL.

Scripts, tests and builds

VariableWhereMeaning
DEPLOY_BRANCHdeploy.shBranch to deploy (default main)
DB_TEST_URL, DB_TEST_USERNAME, DB_TEST_PASSWORDmvn verifyDisposable test database; its name must end in _test. Without it, integration tests are skipped
ZATCA_SANDBOX_TESTmvn verifytrue runs the ZATCA sandbox tests (needs internet)
ALLOW_UNLICENSED_BUILDbuild-release.sh1 allows a test package while the license public key is still the placeholder

Set on the computer that runs the kitchen print agent, not on the server:

VariableMeaning
POS_SERVERThe POS address, https://…
POS_AGENT_KEYThe agent key (pa_…) from Kitchen printers › Print agents
POS_ENCODINGascii (default) or utf8 for printers set to UTF-8, so Arabic names print

Last updated 17 Oct 2026