Install guides

Install PosXT Self-Hosted.

A server with a dashboard for products, prices, staff, stock and reports, plus Windows and macOS tills that keep selling offline, for one company on your own server.

Time
About 15 minutes, most of it waiting for the first build.
Server
Linux, Docker 24+, 2 GB RAM, 10 GB disk
Release file
posxt-<version>.tar.gz
Install folder
/opt/posxt

What you need.

  • A Linux server (a VPS is fine) with at least 2 GB of RAM, 1 vCPU and 10 GB of free disk to start with, plus room for your files and backups. Debian and Ubuntu are the usual choice.
  • Docker 24 or newer with the Compose plugin: docker compose version must print a version.
  • A domain name whose DNS record already points at the server, for example pos.yourcompany.com. An IP address does not work: the licence is bound to the domain.
  • Ports 80 and 443 open to the internet and not used by another program. The install gets and renews its HTTPS certificate by itself (Let's Encrypt).
  • Outbound HTTPS to licence.sophario.com (activation, checks, updates), Docker's image registry and Let's Encrypt.
  • Your licence key (SOPH-…) and the release archive, both on your buyer page.
  • An SMTP account for outgoing email. You can add it during setup or later.
  • For the tills: a Windows or macOS computer in each shop, with internet access to your domain.

PosXT has no fiscal certification, no fiscal device and no connection to a tax authority, so it is not offered, and may not be used, in a country whose law requires a certified till system. The setup wizard refuses those countries; its list is the reference, and the full list is in the guide shipped in your archive.

Install.

Do everything as root (or with sudo), in a folder you keep for this install. The archive has no enclosing folder, so unpack it into one of your own:

mkdir -p /opt/posxt
tar -xzf posxt-<version>.tar.gz -C /opt/posxt
cd /opt/posxt
./install.sh --domain pos.yourcompany.com --email [email protected]

--domain is the public name of the install, never an IP address. --email must be a real address that you read: Let's Encrypt sends its certificate expiry notices there, and the script refuses reserved domains such as example.com. Without the options the script asks for them, then asks you to confirm (--yes skips the question, and then both options are required). It checks that Docker and curl are present, writes a private .env, builds and starts the application, runs the database migrations, waits until the application answers and then waits up to 60 seconds for the HTTPS certificate. This is what an install printed:

root@server: pos.yourcompany.com
$ ./install.sh --domain pos.yourcompany.com --email [email protected] --yes
Starting PosXT ...
 Image postgres:16 Pulling
 Image caddy:2 Pulling
  … image layers downloaded
 Image caddy:2 Pulled
 Image postgres:16 Pulled
 Image posxt-app Building
  … build steps
 Image posxt-app Built
 Network posxt_default Created
 Volume posxt_caddy_config Created
 Volume posxt_caddy_data Created
 Volume posxt_pgdata Created
 Container posxt-caddy-1 Started
 Container posxt-postgres-1 Started
 Container posxt-postgres-1 Healthy
 Container posxt-app-1 Started
Running database migrations ...
Waiting for the app to answer (up to 120 seconds) ...
Waiting for the TLS certificate (up to 60 seconds) ...

PosXT is running.

  Setup URL:    https://pos.yourcompany.com/setup
  Setup token:  3f9c1e7a52b84d06a1c9e2f4b7d8a650

Open the setup URL and enter the token to finish. The token is also stored in .env
(SELFHOST_SETUP_TOKEN). Keep .env private: it holds your database password.
Output of a real install on a test server, shortened. Your domain and token will differ.

Keep the setup URL and token. The token is also stored in .env as SELFHOST_SETUP_TOKEN. .env holds your database password and the install's settings: keep it private and never delete it. If the script stops with an error, it says what failed and which command to run once you have fixed the cause.

The one-line installer (alternative). Your licence email and your buyer page also give a single command for a fresh Ubuntu 22.04 or 24.04, or Debian 12 or 13, server (x86_64 or aarch64). It checks the system, installs Docker if it is missing, opens ports 80 and 443 when the ufw firewall is on, downloads the release your key entitles you to into /opt/posxt and runs install.sh. It looks like this, with your own key:

curl -fsSL https://licence.sophario.com/install.sh | sudo bash -s -- --key <your licence key>

It asks for the domain and email address too; --domain, --email and --dir set them in advance.

Never publish the app container's port. Only the web server in front of it (Caddy) publishes ports, 80 and 443. The app has no ports: entry and must keep none, in compose.override.yml too: the app trusts the client address Caddy passes on only because nobody else can reach it.

The setup wizard.

Open the setup URL (https://pos.yourcompany.com/setup) on your domain name. Until setup is finished, the dashboard address leads there too.

  1. Install code

    Paste the setup token the install script printed. After too many wrong tries the wizard asks you to wait a minute.

  2. Checks

    The wizard checks that the database is migrated, that the storage folder is writable, that the install's keys file exists, that APP_URL in .env matches the address in your browser and that the server clock is right. Fix what is marked, then choose Check again.

  3. Licence

    Enter your licence key and choose Activate. Tick "This is a staging copy" only for a test copy. You may continue without activating: until a licence is active the dashboard opens only its Licence page, but the tills keep selling.

  4. Company

    Name, profile (International, or a ready-made country profile), country, time zone and currency (the currency follows the time zone until you choose one), and the language of the tills and documents (English or French).

  5. Administrator

    The account that runs the install. Choose its name, email and password, then set up two-factor authentication: scan the code with Google Authenticator, Microsoft Authenticator or a similar app and enter the code it shows.

  6. Email

    Your SMTP server, so that sign-in codes, invitations and receipts can be sent, and the support email and phone shown at the foot of every email. You may skip it and set it later.

  7. Done

    The wizard is finished and the setup address no longer works. Sign in to the dashboard with the administrator account, then install the first till.

Tills: install, activate, add more.

The till installers for Windows and macOS ship with each release. Open https://pos.yourcompany.com/downloads/ on the shop's computer, download the installer for its system and install it. They are built by Sophario Ltd. There is no Android or other mobile app in this edition.

The till installers are not yet code-signed, so Windows and macOS warn you the first time. Download them only from your own server's downloads page. On Windows, if SmartScreen shows "Windows protected your PC", choose "More info", then "Run anyway". On macOS, if macOS says it cannot check the app, open System Settings, then Privacy & Security, choose "Open Anyway" next to the message about PosXT, and confirm. You only need to do this once per computer.

  1. The first till

    The dashboard overview shows an activation code for the first till, valid for 24 hours. In the till, under "Server address", enter https:// and your domain with no path, for example https://pos.yourcompany.com. Choose I created my account online, enter the activation code, choose a till PIN (4 to 8 digits) twice, then Set up the till.

  2. More tills

    On a till already in use, the owner opens "Tills and shops", then "Add a till": it shows a setup code valid for 15 minutes. On the new computer, install the till, enter the same server address, choose Join an existing shop and enter that code.

  3. Staff

    Shop staff sign in on the tills with their own PINs. You add them and give them their roles in the dashboard.

  4. A lost or stolen till

    Revoke it in the dashboard: it can no longer send sales or receive updates, and the sales it already sent stay.

A till sells offline and sends its sales when it reconnects. To sell it needs a permission signed by your server, valid for 30 days and renewed whenever the till reaches the server. After 30 days without reaching it, the till stops taking new sales until it reconnects; everything else keeps working. It warns the staff after 15 days and again after 25. The permissions come from your server, not from Sophario, so tills keep selling while your install's licence is locked.

After setup.

  • Email. In the dashboard, "E-mail and support": SMTP server and port (tick "Encrypted from the start" for TLS, usually port 465), user, password, sender, and Send a test e-mail. The support email and phone shown at the foot of every email are your own details; leave them empty to show nothing.
  • WhatsApp. There is no SMS or WhatsApp account to set up: a till can share a receipt through a WhatsApp link, which needs no account.
  • Product images (optional). Off until you give the install a bucket of your own at any S3-compatible service. Add LEPOS_S3_ENDPOINT, LEPOS_S3_REGION, LEPOS_S3_ACCESS_KEY_ID, LEPOS_S3_SECRET_ACCESS_KEY and LEPOS_S3_BUCKET to .env (for Cloudflare R2 you can use LEPOS_R2_ACCOUNT_ID, LEPOS_R2_ACCESS_KEY_ID, LEPOS_R2_SECRET_ACCESS_KEY and LEPOS_R2_BUCKET). All the values of one set are needed. Then cd /opt/posxt && docker compose up -d.
  • Sign-in with Google (optional). Create a "Web application" OAuth client in your own Google Cloud project with the redirect address https://pos.yourcompany.com/v1/owner/google/callback, then add LEPOS_GOOGLE_CLIENT_ID, LEPOS_GOOGLE_CLIENT_SECRET and LEPOS_GOOGLE_REDIRECT_URI (the same address) to .env and run docker compose up -d. It is for existing dashboard users and never creates an account.
  • Your own changes go in product.env.local and compose.override.yml, which updates keep. The source code of the server, dashboard and tills is in src/; a till you build yourself is your own build, not one of ours.

Licence and locking.

Activate in the wizard, or later on the dashboard's Licence page (administrator only). It shows the tier (Business or Agency), the domain, "Updates included until" and the date of the next check; Check now asks the licence server at once. Your purchase includes 12 months of updates and support; releases built in that period keep working for ever.

A check sends your key, the product, the domain, the install's random identifier and whether it is live or staging, and nothing about your sales, customers or staff. A successful check keeps the install unlocked for 30 days, so an install that cannot reach the licence server keeps working for 30 days.

Locked means the staff side only. A locked install pauses the dashboard: signing in, the Licence page and the data export (one ZIP of all the company's data as CSV) keep working, nothing is deleted, the tills keep selling and queued emails are still sent. The Licence page says why and what to do. A fix is picked up at the next daily check, or at once with Check now.

ReasonWhat to do
missing: no licence is activatedActivate your key on the Licence page.
revoked: for example after a refundContact us.
not_activated: freed on the buyer pageActivate again with your key.
invalid_key: the key is not recognisedCheck it against your purchase email.
domain_mismatch: activated for another domain, or opened on another addressOpen the dashboard on the install's domain; after a domain change see below.
staging_needs_live or staging_domain_unrelatedActivate the live install first; give a staging copy a domain related to the live one, such as a subdomain.
invalid: the licence file could not be verifiedActivate again with your key.
wrong_product: the key is for another productUse the PosXT key from your purchase email.
wrong_install: the licence file was issued to another installActivate this install with your key.
renew_required: built after your "updates until" dateRenew on your buyer page, or install the last release you were entitled to.
check_overdue: no confirmation for 30 daysCheck that the server can reach licence.sophario.com over HTTPS, then Check now.
misconfigured: no usable verification key in this buildInstall the release you downloaded again, unchanged, or contact us.
unreadable: cannot read its licence filesRun the scripts as root, which keeps the owner of the storage folder right.

When activating, no_installs_left means all installs on the licence are in use (free one on your buyer page), and invalid_request means you should open the page on the public domain, not an IP address.

Staging copies. For each live install you may run one staging copy on a related domain, such as staging.pos.yourcompany.com. Activate the live install first, install the copy like any other and tick "This is a staging copy". It shows "Staging copy: not for production use" on every dashboard screen.

Moving to another domain. Point the new name at the server, change APP_DOMAIN and APP_URL in .env (and LEPOS_GOOGLE_REDIRECT_URI too, if Google sign-in is set up), run docker compose up -d, free the old install on your buyer page, activate again on the Licence page, then change the server address on each till (menu, "Server address…", an owner's PIN). Business licences allow 3 moves in 12 months; Agency licences allow 15.

Agency licences also get a "Your brand" form on the Licence page: name, main colour and logo replace PosXT's on the dashboard, in emails and in the names shown inside the till screens. The installed till keeps its own name, icon and identifier.

Updates.

cd /opt/posxt
./update.sh

The script asks the licence server for the newest release your licence allows, downloads and checks it, makes a backup, swaps the code, rebuilds, migrates the database and checks that the app answers. It never replaces .env, storage/, backups/, product.env.local or compose.override.yml.

If the update fails or is interrupted, the script puts the previous code back. The database may already have been migrated by then: if the app does not behave after a failed update, restore the backup the update just made with ./restore.sh (see below).

Tills do not update themselves. After an update the new installers are at https://pos.yourcompany.com/downloads/. When the release notes say a new till version is needed, install it over the old one on each shop computer: the till keeps its data and its setup.

Backups, restore and moving.

./backup.sh
./restore.sh backups/<UTC date and time>

A backup holds a dump of the database, storage/ and a copy of .env; the newest 14 are kept. storage/app/pos/keys.json holds the keys your tills trust and is created once, on the first start: without a backup, losing it means every till must be set up again. Treat backups/ as secret, run it nightly and copy it off the server:

0 3 * * * cd /opt/posxt && ./backup.sh

restore.sh asks you to type RESTORE, empties the database and loads the backup; the replaced storage/ is kept under backups/pre-restore-*. It never restores licence files.

New server: point the domain at it and install the same release there, without finishing the setup wizard. Copy a backup folder into /opt/posxt/backups/, run ./restore.sh, sign in and activate again on the Licence page (if all installs are in use, free the old server on your buyer page first). The backup brings keys.json with it, so with the same domain the tills need nothing else.

Troubleshooting.

  • Logs: cd /opt/posxt && docker compose -f compose.base.yml -f compose.product.yml logs app caddy.
  • No HTTPS certificate. DNS must point at this server, ports 80 and 443 must be open in every firewall in front of it (your provider's too) and the email given to install.sh must be real. Caddy keeps trying by itself.
  • The wizard marks a problem in Checks. It says which. For APP_URL, open the wizard on the domain you installed with.
  • The wizard refuses the install code. Copy SELFHOST_SETUP_TOKEN from .env again, exactly.
  • A till cannot reach the server. Check its internet connection and its server address. A till offline for more than 30 days sells again as soon as it reconnects. The till's diagnostic button ("Share a diagnostic" or "Prepare a diagnostic") prepares a file you can send to whoever helps you; nothing is sent by itself.

Support.

Your buyer page holds your key, your activations, your downloads and the way to reach Sophario Ltd. Send a short description of the problem and the output of cd /opt/posxt && docker compose -f compose.base.yml -f compose.product.yml logs --tail=100 app caddy (remove anything private first).

You can also write to [email protected] or call +44 7537 131614.