Target: Observium Community Edition on Apache + PHP + MySQL/MariaDB + RRDtool, with SNMP-based discovery/polling driven by cron. Community edition is git-based (no installer script like the Pro/Enterprise tarball releases), so this pulls straight from the public repo mirror.
0. Assumptions
- Fresh Ubuntu 24.04 LTS VPS, non-root sudo user
- Community edition — if you're actually licensing Observium Pro/Ent,
use their
observium_installertarball/script instead of git clone; everything else below (Apache/PHP/MySQL layer) still applies
1. Base packages
sudo apt update && sudo apt upgrade -y
sudo apt install -y apache2 libapache2-mod-php php php-cli php-mysql \
php-gd php-json php-curl php-snmp php-xml php-mbstring php-zip \
mariadb-server mariadb-client snmp fping rrdtool subversion \
python3-mysqldb whois git graphviz imagemagick2. MariaDB
sudo systemctl enable --now mariadb
sudo mysql_secure_installation
sudo mysql -u root -p <<'EOF'
CREATE DATABASE observium DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
CREATE USER 'observium'@'localhost' IDENTIFIED BY 'CHANGE_ME_STRONG_PW';
GRANT ALL PRIVILEGES ON observium.* TO 'observium'@'localhost';
FLUSH PRIVILEGES;
EOFEnable strict InnoDB settings Observium expects — edit
/etc/mysql/mariadb.conf.d/50-server.cnf:
[mysqld]
innodb_file_per_table=1
sql_mode=""sudo systemctl restart mariadb3. Fetch Observium
sudo mkdir -p /opt/observium
cd /opt
sudo git clone https://github.com/observium/observium.git4. Directory perms
sudo chown -R www-data:www-data /opt/observium/rrd /opt/observium/logs
sudo chmod -R 775 /opt/observium/rrd /opt/observium/logs5. Configuration
cd /opt/observium
sudo cp config.php.default config.phpEdit /opt/observium/config.php:
$config['db_extension'] = 'mysqli';
$config['db_host'] = 'localhost';
$config['db_user'] = 'observium';
$config['db_pass'] = 'CHANGE_ME_STRONG_PW';
$config['db_name'] = 'observium';
$config['base_url'] = 'https://observium.example.com/';
$config['rrd_dir'] = '/opt/observium/rrd';
$config['rrdtool'] = '/usr/bin/rrdtool';
$config['mib_dir'] = '/opt/observium/mibs';
$config['snmp']['community'] = array('YOUR_RO_COMMUNITY');6. Build the schema
cd /opt/observium
sudo php discovery.php -uThis applies pending DB migrations (includes/update/*). Re-run after
every git pull — it's idempotent and safe.
7. Apache vhost
sudo a2enmod rewrite php8.3/etc/apache2/sites-available/observium.conf:
<VirtualHost *:80>
ServerName observium.example.com
DocumentRoot /opt/observium/html/
<Directory "/opt/observium/html/">
AllowOverride All
Options FollowSymLinks
Require all granted
</Directory>
ErrorLog ${APACHE_LOG_DIR}/observium_error.log
CustomLog ${APACHE_LOG_DIR}/observium_access.log combined
</VirtualHost>sudo a2ensite observium
sudo a2dissite 000-default
sudo systemctl reload apache2TLS via certbot:
sudo apt install -y certbot python3-certbot-apache
sudo certbot --apache -d observium.example.comIf you'd rather run Nginx (matching your LibreNMS/NetBox stack) instead
of Apache, use a try_files/fastcgi_pass vhost pointed at
/opt/observium/html with PHP-FPM the same way as the LibreNMS guide —
Observium doesn't require Apache specifically, mod_rewrite-equivalent
try_files handling is all it needs.
8. Create the first admin user
cd /opt/observium
sudo ./adduser.php admin CHANGE_ME_STRONG_PW 10The trailing 10 is the access level (10 = admin).
9. Add and discover devices
cd /opt/observium
sudo ./add_device.php nlxsvz71.ramnode.com v2c YOUR_RO_COMMUNITY
sudo ./discovery.php -h all
sudo ./poller.php -h all10. Cron
sudo tee /etc/cron.d/observium >/dev/null <<'EOF'
33 */6 * * * root /opt/observium/discovery.php -h all >> /dev/null 2>&1
*/5 * * * * root /opt/observium/poller-wrapper.py 4 >> /dev/null 2>&1
EOFpoller-wrapper.py fans out polling across N parallel workers (4
here — tune to core count). For larger fleets, bump the worker count
and interval carefully; SNMP timeouts stack up fast on constrained
VPS CPU.
11. Log rotation
sudo tee /etc/logrotate.d/observium >/dev/null <<'EOF'
/opt/observium/logs/*.log {
daily
rotate 14
compress
delaycompress
missingok
notifempty
}
EOF12. Firewall
sudo ufw allow OpenSSH
sudo ufw allow 80,443/tcp
sudo ufw enable13. Validate
Log in at https://observium.example.com/, confirm the device you
added shows graphs after the first poller run completes (give it one
full 5-minute cycle). Check /opt/observium/logs/ if graphs stay
empty — usually an RRD permissions or SNMP timeout issue.
Notes on running LibreNMS + Observium + NetBox side-by-side
If these all land on one VPS rather than three separate instances:
- Pick one of Apache or Nginx system-wide and run the other app's PHP over FPM behind it — don't run both web servers bound to :80/:443.
- Give each app its own MySQL/MariaDB database and dedicated unprivileged DB user (done above) — never share credentials across apps.
- Watch RAM: LibreNMS + Observium pollers running concurrently on a 4GB VPS can OOM under load; consider staggering poller intervals or sizing up to 8GB if fleet size grows past ~100 devices per tool.
