Deploy PrestaShop
Online store platform with a catalogue, checkout and back office
MySQL
Just deployed
/var/lib/mysql
Mailpit
Just deployed
/data
PrestaShop
Just deployed
/var/www/html
Deploy and Host PrestaShop on Railway
PrestaShop is an open-source e-commerce platform that has powered independent online stores since 2007. It gives a merchant a storefront, a catalogue with attributes and combinations, a cart and checkout, tax and shipping rules, customer accounts, and a back office. Because the code is yours, the products, customers and orders stay in a database you control. Teams choose it to extend the checkout with their own module, or to trade a per-order fee for a fixed hosting bill.
Deploy PrestaShop on Railway and this template stands up the whole shop in one step. The PrestaShop service wraps the official PrestaShop 9 image and runs the installer unattended on its first boot, so the storefront, the demo catalogue and the back-office account all exist by the time the URL answers. MySQL holds every product, order and customer. Mailpit captures the mail the shop sends — order confirmations, password resets, contact-form replies — and gives you a web inbox to read it in. The shop reaches both over Railway's private network.

Getting Started with PrestaShop on Railway
The first deployment runs the installer, which takes a few minutes: it creates the schema, loads the demo catalogue and installs the Hummingbird theme. Wait for the service to go green, then open the public URL to see a working storefront.
The back office lives at /adminpanel/ on the same domain. Sign in with the ADMIN_MAIL and ADMIN_PASSWD values you supplied — there are no shipped default credentials, so those two are the only account that exists. To make the admin path less guessable, set PS_ADMIN_DIR to your own value before the first deployment.
Once you are in, open Catalog → Products, edit a demo item, save it, and reload the storefront to confirm the change reaches shoppers. Then use Advanced Parameters → Email to send a test message: it appears in the Mailpit inbox on that service's own URL, behind the credentials in MP_UI_AUTH. That round trip proves the database, the shop and the mail path are wired together. To go live, replace the demo products, set your country and currency under International, and enable a payment module.

