Deploy Shopware | (Just Updated) Open-Source Ecommerce Platform, Admin Login Ready, Sign-up Closed

Shopware 6 ecommerce platform: online store, admin, API, MySQL, Redis

Deploy Shopware | (Just Updated) Open-Source Ecommerce Platform, Admin Login Ready, Sign-up Closed

/data

/var/lib/mysql

Deploy and Host Shopware on Railway

Built for an LLM agent to deploy and use. The deploy form has no fields to fill: the admin password, the app secret, the instance ID, the database password and the Redis password are generated, the store is installed with an admin user and a storefront sales channel before the site is reachable, and the admin API refuses every request without a token. Shopware is an open-source ecommerce platform with a storefront, an admin panel and a REST API, the self-hosted alternative to Shopify and Magento with no per-order fee.

About Hosting Shopware

This template runs three services: shopware, the store (Shopware 6.7.16.1, the production template with the admin, the storefront and the deployment helper), public on port 8080 with a healthcheck at /healthz and a volume at /data; database, MySQL 8.4 with a volume at /var/lib/mysql; and redis, which holds sessions, locks and the cache and has a volume at /data. Each runs from a thin wrapper image over the pinned upstream image, pinned by tag and digest.

What the wrapper fixes. Upstream's Docker setup is a compose file with a separate web container, installer, message worker and scheduler, and a manual first-run installer. The wrapper puts nginx, PHP-FPM, the installer, the message worker and the scheduler in the one shopware service, because Railway allows one volume per service and the media folders must be shared. It applies what Railway needs: the generated secrets from template variables so they survive redeploys, APP_URL taken from the public domain so the storefront sales channel matches it, the forwarded-proto header trusted so the https domain is recognised behind Railway's edge, uploads and private files kept on the volume with the right owner, and a first install that creates the schema, the admin user and the storefront sales channel without opening the web installer. A public /healthz answers 200 only when the database answers and the admin user exists. First boot takes about two minutes. Redeploys keep the admin, the catalogue, the orders and the media.

Using it. Open the shopware domain for the storefront and /admin for the admin panel, and sign in as admin with INSTALL_ADMIN_PASSWORD. An agent requests a token from /api/oauth/token with the password grant and sends it as a bearer token to the Admin API. Email sending is off; the template sets no mail provider, so password resets and order mails need an SMTP service added in the admin. The store ships with no products and no payment provider, and the demo data is not installed.

License. Shopware is under the MIT License.

Agent contract

  • Public URL: the APP_URL variable of the shopware service (https:// plus its Railway domain); the admin panel is at /admin, the Admin API under /api
  • Private URL: http://shopware.railway.internal:8080
  • Credentials: the variable INSTALL_ADMIN_PASSWORD on the shopware service (plain text), user name admin
  • Auth: request a token with POST /api/oauth/token (JSON body grant_type password, client_id administration, scopes write, username, password) and send Authorization: Bearer plus the returned access_token; every /api route answers 401 without it
  • Health: GET /healthz returns 200 without credentials once the store is installed (503 while installing)
#!/bin/sh
# needs: APP_URL, INSTALL_ADMIN_PASSWORD (variables of the shopware service); the admin user is "admin"; also curl.
R="$APP_URL"; J="content-type: application/json"
n=0; until [ "$(curl -s -o /dev/null -w '%{http_code}' "$R/healthz")" = 200 ]; do n=$((n+1)); [ "$n" -le 180 ] || break; sleep 5; done
curl -s -o /dev/null -w "health: %{http_code}\n" "$R/healthz"
curl -s -o /dev/null -w "storefront: %{http_code}\n" "$R/"
# sign-up is closed: the admin API refuses to create a user without a token
curl -s -o /dev/null -w "public signup: %{http_code}\n" -H "$J" -d '{"username":"stranger","password":"Not-the-real-one-12345","email":"stranger@example.com","firstName":"S","lastName":"S"}' "$R/api/user"
# the generated password is the admin account: the OAuth password grant returns a bearer token
TOKEN=$(curl -s -H "$J" -d "{\"grant_type\":\"password\",\"client_id\":\"administration\",\"scopes\":\"write\",\"username\":\"admin\",\"password\":\"$INSTALL_ADMIN_PASSWORD\"}" "$R/api/oauth/token" | sed -n 's/.*"access_token":"\([^"]*\)".*/\1/p')
if [ -n "$TOKEN" ]; then echo "login: 200"; else echo "login: failed"; fi
BODY="{\"name\":\"agent-$$\"}"
# write-auth: POST /api/tag needs the token; without it, or with a wrong one, the answer is 401
curl -s -o /dev/null -w "read with key: %{http_code}\n" -H "Authorization: Bearer $TOKEN" "$R/api/_info/version"
curl -s -o /dev/null -w "write with key: %{http_code}\n" -H "Authorization: Bearer $TOKEN" -H "$J" -d "$BODY" "$R/api/tag"
curl -s -o /dev/null -w "write without key: %{http_code}\n" -H "$J" -d "$BODY" "$R/api/tag"
curl -s -o /dev/null -w "write wrong key: %{http_code}\n" -H "Authorization: Bearer not-a-real-token" -H "$J" -d "$BODY" "$R/api/tag"

Expected output against a fresh deploy:

health: 200
storefront: 200
public signup: 401
login: 200
read with key: 200
write with key: 204
write without key: 401
write wrong key: 401

The refusals are the contract: a request without a token is refused (write without key: 401), a stranger cannot create an account (public signup: 401) and a wrong token is refused (write wrong key: 401).

Why Deploy Shopware 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 Shopware 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 store is healthy, strangers cannot create an account, the generated password is the admin and the API refuses writes without a token.
  • Installed for you - the schema, the admin user and the storefront sales channel exist before the site is reachable, so nobody can claim your store through a web installer.
  • Three services wired for you - the store, MySQL and Redis reference each other, no manual URLs.
  • Data survives redeploys - the store, the database and Redis each have a volume, and the generated secrets stay the same.
  • Pinned - Shopware and the infrastructure images are pinned by tag and digest, and so are the wrapper images.

Common Use Cases

  • Self-hosted Shopify alternative - run an online store with your own catalogue, orders and customers and no per-order fee.
  • Headless commerce backend for an AI agent - give an agent the admin login to create products, categories and prices through the Admin API.
  • B2B shop - customer groups, price lists and an admin you control, in your own database.
  • Evaluating Shopware - try the storefront, the admin and the API before committing to a hosted plan.

Dependencies for Shopware Hosting

  • Three services (shopware, database, redis), each with a 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