← All content

Migrating Revive Adserver to Self-Hosted Docker with PostgreSQL

September 26, 2026· Jorge Iglesias
Stylized illustration of multiple web browser windows and mobile screens displaying web pages with orange ad blocks, arranged in a layered composition against a teal and orange background with abstract plant elements.

For a long time, our advertising ran on an older Revive Adserver 5.4.1 installation at Hosting.com. We decided to move the infrastructure to a self-hosted environment, upgrading to Revive Adserver 6.0.8. The new stack runs in Docker on our own server, with the database switched from MySQL to PostgreSQL 18. The service is now served securely over HTTPS at our dedicated ad subdomain.

The Database Migration

The most critical part of the move was ensuring data integrity. We imported 52 database tables while strictly preserving the original record IDs. This preserved the relationships between our four advertisers, four campaigns, six banners with their original images, and six ad zones.

We also retained historical statistics. The system carried over 3,558 impressions and 20 clicks from July 2023 to January 2024. After processing three additional records from March 2024, the totals reached 3,561 impressions and 20 clicks. The initial maintenance run took nine minutes to catch up on this historical data.

Configuration Challenges

The upgrade from version 5 to 6 required three specific fixes to ensure the interface and delivery worked correctly behind our reverse proxy:

  1. Secure Links: We had to force secure links to prevent mixed content issues where HTTP and HTTPS resources were loading together.
  2. Compression Settings: A default compression setting was breaking the admin pages. Disabling this resolved the rendering issues.
  3. Plugin Registration: The ten bundled plugins had to be re-registered.

Client Integration: 413.news

A key test of the new system was switching over 413.news. We moved four live ads out of their content management system into Revive. These included two ads for Ireland Green Clean and two for KI Building & Remodeling. We left draft ads untouched and preserved all original logos and campaign tracking tags.

One immediate improvement was rotation. The two footer ads now rotate, whereas the old site setup always displayed the same ad. Both footer advertisers now get shown.

Delivery and Security Mechanisms

We implemented strict delivery controls to ensure performance and security. Ads load in isolated frames and only when scrolled into view. They follow the site’s light and dark themes and hide themselves if they fail to load.

The site only accepts sizing messages from the ad server’s own frame. During testing, we verified that a faked message was rejected, preventing potential manipulation of ad dimensions.

Revive counts ads delivered, while the site’s Matomo analytics counts ads that are at least 50% visible on screen. Because these tools measure different things, the numbers are not expected to match exactly, and that is by design.

Ranking and Weighting

On September 24, we applied a new ranking structure across 413.news, SWFL.io, and Mangrv.com. Exblanket holds the prominent dedicated spot on homepages and articles. The smaller spots rotate among IglesiasTech, KI Building & Remodeling, Ireland Green Clean, and Karii’s Recipes.

We used weights of 4:3:2:1 for these four advertisers, respectively. Ads change when a page opens, never on a timer, and the same advertiser is not repeated back to back in a browser tab. Weighting does not guarantee that every advertiser appears on every visit, nor does it ensure exact percentage distribution. It is a probabilistic mechanism, not a hard guarantee.

Testing and Safety

Before any live switch, we ran each site’s new version against restored copies of its content databases in isolated containers. We performed twelve homepage and article checks at phone (390 pixels) and desktop (1280 pixels) widths. These checks found no sideways scrolling, and article text remained unchanged.

We opened 24 pages to verify that every smaller advertiser was served correctly. A public article stayed unchanged for 35 seconds to ensure stability. Test clicks were intercepted so they did not inflate clients’ statistics. These were correctness checks, not traffic measurements.

Encrypted backups were taken and actually test-restored before every change. Previous site versions were kept ready for rollback. In one instance, the first 413.news switch rolled itself back automatically because the health check was pointed at the wrong port. Once we corrected the check, it passed. We also fixed an issue on Mangrv so long source links wrap correctly on phones.

The Lesson

The biggest takeaway from this migration is the value of automatic rollback and restore-tested backups. They turned a failed switch into a non-event. It also reinforced that a health check is only as good as what it actually checks. If you are migrating ad infrastructure, prioritize the safety net as much as the upgrade itself.

Share