Self-hosting BazarPro
BazarPro is open source (MIT). With Docker Compose it runs on a single server – with its own database, HTTPS via Let’s Encrypt, and without you having to build anything. Allow about half an hour for the setup.
This guide describes BazarPro from version 2.0. From this version on, BazarPro has its own backend with a PostgreSQL database. If you still run an older version with Convex, follow the guide Moving from Convex.
You need:
- a Linux server with Docker and Docker Compose, at least 2 GB RAM, with ports 80 and 443 reachable
- a domain where you can create DNS records
- an email account with SMTP access – BazarPro uses it to send the confirmation codes for sign-up and password reset
One association or a platform?
Section titled “One association or a platform?”BazarPro has two modes. You choose them with BAZARPRO_MODE in the .env:
single (default) |
platform |
|
|---|---|---|
| For whom | one association, daycare or school with its own bazaars | many organizers on one site, like bazarpro.de |
| Home page | name, logo and bazaars of the association | BazarPro’s marketing page with all public bazaars |
| Creating bazaars | administrators only | every user |
| Approval of public bazaars | not needed | by administrators |
| “Organizer” role | only for administrators and a bazaar’s team | for everyone |
| Name in header and emails | name of the association | BazarPro |
For the vast majority of installations, single is right. The data is the same in both modes, so you can switch later.
What runs on the server?
Section titled “What runs on the server?”| Service | Purpose |
|---|---|
| traefik | Receives all requests and fetches the HTTPS certificates from Let’s Encrypt. |
| app | The BazarPro website. |
| backend | The server logic under /api: sign-in, live updates, uploads, emails and recurring tasks such as reminder emails. Uploaded photos and logos live in the Docker volume bazarpro_files. |
| postgres | The database (PostgreSQL) in the Docker volume bazarpro_postgres_data. |
Installation
Section titled “Installation”-
Create a DNS record. Your domain must point to your server’s IP address, e.g.
basar.example.orgwith an A record (and an AAAA record for IPv6). BazarPro needs no other names. -
Download the files. On the server, in a new folder:
Terminal window mkdir bazarpro && cd bazarprocurl -O https://raw.githubusercontent.com/BazarPro/core/main/docker-compose.selfhost.ymlcurl -o .env https://raw.githubusercontent.com/BazarPro/core/main/.env.selfhost.example -
Enter your settings. Open the
.envfile and enter at least:DOMAIN– your domain withouthttps://, e.g.basar.example.orgPOSTGRES_PASSWORD– a random password for the database, e.g. generated withopenssl rand -hex 24. Set it once and don’t change it afterwards: the database takes it over on the first start.ACME_EMAIL– your real email address; Let’s Encrypt warns you there about expiring certificates. Let’s Encrypt rejectsexample.orgaddresses like the one in the template, and you then get no certificate.BAZARPRO_VERSION– the version you want to install. A new installation needs at leastv2.3.0: older versions don’t create any categories, and without categories no bazaar can be created. All versions are listed under Releases.BAZARPRO_MODE–singlefor one association (default) orplatform, see aboveADMIN_EMAIL– the email address you’ll sign up with in a moment. This account automatically becomes administrator.AUTH_SMTP_…andAUTH_EMAIL_FROM– the credentials of your email account. The address inAUTH_EMAIL_FROMmust match this account, otherwise the emails end up in spam. Insinglemode, BazarPro uses your association’s name from the settings as the sender name.
-
Start BazarPro.
Terminal window docker compose -f docker-compose.selfhost.yml up -dOn the first start it takes one or two minutes until all images are pulled. The backend creates the database tables meanwhile. You can follow the progress with:
Terminal window docker compose -f docker-compose.selfhost.yml logs -f backendAs soon as it says
listening, the backend is ready. The website starts after that. If the browser shows404 page not foundor a certificate warning during the first few seconds, reload the page shortly afterwards. -
Create your account. Open your domain in the browser, click Sign up – with the address from
ADMIN_EMAIL– and confirm it with the code from the confirmation email. As soon as the address is confirmed, your account is administrator. After reloading the page, you find the Admin area in the role switcher in the sidebar.The account only becomes administrator after confirmation. That way nobody can register the address for themselves beforehand.
-
More administrators are added with:
Terminal window docker compose -f docker-compose.selfhost.yml exec backend bazarpro-backend admin board@example.orgThe account must already be registered.
Your own reverse proxy instead of Traefik
Section titled “Your own reverse proxy instead of Traefik”If your server already runs a reverse proxy such as Caddy, it occupies ports 80 and 443. BazarPro then works without Traefik. Your proxy takes care of HTTPS and forwards /api to the backend and everything else to the app. You don’t change the docker-compose.selfhost.yml for this.
-
Create a second Compose file. If your proxy runs in Docker itself, create a
docker-compose.proxy.ymlnext to thedocker-compose.selfhost.yml:services:app:networks:default:proxy:aliases: [bazarpro-app]backend:networks:default:proxy:aliases: [bazarpro-backend]networks:proxy:external: truename: caddy_default # your proxy's networkEnter your proxy’s network under
name;docker network lslists all networks. Be sure to keepdefaultin the list: without that network the backend can’t find the database and stops withfailed to lookup address information. You don’t need fixed container names. -
Start BazarPro without Traefik. Fill in the
.envas described above.ACME_EMAILmust be set but isn’t used.Terminal window docker compose -f docker-compose.selfhost.yml -f docker-compose.proxy.yml up -d app backend postgres -
Set up the proxy. For Caddy it looks like this:
basar.example.org {reverse_proxy /api/* bazarpro-backend:3000reverse_proxy bazarpro-app:8080}With other proxies you have to enable WebSockets for
/api, otherwise live updates won’t work. Caddy does this on its own.
If your proxy runs directly on the server and not in Docker, the docker-compose.proxy.yml looks like this instead:
services: app: ports: - '127.0.0.1:8080:8080' backend: ports: - '127.0.0.1:3000:3000'Your proxy then forwards to 127.0.0.1:3000 (/api) and 127.0.0.1:8080 (everything else). If one of the ports is taken, change the first number.
After the installation: set up your association
Section titled “After the installation: set up your association”Before you create the first bazaar, set up two things as an administrator:
-
Settings (Admin › Settings):
- Name and logo of your association appear in the header, on the home page and in all emails.
- The contact email is shown in the footer and on the contact page.
- Under Home page you choose whether the home page shows an overview of all bazaars or leads straight to the current or next bazaar.
- Web analytics with Plausible is optional, see below.
-
Legal texts (Admin › Legal texts): imprint, privacy policy and terms are mandatory, and you as the operator are responsible for them. As long as you haven’t saved a text, BazarPro shows “This page has not been set up yet” on these pages.
Load template gives you a draft in which you replace all placeholders in double square brackets, e.g.
[[Name des Vereins]]. The admin overview warns you as long as placeholders are left. Every change is saved as a version.
The categories that bazaars and items choose from are already there. You can change and extend them under Admin › Categories.
Then, in the Organizer role, create your first bazaar, see Create a bazaar. In single mode, a public bazaar is visible immediately; no approval is needed.
BazarPro shows the app in German or English depending on the visitor’s browser; everyone can switch the language themselves.
Web analytics with Plausible (optional)
Section titled “Web analytics with Plausible (optional)”BazarPro can count visitors with Plausible Analytics – without cookies. Plausible isn’t included in BazarPro: you need your own Plausible installation (Community Edition) or an account at plausible.io.
Turn web analytics on under Admin › Settings › Web analytics with Plausible: enter the domain and Plausible server, activate, save. No restart needed. Alternatively, you can set PLAUSIBLE_DOMAIN and PLAUSIBLE_API_HOST in the .env. The settings in the admin area take precedence. Web analytics only runs when both values are known.
If your privacy policy contains the line {{webanalyse}} (the template includes it), BazarPro automatically inserts a section about Plausible there while web analytics is active. If you use plausible.io, you also need a data processing agreement with the provider.
Just want to try it?
Section titled “Just want to try it?”If you only want to test BazarPro, you can load sample data: several bazaars, items and accounts, including admin@bazarpro.de, user1@bazarpro.de (organizer) and seller@bazarpro.de (seller), all with the password 123456.
docker compose -f docker-compose.selfhost.yml exec backend bazarpro-backend seedSign-in with GitHub or Google
Section titled “Sign-in with GitHub or Google”Optionally, users can sign in with their GitHub or Google account. Create an OAuth app with the provider and enter as the callback URL:
- GitHub:
https://<DOMAIN>/api/auth/oauth/github/callback - Google:
https://<DOMAIN>/api/auth/oauth/google/callback
Client ID and secret go into the .env (AUTH_GITHUB_ID, AUTH_GITHUB_SECRET or AUTH_GOOGLE_ID, AUTH_GOOGLE_SECRET). Then restart BazarPro, see below.
Mention sign-in via GitHub or Google in your privacy policy as well.
Changing settings and updating
Section titled “Changing settings and updating”After every change to the .env and for an update to a new version – adjust BAZARPRO_VERSION first:
docker compose -f docker-compose.selfhost.yml pulldocker compose -f docker-compose.selfhost.yml up -dThe backend brings the database up to date with the new version on start. Your data is kept. Make a backup before an update anyway.
Backup
Section titled “Backup”A backup consists of two files: a dump of the database (accounts, bazaars, items, sales) and an archive of the uploaded photos and logos. In the folder with the docker-compose.selfhost.yml:
docker compose -f docker-compose.selfhost.yml exec -T postgres \ pg_dump -U bazarpro --format=custom bazarpro > bazarpro-$(date +%F).dumpdocker compose -f docker-compose.selfhost.yml exec -T backend \ tar -czf - -C /data/files . > files-$(date +%F).tar.gzKeep the backup somewhere other than the server. Ideally, set up a daily cron job for it.
Restoring: The following commands replace all current data with the state of the backup. The backend is stopped briefly for it:
docker compose -f docker-compose.selfhost.yml stop backenddocker compose -f docker-compose.selfhost.yml exec -T postgres \ pg_restore -U bazarpro --clean --if-exists --no-owner -d bazarpro < bazarpro-2026-10-21.dumpdocker compose -f docker-compose.selfhost.yml run --rm -T --no-deps --entrypoint sh backend \ -c 'find /data/files -mindepth 1 -delete && tar -xzf - -C /data/files' < files-2026-10-21.tar.gzdocker compose -f docker-compose.selfhost.yml start backendLooking into the database
Section titled “Looking into the database”For a look at the data, open an SQL console:
docker compose -f docker-compose.selfhost.yml exec postgres psql -U bazarpro