SquadDNS
Search
K

Shopware Remote Sharing

This is a simple tutorial, if you have a single Shopware shop, that you would love to share with someone else. The challenge is to configure Shopware in a way, that TWIG links will be rendered correctly, so that a full navigation is possible using the external static hostname.

1. Start Shopware

Start your local Shopware installation
Here is a simple Docker line using the dockware.io project to lunch Shopware 6.5.3.0 with Port 443 (HTTPS).
docker run -p 443:443 dockware/dev:6.5.3.0

2. Sales Channel Domain

We want our shop to render all links with the correct static hostname. Otherwise visitors would be redirected to https://localhost when clicking somewhere, which does obviously only exist on the local machine, and not from remote.
This is why we have to add a new domain to our sales channel. Just use your personal static hostname and enter it in the administration of Shopware.
Pay attention to the HTTP(s) scheme, when doing this!

3. Start Tunnel

You can now decide what service you want to use for your tunnel.
NGROK
Cloudflare
Now it's time to start NGROK. If you are not yet familiar with NGROK you might want to check it out here: https://ngrok.com/
All we need is to run this line with port 443 and with our hostname. This will make sure that our shop thinks there is a request for this hostname, and not for the NGROK domain that would be used otherwise.
ngrok http --region=eu --host-header={my-hostname} 443
If you want to use the Cloudflare service, run the following command. This will start a tunnel that redirects to your HTTPS localhost. It will also ensure sure that our shop thinks there is a request for our static hostname, and not for the Cloudflare domain that would be used otherwise.
cloudflared tunnel --no-tls-verify --http-host-header={my-hostname} --url=https://localhost

4. Update SquadDNS

The only thing that's left to do is, to copy the generated tunnel domain and add it to your record inside SquadDNS.
That's it! When you know open your static domain from a different machine, you should be able to see your Shopware shop, and also navigate to other pages.