Intelligently rotate AdSense/AdMob, LifeStreetMedia, and other networks & make more money. GreenRobot Ad Server is an API enabled yield optimization system for websites and mobile apps written using PHP Laravel 5.7.
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.

GreenRobot Open-source Adserver

This adserver rotates banner ads between AdSense/AdMob, LifeStreetmedia, and others based on RPM. For AdSense/AdMob and Lifestreetmedia, the RPM is automatically retrieved by the server using network APIs, for other networks you will have to edit the RPM yourself.

This adserver is for desktop sites and mobile web, as well as native mobile apps. Specifically, I use it on a Facebook app, which is also accessible outside of the Facebook frame once you're logged in via Facebook connect. It should also work fine on desktop or mobile web sites not using Facebook login. For mobile apps, I have made some code available to work with the adserver. I am still working on this, including adding documentation.

For iOS:

For Android:

Screenshot 1 Screenshot 2 Screenshot 3 Screenshot 4 Screenshot 5


I recommend using Linux or Mac OS X. I have not tried this under Windows. For production/linux, I have it deployed to a Centos server on Linode and it's running currently. For development I use Mac OS X with Laravel Homestead development environment.

Steps to install:

  1. You must use PHP 7.1 or greater.
  2. Git clone the adserver code from Github:
  3. Edit database/seeds/UserTableSeeder.php with your preferred email and password.
  4. Install PHP Composer
  5. php composer.phar install
  6. Create database
  7. Move .env.example to .env and fill in your database credentials.
  8. Run php artisan migrate
  9. Run php artisan db:seed
  10. You should setup a new subdomain for this adserver, and point it to the public folder.
  11. Login with your email and password and setup your Google Client secrets, Google Account Info and LifeStreetMedia account info.
  12. What is the route I am suppose to provide for the Adsense Oauth Callback when setting up the google_clients_secrets.json? The route would be the address of your webserver. You should setup a domain or subdomain for it to work. For example:
  13. Setup something like the following in cron (your path to artisan may vary): * * * * * php /var/www/html/adserver/artisan schedule:run >> /dev/null 2>&1

Developer Notes

Note for developers: I have set debug to false in config/app.php so this is ready to go for production installs. If you wish to debug, set this value to true. Setting it to true may cause your database password to be exposed if a connection error occurs.

Contact / Security Bugs

You can use Github issues for regular bugs and feature requests. For security issues or if you have any questions you don't want to discuss publicly you can email me:

Facebook Discussion Group

Join the discussion on Facebook about GreenRobot Adserver:

Twitter Updates

Follow GreenRobot Adserver on Twitter:


-Document iOS & Android sdk integration

-I would like to add Facebook Audience network to this adserver.


We take openness and inclusivity very seriously. To that end we have adopted the following code of conduct.

Contributor Code of Conduct