---
name: revive-adserver
description: Revive Adserver recipe for open-forge. Free, open source ad serving system for publishers to serve ads, manage campaigns, track performance, and target delivery. Source: https://github.com/revive-adserver/revive-adserver
---

# Revive Adserver

The world's most popular free, open source ad serving system. Enables publishers to serve ads on their websites, manage campaigns from advertisers and ad networks, track and report on campaign success, and set rules for targeted delivery. Upstream: <https://github.com/revive-adserver/revive-adserver>. Website: <https://www.revive-adserver.com/>.

Formerly known as OpenX Adserver and phpAdsNew. PHP-based, runs on Apache/Nginx + MySQL.

## Compatible install methods

| Method | Platform | Notes |
|---|---|---|
| Release package | PHP + Apache/Nginx + MySQL | **Only supported method.** Download from https://www.revive-adserver.com/download/ |
| Hosted edition | SaaS | Managed service at https://www.revive-adserver.net/ — out of scope. |

> **Important:** Do NOT install from the GitHub ZIP. The GitHub repo is for development only and is missing files removed during release packaging. Always download the release package from the official website.

## Inputs to collect

| Phase | Prompt | Notes |
|---|---|---|
| setup | "Domain / hostname for the adserver?" | e.g. `ads.example.com` |
| database | "MySQL database name?" | e.g. `revive` |
| database | "MySQL username / password?" | Dedicated DB user recommended |
| admin | "Admin email address?" | For admin account creation |
| admin | "Admin password?" | Set during web installer |
| network | "Delivery URL (CDN or same domain)?" | Can serve ads from a separate delivery domain |

## Software-layer concerns

- **Requirements:** PHP 7.4+ (PHP 8.x supported), MySQL 5.7+ or MariaDB 10.4+, Apache 2.4+ or Nginx
- **PHP extensions:** `gd`, `pcre`, `openssl`, `zlib`, `xml`, `mbstring`
- **Config file:** `www/admin/plugins/etc/reviveadserver.conf.php` (auto-generated by installer)
- **Data dir:** `var/` — stores logs, cache, and uploaded images; must be writable
- **Upload dir:** `www/images/` — ad creatives

### Basic install steps

1. Download the release package from https://www.revive-adserver.com/download/
2. Extract to your web root (e.g. `/var/www/ads/`)
3. Create a MySQL database and user
4. Visit `http://your-domain/` — the web installer will run automatically
5. Complete the setup wizard (DB credentials, admin account, delivery URL)
6. Set up a cron job for maintenance:
   ```bash
   */5 * * * * php /var/www/ads/scripts/maintenance/maintenance.php
   ```

### Nginx config (minimal)

```nginx
server {
    listen 80;
    server_name ads.example.com;
    root /var/www/ads/www;
    index index.php;

    location / {
        try_files $uri $uri/ /index.php?$args;
    }

    location ~ \.php$ {
        fastcgi_pass unix:/run/php/php8.1-fpm.sock;
        fastcgi_index index.php;
        include fastcgi_params;
        fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
    }
}
```

## Upgrade procedure

1. Download the new release package from https://www.revive-adserver.com/download/
2. Back up database and the `var/` directory
3. Extract the new package over the existing installation (overwriting files)
4. Visit `http://your-domain/www/admin/install.php` — the upgrade wizard will run
5. Follow the on-screen instructions
6. Clear any opcode cache (OPcache): `service php-fpm restart`

## Gotchas

- **Never use the GitHub ZIP for installation** — it is incomplete and not suitable for production.
- **Maintenance cron is required**: without it, statistics won't aggregate and reports will be stale.
- **`var/` directory must be writable** by the web server user (`www-data`); missing permissions causes blank ad zones.
- **Separate delivery domain** (e.g. `delivery.example.com`) improves ad serving performance by avoiding cookie overhead.
- **PHP 8.x compatibility**: fully supported from Revive 5.4+. Older releases require PHP 7.x.
- **Ad blockers**: most modern ad blockers will block requests from your adserver domain by default.

## References

- [Upstream README](https://github.com/revive-adserver/revive-adserver#readme)
- [Official website](https://www.revive-adserver.com/)
- [Download page](https://www.revive-adserver.com/download/)
- [Documentation](https://www.revive-adserver.com/support/documentation/)
