github MbinOrg/mbin v1.8.2
v1.8.2 🚢

14 days ago

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

# 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 and compose.* files are also moved to the root directory.
  • There is no www service anymore
  • db container service is renamed to postgres service. So update your .env accordingly as well to use postgres has the name in DATABASE_URL
  • Moved from Redis to Valkey, so the new service name is now also called valkey instead of redis.
    • 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 to mbin.
  • 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.

  1. 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 reference old as your old Mbin directory and new as your new one.
  2. Run the auto setup script in new (with this docker branch of course): ./docker/setup.sh prod DOMAINHERE.
  3. Run docker compose down in old/docker if you haven't already.
  4. Copy your Postgres database from old/docker/storage/postgres to new/storage/postgres.
  5. Copy your media files from old/docker/storage/media to new/storage/media.
  6. Copy your OAuth keys from old/config/oauth2 to new/storage/oauth (both private.pem and public.pem).
  7. Open old/docker/.env and new/.env side by side so you can copy values from the old .env file to the new one as needed.
  8. You'll want to copy over most .env values, including KBIN_*, MBIN_*, MAX_IMAGE_BYTES, HCAPTCHA_*, S3_*, the SSO fields, EXIF_*, APP_SECRET, POSTGRES_*, MAILER_DSN, MERCURE_JWT_SECRET, OAUTH_PASSPHRASE, and OAUTH_ENCRYPTION_KEY. Everything else, you can leave alone; feel free to ask if you have any questions about this.
  9. Now that non-root containers are supported, you'll have to update the permissions of the files in new/storage/ to match MBIN_USER in .env. Run chown -R 1000:1000 new/storage/ if your MBIN_USER is 1000: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.
  10. In new/compose.override.yaml, uncomment the section that enables you to build the Docker image locally.
  11. In new, run docker compose up -d to build and start the Docker containers.
  12. If all goes well, then you should be able to access your Mbin instance from your domain!

And of course finally :

  1. 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
  2. Stop all containers docker compose down
  3. 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.

  1. Clone Mbin and change directories: git clone https://github.com/MbinOrg/mbin.git && cd mbin (make sure to switch to this docker branch).
  2. Run the auto setup script: ./docker/setup.sh prod DOMAINHERE (use localhost for the domain if you want to test locally).
  3. Optionally configure SMTP, hCaptcha, S3, and/or SSO in .env.
  4. Use docker build -t mbin -f docker/Dockerfile . to build the Docker image.
  5. Run docker compose up -d to start the Docker containers.
  6. Assuming your DNS and firewall (ports 80 and 443 allowed) are correctly configured, then you should be able to access your new Mbin instance from your domain (or https://localhost_ if you used localhost)!
  7. Don't forget to follow the Mbin first setup instructions!

For Bare Metal

  1. Login as the mbin/kbin user: su mbin
  2. Go to your repo cd /var/www/mbin
  3. Get the new release: git fetch && git checkout v1.8.2
  4. Run the update script: bash bin/post-upgrade.
  5. Run exit so we are back at the root user (or put a sudo in front of every command)
  6. Clear your OPcache by reloading php fpm systemctl restart php8.4-fpm (or restart php8.2-fpm in case of PHP 8.2)
  7. Optional: Flush your Redis DB by running redis-cli, type in AUTH [YOUR PASSWORD] and then FLUSHDB
  8. 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

Don't miss a new mbin release

NewReleases is sending notifications on new releases.