About Hosting PrestaShop
PrestaShop is a PHP application built on Symfony components, with MySQL behind it and a themeable front end. Self-hosting suits a shop that has outgrown a hosted plan's fees or extension limits, or an agency running several storefronts from one codebase.
- Catalogue with attributes, combinations, packs, virtual products and stock
- Cart, checkout, guest orders, invoices, credit slips and returns
- Multi-currency, multi-language and multi-store from one installation
- Discounts, cart rules and catalogue price rules
- A module and theme system with thousands of community and paid add-ons
- SEO-friendly URLs, sitemaps and per-product metadata
The Railway topology has three parts. PrestaShop serves the shop and keeps its application tree on a volume, because it writes there: product images, modules installed from the back office, generated themes, and the file holding its cookie and API keys. MySQL is Railway's managed database, so backups and the Data panel come with it. Mailpit is capture-only — mail is delivered and readable, but nothing reaches a customer by accident.
Why Deploy PrestaShop on Railway
Railway removes the server work between a PrestaShop tarball and a working shop.
- The installer runs unattended, so the first URL you open is already a store
- Managed MySQL with backups, no database server to patch
- A persistent volume for product images and back-office modules
- HTTPS, a public domain and a health check configured for you
- Mail capture included, so nothing is lost while you test
Common Use Cases
- A direct-to-consumer store whose pricing logic a hosted platform cannot express
- An agency staging environment where a client browses a real shop before launch
- A B2B storefront with customer groups, tiered pricing and per-group tax rules
- A module or theme development sandbox, reset by redeploying it
Dependencies for PrestaShop
- PrestaShop —
gridalpha/prestashop-railway, a thin layer overprestashop/prestashop:9-apache - MySQL — Railway's managed
mysql:9.4, the shop's only datastore - Mailpit —
axllent/mailpit:latest, SMTP capture with a web inbox
Environment Variables Reference
| Variable | Service | Purpose |
|---|---|---|
ADMIN_MAIL | PrestaShop | Back-office login, created at install |
ADMIN_PASSWD | PrestaShop | Back-office password |
PS_SHOP_NAME | PrestaShop | Store name shown to shoppers |
PS_ADMIN_DIR | PrestaShop | URL segment for the back office |
PS_COUNTRY / PS_LANGUAGE | PrestaShop | Default country and language |
PS_INSTALL_FIXTURES | PrestaShop | Set to 0 for an empty catalogue |
MP_UI_AUTH | Mailpit | Basic-auth credentials for the inbox |
PS_DOMAIN, PS_ADMIN_DIR, PS_COUNTRY, PS_LANGUAGE and PS_INSTALL_FIXTURES are read by the installer, so set them before the first deployment finishes.
Deployment Dependencies
- Source repository: https://github.com/gridalpha/prestashop-railway
- Upstream project: https://github.com/PrestaShop/PrestaShop
- Docker image: https://hub.docker.com/r/prestashop/prestashop
- Documentation: https://devdocs.prestashop-project.org/9/
Hardware Requirements for Self-Hosting PrestaShop
| Resource | Minimum | Recommended |
|---|---|---|
| CPU | 1 vCPU | 2 vCPU |
| RAM | 1 GB | 2 GB |
| Storage | 5 GB volume | 10 GB or more with a large catalogue |
| Runtime | PHP 8.2–8.5, Apache 2.4, MySQL 5.7+ | PHP 8.5, MySQL 9 |
PHP needs 512 MB per request for the back office, which this template sets. Product images dominate storage growth.
Self-Hosting PrestaShop
Outside Railway the official image accepts the same variables:
docker network create shop
docker run -d --name shop-db --network shop \
-e MYSQL_ROOT_PASSWORD=change-me -e MYSQL_DATABASE=prestashop mysql:9.4
docker run -d --name shop --network shop -p 8080:80 \
-e DB_SERVER=shop-db -e DB_NAME=prestashop -e DB_USER=root -e DB_PASSWD=change-me \
-e PS_INSTALL_AUTO=1 -e PS_DOMAIN=localhost:8080 \
-e ADMIN_MAIL=you@example.com -e ADMIN_PASSWD=change-me-too \
-v shop-data:/var/www/html prestashop/prestashop:9-apache
Mount a real volume at /var/www/html, as above: PrestaShop renames its own back-office directory in the final install step, and that rename fails on a container's overlay filesystem. To build from source instead:
git clone --branch 9.1.5 https://github.com/PrestaShop/PrestaShop.git
cd PrestaShop && composer install && npm install --prefix admin-dev/themes/new-theme
php install-dev/index_cli.php --domain=localhost --db_server=127.0.0.1 \
--db_name=prestashop --db_user=root --db_password=change-me \
--email=you@example.com --password=change-me-too
How Much Does PrestaShop Cost to Self-Host?
PrestaShop is free and open source under the Open Software Licence 3.0, with no licence fee, no per-order commission and no cap on products or orders. You pay only for infrastructure, which on Railway means usage-based billing for three services and two volumes. Optional costs come from the marketplace and from whatever payment processor you connect.
FAQ
What is PrestaShop? PrestaShop is an open-source e-commerce platform written in PHP. It provides a storefront, a catalogue, a cart and checkout, customer accounts and a back office for managing orders, storing everything in a MySQL database you control.
What does this Railway template deploy? Three services: PrestaShop 9 on Apache and PHP 8.5, managed MySQL, and Mailpit for capturing outgoing shop email. The installer runs on the first boot, so the storefront and the admin account exist before you open the URL.
Why does the template include a MySQL database? PrestaShop keeps every product, customer, cart and order in MySQL and has no file-based mode. Railway's managed database adds backups and a Data panel with no server to look after.
Why is a mail service included, and can I use my own SMTP provider? An online store mails constantly, and without a mail server those messages disappear silently. Mailpit captures them for testing. To send real mail, open Advanced Parameters → Email and enter your provider's SMTP host, port and credentials.
How do I find and secure the PrestaShop back office?
It is at /adminpanel/ unless you changed PS_ADMIN_DIR before deploying. PrestaShop makes the path configurable so it is not a fixed target; set your own, and use a long ADMIN_PASSWD.
Can I start with an empty catalogue instead of the demo products?
Yes. Set PS_INSTALL_FIXTURES to 0 before the first deployment and the installer skips the demo catalogue. It is read once, at install.
How do I upgrade PrestaShop later? The template tracks the PrestaShop 9 line. Upgrades change the database schema, so run them through the Update assistant module in the back office, which backs up and migrates the shop.
Template Content