Self-host STC
Run the STC server yourself and every record of your selling stays on a machine you control. You still get the web app: point it at your server and it works exactly the same, it just talks to your database instead of mine.
All you need is a server with Docker and a domain name. The steps below cover the rest.
Your data, your machine
Every item, sale and expense lives in a database on hardware you control. Nobody else can read it.
Free forever
The server is open source under AGPLv3. No licence fee, no seat limits, no trial that runs out.
Same app
Point the STC web app at your own server and use the same screens as everyone else, with nothing to install.
Backups you hold
Backups and exports are encrypted with a key that only exists on your server.
What you need
- A Linux server or VPS with Docker and Docker Compose
- A domain or subdomain you can point at it
- Ports 80 and 443 open, so Caddy can get a certificate
Set it up
- 1
Point your domain at the server
At whoever manages your domain (Cloudflare, Namecheap, your registrar), add an
Arecord forstc.example.compointing at your server's public IP address. If you use Cloudflare, set it to "DNS only" (grey cloud) so Caddy can get its certificate. Once it has had a few minutes, this should print your server's IP:# The record to add (some providers only want the part # before your main domain in the Name box) Type: A Name: stc.example.com Value: <your server's IP address> # Then check it from anywhere dig +short stc.example.com - 2
Get the code
On the server, clone the STC server and move into it.
git clone https://github.com/JakeFlanagan/STC-Backend-Flask.git cd STC-Backend-Flask - 3
Tell Caddy your domain
Caddy sits in front of STC and handles HTTPS, fetching and renewing the certificate for you. Its config,
Caddyfile, ships withlocalhostas the site address. This swaps in your domain and shows you the result:sed -i 's/^localhost {/stc.example.com {/' Caddyfile grep -n '^stc.example.com {' Caddyfile - 4
Start it
Builds the server and starts it behind Caddy. The first run takes a minute or two.
docker compose up -d --build docker compose ps - 5
Check it answers
From your own computer. If you see
{"ok":true}, the server is up and the certificate worked.curl https://stc.example.com/api/v1/health - 6
Note the admin password
An admin account is created on first start. Its password is printed once, here, and never again, so save it somewhere safe.
docker compose logs app | grep "Admin created" - 7
Connect the app
Open app.sole-traders.uk and tap the button with the gear under the login box. Type just your domain and press Test & Save, then create your account. The address is saved in your browser only, so nobody else's app is affected.
stc.example.com
Good to know
Everything lives in one Docker volume, stc_data, including the keys your backups are encrypted with. Back that volume up somewhere else. Lose it and the encrypted backups can't be opened.
Password reset emails, error reporting and automatic off-site backups are all optional and covered in the README on GitHub. So is running more than one worker.