Install on a server
Install ShopNex on your own Linux server with one command, using Docker Compose.
The installer sets up Docker if needed, then runs the released ShopNex images and a Postgres database with Docker Compose in /opt/shopnex. Nothing is built on your server. You need a fresh Linux server with at least 2 GB of memory.
curl -fsSL https://shopnex.ai/install.sh | sudo sh
When it finishes, open the address it prints and complete the setup wizard at /admin/setup.
Complete the setup wizard right after installing. Until you do, anyone who finds the address could claim your shop.
Use your own domain
Point two DNS records at the server: shop.example.com for the shop and stripe.shop.example.com for the Stripe app. Then run the installer with the domain. HTTPS is set up automatically.
curl -fsSL https://shopnex.ai/install.sh | sudo SHOPNEX_DOMAIN=shop.example.com sh
HTTPS comes from the Caddy inside the ShopNex container, so there is no separate proxy to manage.
Options
| Variable | Default | What it does |
|---|---|---|
SHOPNEX_DOMAIN | the server's IP address | Public domain. Turns on HTTPS. |
SHOPNEX_VERSION | the latest release | Release tag to install, for example v1.2.3. |
SHOPNEX_DIR | /opt/shopnex | Where the Compose file and .env are kept. |
Update
Run the install command again, or set SHOPNEX_VERSION to a release tag. It keeps your database and secret and switches to the new version. Nothing is ever updated without you running it.
Moving from the older installer
Earlier versions of the installer ran ShopNex directly on the server, with Node and Postgres installed on the host and no Docker. The new installer refuses to run on such a server, because it would start a new, empty shop next to your real one.
There is no automatic migration yet. Until there is, your existing shop keeps running as it is. If you want to move it to Docker, first save two things from the old server:
- a database dump:
sudo -u postgres pg_dump shopnex > shopnex.sql - the
SHOPNEX_SECRETline from/opt/shopnex/.env. Saved provider keys are encrypted with it and cannot be read without it.
Then open an issue and we will help you move it.
Manage it
Everything lives in /opt/shopnex. Your settings are in .env.
cd /opt/shopnex
docker compose logs -f shopnex # logs
docker compose ps # what is running
docker compose restart shopnex # restartNo one has run this page's steps end to end yet, so some may need adjusting. If something breaks, please report it.Not verified
Found an issue?