Deploying Revive Adserver
Introduction
Revive Adserver is the world’s leading free, open-source ad serving system. Originally known as OpenX Source, Revive Adserver enables website publishers and advertisers to serve, track, and manage their online advertising campaigns with complete control over their data.
Key highlights of Revive Adserver:
- Complete Ad Serving: Serve banner, video, and rich media advertisements
- Campaign Management: Create and manage advertising campaigns with targeting options
- Advertiser and Publisher Portals: Self-service interfaces for advertisers and publishers
- Detailed Statistics: Comprehensive reporting on impressions, clicks, and conversions
- Targeting Options: Geographic, browser, device, and behavioral targeting
- Zone Management: Flexible ad zones with multiple banner types
- Email Reports: Automated campaign performance reports
- Multi-Site Support: Manage ads across multiple websites
- API Access: REST API for programmatic campaign management
- GDPR Compliant: Privacy-focused with consent management options
- Open Source: GPL-licensed with active community development
This guide walks through deploying Revive Adserver on Klutch.sh using Docker and setting up your ad serving infrastructure.
Why Deploy Revive Adserver on Klutch.sh
Deploying Revive Adserver on Klutch.sh provides several advantages:
Simplified Deployment: Klutch.sh automatically builds and deploys Revive Adserver without complex server configuration.
Persistent Storage: Attach persistent volumes for ad creatives and configuration that survive container restarts.
HTTPS by Default: Klutch.sh provides automatic SSL for secure ad serving.
Always-On Availability: Your ad server remains available 24/7 for reliable ad delivery.
Environment Variable Management: Securely store database credentials through Klutch.sh.
Prerequisites
Before deploying Revive Adserver on Klutch.sh, ensure you have:
- A Klutch.sh account
- A GitHub account with a repository for your Revive configuration
- An external MySQL/MariaDB database
- Basic familiarity with Docker
Preparing Your Repository
Create a GitHub repository containing your Dockerfile for Revive Adserver deployment.
Repository Structure
revive-deploy/├── Dockerfile└── .dockerignoreCreating the Dockerfile
Create a Dockerfile in the root of your repository:
FROM revive/revive-adserver:latest
# Set environment variablesENV REVIVE_DB_HOST=${REVIVE_DB_HOST}ENV REVIVE_DB_USER=${REVIVE_DB_USER}ENV REVIVE_DB_PASSWORD=${REVIVE_DB_PASSWORD}ENV REVIVE_DB_NAME=${REVIVE_DB_NAME:-revive}ENV REVIVE_DB_PORT=${REVIVE_DB_PORT:-3306}
# Create necessary directoriesRUN mkdir -p /var/www/html/var \ && mkdir -p /var/www/html/images \ && chown -R www-data:www-data /var/www/html/var \ && chown -R www-data:www-data /var/www/html/images
# Expose the web interface portEXPOSE 80
# The base image includes the default entrypointEnvironment Variables Reference
| Variable | Required | Description |
|---|---|---|
REVIVE_DB_HOST | Yes | MySQL/MariaDB host address |
REVIVE_DB_USER | Yes | Database username |
REVIVE_DB_PASSWORD | Yes | Database password |
REVIVE_DB_NAME | No | Database name (default: revive) |
REVIVE_DB_PORT | No | Database port (default: 3306) |
Deploying Revive Adserver on Klutch.sh
- Select HTTP as the traffic type
- Set the internal port to 80
Push Your Repository to GitHub
Commit and push your Dockerfile to GitHub.
Create a New Project on Klutch.sh
Navigate to the Klutch.sh dashboard and create a new project with a descriptive name like “revive” or “adserver”.
Create a New App
Within your project, create a new app. Connect your GitHub account and select the repository containing your Revive Adserver Dockerfile.
Configure HTTP Traffic
In the deployment settings:
Set Environment Variables
Add the following environment variables:
| Variable | Value |
|---|---|
REVIVE_DB_HOST | Your MySQL host |
REVIVE_DB_USER | Your database user |
REVIVE_DB_PASSWORD | Your database password |
REVIVE_DB_NAME | revive |
Attach Persistent Volumes
Add the following volumes:
| Mount Path | Recommended Size | Purpose |
|---|---|---|
/var/www/html/var | 5 GB | Cache and configuration |
/var/www/html/images | 20 GB | Ad creative storage |
Deploy Your Application
Click Deploy to start the build process.
Access Revive Adserver
Once deployment completes, access the setup wizard at your app URL.
Initial Configuration
Installation Wizard
The setup wizard will guide you through:
- System requirements check
- Database configuration
- Administrator account creation
- Initial configuration options
Setting Up Advertisers
- Navigate to Inventory > Advertisers
- Click Add new advertiser
- Enter advertiser details and contact information
- Create campaigns for the advertiser
Creating Campaigns
- Select an advertiser
- Click Add new campaign
- Configure campaign dates and targeting
- Set impression/click limits and pricing
Adding Banners
- Navigate to a campaign
- Click Add new banner
- Upload creative or configure HTML/JavaScript banners
- Set banner dimensions and targeting
Creating Publisher Zones
- Go to Inventory > Websites & Zones
- Add a new website
- Create zones for banner placement
- Link zones to campaigns
Getting Ad Tags
- Select a zone
- Click Invocation code
- Copy the JavaScript or iframe code
- Embed in your website
Additional Resources
Conclusion
Deploying Revive Adserver on Klutch.sh gives you complete control over your advertising infrastructure with automatic builds, persistent storage, and secure HTTPS access. Whether you’re a publisher monetizing your sites or an advertiser managing campaigns, Revive Adserver on Klutch.sh provides enterprise-grade ad serving without third-party dependencies.