This release is a bit earlier than usual, but we created this new release because of our new Docker setup 🚢.
For bare metal deployments have no backwards incompatible changes. So upgrading is easy for bare metal.
However, if you were running the Docker setup before, this release is important to you. Take note and follow the upgrade instructions carefully for Docker!
And.. we fixed some bugs as well :)
Comparison to previous stable version v1.8.1 (Docker related mainly):
DB migrations | New ENV vars | Admin guide changes | Suggest cache clearing | New dependencies |
---|---|---|---|---|
❌ | ☑️ | ☑️ | ☑️ | ☑️ |
Upgrade Instructions
For Docker
Changes to Docker setup
- Additional
.env
variables are now required in the new Docker setup. Mainly these two variable names:
# Docker specific variables
MBIN_USER=1000:1000
# Possible values: debug, info, notice, warning, error, critical, alert, emergency
PHP_LOG_LEVEL=error
- Dockerfile is completely overhauled
- Meaning the published Docker image is now also changed!
- Updated composer.yaml
- Updated
compose.override.yaml
, see also: https://docs.joinmbin.org/admin/installation/docker#docker-image-preparation docker/storage
is moved to just:storage/
(including OAuth keys) on the root.- And the
.env
andcompose.*
files are also moved to the root directory. - There is no
www
service anymore db
container service is renamed topostgres
service. So update your.env
accordingly as well to use postgres has the name inDATABASE_URL
- Moved from Redis to Valkey, so the new service name is now also called
valkey
instead ofredis
.- Include a Valkey config with recommended default.
- The default PostgresSQL version has been bumped to
17
. - The new Docker setup (with frankenphp and Caddy) can now be used directly as your main reverse proxy (including TLS certificate for HTTPS). NO need for Nginx anymore.
- RabbitMQ now correctly persists data.
- All containers are now set up to work with non-root users.
- There's a new bash script (
./docker/setup.sh
) that automates the setup of the docker environment. - The default user for all services has changed from
kbin
tombin
. - Automatically enable the S3 FS adapter when an
S3_KEY
is provided. - Enable permanent image redirect responses (
301
status code) by default. - Includes a development server, making contributing / development much easier.
Migration Guide
Use these steps to migrate from the old Docker setup to this one. The big thing to keep in mind is that all your server data is now in one of three locations: .env
, compose.override.yaml
, and storage/
. So, all server data will be going under here from now on.
Additionally, this new setup does not require a reverse proxy (and actually recommends not using one), as the PHP server it's using comes with built-in HTTPS support via Let's Encrypt and Caddy. You will need to ensure ports 80
and 443
are directly exposed and available on your server in order for this migration guide to work.
- Keep your old Mbin directory for now; just create a new one by cloning Mbin again (
git clone https://github.com/MbinOrg/mbin.git
)! I'll referenceold
as your old Mbin directory andnew
as your new one. - Run the auto setup script in
new
(with this docker branch of course):./docker/setup.sh prod DOMAINHERE
. - Run
docker compose down
inold/docker
if you haven't already. - Copy your Postgres database from
old/docker/storage/postgres
tonew/storage/postgres
. - Copy your media files from
old/docker/storage/media
tonew/storage/media
. - Copy your OAuth keys from
old/config/oauth2
tonew/storage/oauth
(bothprivate.pem
andpublic.pem
). - Open
old/docker/.env
andnew/.env
side by side so you can copy values from the old.env
file to the new one as needed. - You'll want to copy over most
.env
values, includingKBIN_*
,MBIN_*
,MAX_IMAGE_BYTES
,HCAPTCHA_*
,S3_*
, the SSO fields,EXIF_*
,APP_SECRET
,POSTGRES_*
,MAILER_DSN
,MERCURE_JWT_SECRET
,OAUTH_PASSPHRASE
, andOAUTH_ENCRYPTION_KEY
. Everything else, you can leave alone; feel free to ask if you have any questions about this. - Now that non-root containers are supported, you'll have to update the permissions of the files in
new/storage/
to matchMBIN_USER
in.env
. Runchown -R 1000:1000 new/storage/
if yourMBIN_USER
is1000:1000
. Running the new setup under root has not been tested yet, but you will likely not need to change any file permissions if you were running as root previously. - In
new/compose.override.yaml
, uncomment the section that enables you to build the Docker image locally. - In
new
, rundocker compose up -d
to build and start the Docker containers. - If all goes well, then you should be able to access your Mbin instance from your domain!
And of course finally :
- Get the official image from ghrc.io (v1.8.2 is the first version that delivers this new docker setup) or checkout the code and build it locally by overriding the
pull_policy
- Stop all containers
docker compose down
- Start all containers
docker compose up -d
Quick Start Guide
Use these steps to install Mbin on a new server. It is assumed that docker is already installed and set up.
- Clone Mbin and change directories:
git clone https://github.com/MbinOrg/mbin.git && cd mbin
(make sure to switch to this docker branch). - Run the auto setup script:
./docker/setup.sh prod DOMAINHERE
(uselocalhost
for the domain if you want to test locally). - Optionally configure SMTP, hCaptcha, S3, and/or SSO in
.env
. - Use
docker build -t mbin -f docker/Dockerfile .
to build the Docker image. - Run
docker compose up -d
to start the Docker containers. - Assuming your DNS and firewall (ports
80
and443
allowed) are correctly configured, then you should be able to access your new Mbin instance from your domain (or https://localhost_ if you usedlocalhost
)! - Don't forget to follow the Mbin first setup instructions!
For Bare Metal
- Login as the mbin/kbin user:
su mbin
- Go to your repo
cd /var/www/mbin
- Get the new release:
git fetch && git checkout v1.8.2
- Run the update script:
bash bin/post-upgrade
. - Run
exit
so we are back at the root user (or put asudo
in front of every command) - Clear your OPcache by reloading php fpm
systemctl restart php8.4-fpm
(or restartphp8.2-fpm
in case of PHP 8.2) - Optional: Flush your Redis DB by running
redis-cli
, type inAUTH [YOUR PASSWORD]
and thenFLUSHDB
- Restart the messengers:
supervisorctl restart messenger:*
What's Changed
- Fix SendApplicationAnswerMailHandler not supplying enough parameters by @BentiGorlich in #1538
- Docs: Update Docker nginx example with the existing nginx example by @melroy89 in #1540
- Add cs2pr to our Dockerfile (phase 1) by @melroy89 in #1547
- Use checkstyle GitHub actions (phase 2) by @melroy89 in #1546
- Translations update from Hosted Weblate by @weblate in #1536
- docs(contributor): contributors readme action update by @github-actions in #1549
- Fix warnings in logging + Update php-cs-fixer by @melroy89 in #1543
- Revert "sync file from server by hand" by @jwr1 in #1552
- docs(contributor): contributors readme action update by @github-actions in #1553
- Translations update from Hosted Weblate by @weblate in #1551
- Add missing $logger in ApActivityRepository + init $apActivity with null by @melroy89 in #1560
- Rework docker setup by @jwr1 in #1542
- docs(contributor): contributors readme action update by @github-actions in #1562
- Translations update from Hosted Weblate by @weblate in #1561
- Move complex regexes to dedicated regpatterns util by @melroy89 in #1550
- Pin docker images to version tags by @melroy89 in #1565
- Change leftover Redis reference to Valkey in Docker install docs by @jwr1 in #1566
- Left-over 'v' in front of our docker tags by @melroy89 in #1567
- Dump version to 1.8.2 by @melroy89 in #1568
Full Changelog: v1.8.1...v1.8.2