Znuny Hosting & Maintenance
Worry-free Znuny operations: Softoft manages hosting, staging setups, regular patching, automated backups, and proactive monitoring.
A staging system is the perfect environment for safely testing changes to the ticket system — for Znuny. It is an exact copy of the production system where functions, configurations, and data are migrated, tested, and validated — without affecting the live system.
A Docker Compose installation is the fastest way to spin up an isolated staging instance:
For bare-metal staging, follow the official installation guide on a dedicated server.
If you are using a dev system as a base:
SysConfig values that point to production URLs, LDAP, or mail servers.Database:
# On production (example for MariaDB)mysqldump -u root -p znuny > znuny-prod-$(date +%F).sql
# On staging — import into the DB containerdocker compose exec -T db mysql -u root -p znuny < znuny-prod-$(date +%F).sqlFile system / volumes:
Copy the var directory (attachments, sessions) from production. On Docker stacks, this is typically the znuny-var volume — see volume backup.
Data privacy: Anonymize all production customer data, e.g., in the
customer_usertable, or remove email addresses using an SQL script before sharing the staging environment with testers.
In SysConfig on staging:
In SysConfig:
SendmailModule to Kernel::System::Email::DoNotSendEmail127.0.0.1 and port to 1Re-run Maint::Config::Rebuild and Maint::Cache::Delete in the app container after bulk SysConfig changes.
bin/znuny.Console.pl Maint::Test::Systemrobots.txt to prevent indexing*.staging.example.com)Once testing is complete in staging:
Config.pmPlaywright (for E2E tests)rsync for fast data transferdocker compose for orchestrated environmentcron or systemd for regular backupsA Znuny staging system offers maximum security when introducing changes. Through structured migration, anonymized test data, and automated tests, you avoid downtime and ensure stable deployments.
Tip: Integrate staging processes into your CI/CD pipeline for automated quality assurance with every change.
Znuny Hosting & Maintenance
Worry-free Znuny operations: Softoft manages hosting, staging setups, regular patching, automated backups, and proactive monitoring.
A Znuny staging system is an indispensable tool for maintaining the stability and reliability of your live ticket system. It serves as an exact, isolated copy of your production environment, allowing you to thoroughly test new functions, configurations, custom code, packages, and migrations without any risk to the operational system. This environment facilitates automated end-to-end tests using tools like Playwright, ensures GDPR compliance through data anonymization, and can even be used for critical recovery tests and backup verification. By identifying and resolving potential issues in staging, you proactively prevent downtime and ensure a smooth, stable deployment to production.
Quellen
To prevent your Znuny staging system from inadvertently sending real emails, which could lead to accidental communication with customers or external services, you have two primary methods. The recommended approach is to adjust the SendmailModule setting within SysConfig. Change its value to Kernel::System::Email::DoNotSendEmail. Alternatively, you can reconfigure the SMTP server settings to point to a dummy host, such as 127.0.0.1 on port 1. This effectively redirects all outbound mail to a non-existent destination. After making significant SysConfig changes, it's crucial to re-run Maint::Config::Rebuild and Maint::Cache::Delete in the application container to ensure the new settings are applied and the cache is cleared.
Quellen
Setting up a robust Znuny staging system requires several key prerequisites to ensure a smooth and effective testing environment. You'll need a compatible operating system, such as Ubuntu 20.04+ or Debian 10+. For the Znuny installation itself, using Docker Compose is highly recommended due to its ease of setup and isolation, though an official Linux installation is also an option. Sufficient system resources are vital, with at least 8 GB RAM and 4 CPUs being a good baseline. Crucially, you must have access to your current production data, including both the database and the file system, to create an accurate copy. Finally, the ability to disable email dispatch on the staging system, for example, by configuring a dummy SMTP server, is essential to prevent unintended communication.
Quellen
Ensuring customer data privacy, especially in compliance with regulations like GDPR, is paramount when using production data on a staging system. It is absolutely critical to anonymize all sensitive production customer data before granting testers access to the staging environment. This typically involves modifying or removing identifying information from database tables such as customer_user. For instance, email addresses can be removed or replaced with dummy values using SQL scripts. The goal is to create a realistic testing environment without exposing actual customer identities or personal data. This step transforms the staging system into a GDPR-friendly space, allowing thorough testing while safeguarding privacy.
Quellen
The recommended and most efficient approach for building a Znuny staging system involves using Docker Compose. Begin by installing Docker Compose on a separate virtual machine or host, distinct from your production environment. When setting up, ensure you use a different Docker Compose project name or directory to prevent volume collisions with your live system. Complete the initial web installer with an empty database schema. For copying production data, first, create a database dump from your production system (e.g., mysqldump -u root -p znuny > znuny-prod-$(date +%F).sql) and then import it into your staging database container. Simultaneously, copy the var directory (which contains attachments and sessions) from production; for Docker stacks, this typically means backing up and restoring the znuny-var volume. Remember to anonymize all production customer data before making the staging environment accessible to testers.
Quellen
After copying production data to your Znuny staging system, it's essential to adjust several configurations within SysConfig to ensure the staging environment operates correctly and remains isolated. First, update the system's FQDN (Fully Qualified Domain Name) and HTTP URLs to reflect the staging hostname. This prevents staging from linking back to production resources. Next, redirect or disable any LDAP and external integrations, pointing them to dedicated test endpoints or turning them off entirely to avoid unintended interactions with live services. Additionally, you might consider lowering the cache TTL (Time To Live) if you require faster feedback during your testing cycles. These adjustments are crucial for maintaining the integrity and isolation of your staging environment.
Quellen