zabbix_server.conf is the file the Zabbix server daemon reads at startup. It sets how the server connects to its database, where it writes logs, how many worker processes it starts and how much shared memory it uses for caches. This page explains the example file above and covers which lines to change, how to test and apply a change, how to size the caches, how to secure the file, and how to fix common startup errors.
Example of Zabbix zabbix_server.conf
How zabbix_server.conf works
The file is a list of Parameter=Value lines. Lines that start with # are comments. In the shipped file, every parameter appears commented out with its default value, so a commented line tells you what the server uses if you leave it alone. To change a setting, add an uncommented line with the new value. The example above follows this pattern: it changes only about a dozen parameters and leaves everything else at the default.
| Installation method | Default config path |
|---|---|
| Official packages (RHEL, Debian, Ubuntu, SUSE) | /etc/zabbix/zabbix_server.conf |
| Compiled from source | /usr/local/etc/zabbix_server.conf (depends on the --sysconfdir you pass to configure) |
| Docker images | Generated from environment variables such as DB_SERVER_HOST, ZBX_CACHESIZE, ZBX_STARTPOLLERS |
The server reads the file only at startup. The exceptions are the settings you can change at runtime with zabbix_server -R (see below). Everything else needs a restart. To read settings from extra files, use Include=. It accepts a single file, a whole directory, or a wildcard such as /etc/zabbix/zabbix_server.d/*.conf. Putting overrides in separate include files makes package upgrades easier, because the main file stays untouched.
What the example above changes and why
These are the uncommented (active) lines in the example, with what each one does:
| Parameter | Value in example | Purpose |
|---|---|---|
LogFile | /var/log/zabbix/zabbix_server.log | Required when LogType=file (the default). |
LogFileSize | 0 | Turns off Zabbix's own log rotation so the system logrotate job shipped with the package handles it. |
PidFile | /run/zabbix/zabbix_server.pid | Must match the PID path in the systemd unit. |
SocketDir | /run/zabbix | Directory for internal IPC sockets. Moved out of /tmp so systemd's private /tmp and cleanup jobs don't interfere. |
DBName / DBUser / DBPassword | zabbix / zabbix / (password) | Database credentials. DBHost is not set, so it defaults to localhost, which means a local Unix socket for MySQL/MariaDB. |
SNMPTrapperFile | /var/log/snmptrap/snmptrap.log | The file where snmptrapd (through zabbix_trap_receiver.pl or SNMPTT) writes traps for Zabbix to read. |
Timeout | 4 | Seconds to wait for agent, SNMP and external checks. Raised from the default of 3. |
FpingLocation / Fping6Location | /usr/bin/fping / /usr/bin/fping6 | Paths used for ICMP ping items. Debian and Ubuntu install fping in /usr/bin. RHEL-family systems use /usr/sbin. |
LogSlowQueries | 3000 | Logs any database query that takes longer than 3 seconds. Very useful when tracking down performance problems. |
StatsAllowedIP | 127.0.0.1 | Allows zabbix[stats,...] internal checks from localhost only. |
Corrections and caveats for the example
- Plain-text password in a public file.
DBPassword=DevOpsSchool$123has been published. If you used this password anywhere, change it in the database and in the config. A safer setup is shown in the security section below. - SNMP traps are not actually enabled. Setting
SNMPTrapperFiledoes nothing whileStartSNMPTrapperstays at its default of0. To receive traps, addStartSNMPTrapper=1and make sure thezabbixuser can read the trap file. Fping6Locationmay point to a file that doesn't exist. fping 4.0 and later handle IPv6 themselves, and many current distributions no longer ship a separatefping6binary. If/usr/bin/fping6is missing, setFping6Location=(empty) so Zabbix usesfpingfor IPv6 as well.- The example comes from the Zabbix 6.0 series. Later releases add parameters. For example, Zabbix 7.0 adds asynchronous pollers controlled by
StartAgentPollers,StartHTTPAgentPollersandStartSNMPPollers. Always start from thezabbix_server.confthat came with your installed version, not a copy from another release.
# Corrected lines for the example
StartSNMPTrapper=1
SNMPTrapperFile=/var/log/snmptrap/snmptrap.log
FpingLocation=/usr/bin/fping
Fping6Location=
# DBPassword moved to a protected include file (see security section)
Include=/etc/zabbix/zabbix_server.d/*.confCode language: PHP (php)
A minimal working configuration
For a single server with a local MySQL or MariaDB database, this is enough to start. Every parameter you leave out uses its default.
LogFile=/var/log/zabbix/zabbix_server.log
LogFileSize=0
PidFile=/run/zabbix/zabbix_server.pid
SocketDir=/run/zabbix
DBHost=localhost
DBName=zabbix
DBUser=zabbix
Include=/etc/zabbix/zabbix_server.d/*.conf
Timeout=4
LogSlowQueries=3000
StatsAllowedIP=127.0.0.1Code language: JavaScript (javascript)
For PostgreSQL, either set DBHost to the database host name or leave it empty to connect through the local socket. Also set DBPort if PostgreSQL isn't on 5432, and set DBSchema if you don't use the default schema. With MySQL, localhost means a Unix socket. Use 127.0.0.1 to force a TCP connection.
Testing, applying and verifying changes
- Check the syntax before restarting. Zabbix 6.0 and later can validate a config file without starting the daemon:
zabbix_server -T -c /etc/zabbix/zabbix_server.conf. - Restart the service:
sudo systemctl restart zabbix-server. - Watch the log for errors:
sudo tail -f /var/log/zabbix/zabbix_server.log. - Confirm the trapper is listening on port 10051:
sudo ss -tlnp | grep 10051. - Open the frontend dashboard and check that the System information widget shows "Zabbix server is running: Yes".
Some changes don't need a restart. The runtime control option -R sends commands to the running server:
# Reload configuration cache from the database (hosts, items, triggers)
sudo zabbix_server -R config_cache_reload
# Raise or lower log verbosity for a process type without restarting
sudo zabbix_server -R log_level_increase=poller
sudo zabbix_server -R log_level_decrease=poller
# Run housekeeping now
sudo zabbix_server -R housekeeper_execute
# Show high-availability cluster node status (6.0+)
sudo zabbix_server -R ha_statusCode language: PHP (php)
Note: config_cache_reload reloads monitoring configuration from the database. It does not re-read zabbix_server.conf. Changes to the file itself, such as cache sizes or process counts, need a full service restart.
Sizing processes and caches
The defaults work for small installations. As the number of hosts grows, tune the process counts and cache sizes based on Zabbix's internal metrics rather than guesswork. The Zabbix server health template, which is linked to the Zabbix server host by default, collects these metrics.
| Symptom | Internal metric to check | Parameter to adjust |
|---|---|---|
| Items show gaps or a growing queue | zabbix[process,poller,avg,busy] above about 75% | StartPollers (or the async poller settings in 7.0+) |
| "Configuration cache is full" / server stops at startup | zabbix[rcache,buffer,pused] | CacheSize |
| Values delayed before reaching the database | zabbix[wcache,history,pused] | HistoryCacheSize, StartDBSyncers |
| Slow trigger evaluation and many DB reads | zabbix[vcache,cache,hits] and misses | ValueCacheSize |
| Unreachable hosts slow down normal polling | zabbix[process,unreachable poller,avg,busy] | StartPollersUnreachable |
| Ping items late | zabbix[process,icmp pinger,avg,busy] | StartPingers |
Change one parameter at a time, restart, and watch the metric for a while before changing anything else. More processes mean more database connections, so check the database's max_connections limit before raising process counts a lot.
Securing the server configuration
- Restrict file permissions. The file contains credentials. Make it readable only by root and the
zabbixgroup:sudo chown root:zabbix /etc/zabbix/zabbix_server.conf && sudo chmod 640 /etc/zabbix/zabbix_server.conf. - Keep the password in a separate include file with the same permissions, for example
/etc/zabbix/zabbix_server.d/db.confcontaining onlyDBPassword=.... The main file can then be stored in Git without exposing secrets. - Or use a secrets vault. Set
VaultURL, provide the token through theVAULT_TOKENenvironment variable (orVaultToken), and setVaultDBPath.DBUserandDBPasswordmust be left unset whenVaultDBPathis used. - Encrypt database traffic when the database is on another host:
DBTLSConnect=verify_fulltogether withDBTLSCAFile. - Encrypt traffic to agents and proxies using
TLSCAFile,TLSCertFileandTLSKeyFilefor certificates, or PSK configured per host in the frontend. - Keep
AllowRoot=0so the daemon drops privileges toUser=zabbix. - Limit listening and stats access. Use
ListenIPto bind to specific interfaces, keepStatsAllowedIPnarrow, and allow port 10051 through the firewall only from agents and proxies that need it.
High availability settings
Starting with Zabbix 6.0, the server has native high availability. Set a unique HANodeName on each server node and set NodeAddress to the address and port the frontend should use to reach that node. All nodes connect to the same database. One node is active and the others are on standby. If HANodeName is empty, the server runs in standalone mode.
# On node 1
HANodeName=zbx-node1
NodeAddress=10.0.0.11:10051
# On node 2
HANodeName=zbx-node2
NodeAddress=10.0.0.12:10051Code language: PHP (php)
Common startup errors
| Log message or symptom | Likely cause | Fix |
|---|---|---|
| Access denied for user 'zabbix'@'localhost' | Wrong DBUser/DBPassword, or the user was granted access only from another host | Check the grant with SHOW GRANTS FOR 'zabbix'@'localhost'; and correct the password |
| database is down: reconnecting | Database not running, wrong DBHost/DBPort, or socket path mismatch | Start the database. Set DBSocket or use 127.0.0.1 for TCP |
| cannot create IPC / socket errors | SocketDir missing or not writable by zabbix | Create /run/zabbix owned by zabbix. Packages normally create it through systemd-tmpfiles |
| out of memory / please increase CacheSize | Configuration cache too small for the number of objects | Raise CacheSize (for example CacheSize=256M) and restart |
| Unknown parameter in config file | Parameter from another Zabbix version, or a typo | Compare against the default file for your installed version |
| Ping items unsupported | Wrong FpingLocation, or fping lacks setuid/capabilities | Run which fping and confirm the binary can be executed by the zabbix user |
Frequently asked questions
Where is zabbix_server.conf located?
Package installations put it in /etc/zabbix/zabbix_server.conf. Source builds default to /usr/local/etc/zabbix_server.conf. To use a different file, start the daemon with zabbix_server -c /path/to/file.
Do I need to restart Zabbix server after editing zabbix_server.conf?
Yes. The file is read only at startup, so run systemctl restart zabbix-server. Only a few things, such as log levels, the housekeeper and the configuration cache reload, can be triggered at runtime with zabbix_server -R.
How do I test zabbix_server.conf for errors?
In Zabbix 6.0 and later, run zabbix_server -T -c /etc/zabbix/zabbix_server.conf. It parses the file and reports problems without starting the server.
What is the default port for Zabbix server?
The server trapper listens on TCP port 10051, set by ListenPort. Agents listen on 10050, and the Java gateway defaults to 10052.
How do I fix 'Configuration cache is full' in Zabbix?
Increase CacheSize in zabbix_server.conf, for example to 256M, then restart the server. Watch zabbix[rcache,buffer,pused] to check how much headroom is left.
Related tutorials
- What is Zabbix and use cases of Zabbix?
- Zabbix Tutorials: Example of zabbix_agentd.conf
- Top 50 Zabbix interview questions and answers
- More Zabbix tutorials
I’m Rajesh Kumar, a DevOps, SRE, DevSecOps, Cloud, and Platform Engineering expert passionate about sharing practical knowledge, real-world experiences, and industry best practices. I have worked at Cotocus and regularly write about technology, travel, investing, health, product reviews, and digital marketing through my various platforms.
I publish technical articles at DevOps School, travel stories at Holiday Landmark, stock market insights at Stocks Mantra, health and fitness guidance at My Medic Plus, product reviews at TrueReviewNow, and SEO and digital marketing strategies at Wizbrand.
Find Trusted Cardiac Hospitals
Compare heart hospitals by city and services โ all in one place.
Explore Hospitals