OpenAds : A free and opensource advertising system for serving ads in-house.


Just a dude
vpsBoard Founder
Disappointed I was unable to find a modern solution for serving advertisements in-house, I was contacted by vpsBoard member Novacha about the possibility of him creating a basic system to do what I wanted. If his username sounds familiar, it may be because you saw his Server Management System that he posted here.

Anyhow, even though just a short amount of time has passed, the system has been developed rapidly. I'm very impressed with how quickly the system has been progressing and wanted to share it with the rest of you. I hope you may also find it equally as useful for your own websites or projects that you wish to serve ads from. After the launch of the system on vpsBoard I've noticed that the resource usage on the ad server has remained very low, currently using 74MB/512MB. I wasn't for sure how much of a hog a Python based app would weigh when in production, having very limited experience with Python, but am happy to say that the setup is more or less the same as a LEMP or tuned LAMP stack.

Anyhow, enough of all that. You probably want to check it out! Please see

Screenshots below are of my deployed install:


This is the main view of the administration page. On the right you see my recent actions, which consist of adding, editing, and updating ads as per request from the advertisers. The ability for advertisers to upload and alter their landing page URL is coming soon. Let's click on 'Advertisements'


Here is the advertisement view. I blurred out the right column as it showed the total clicks. The wording has been changed from 'Total Views' to 'Total Clicks' since I took this screenshot 5 minutes ago. :) Pretty basic view. Just shows the ads in rotation and allows you to choose any particular one to edit. Lets click on a link and see where that takes us...


And here we are. This is the ad management page for Flexible Gaming, who has a 728X90 banner ad. Here I can change the landing page URL, upload a new banner, etc. It should be noted that originally banner uploads kept the same filename as the original file. Well, as most of these had things like '728X90_banner.gif' (for example) in the filename, and Ad Block Plus picks up on this, Novacha took the initiative to ensure banner uploads are saved with a unique ID. Want to see stats for a specific ad? You can do so from the 'View On Site' URL on the top right corner. This was added, literally, about an hour or two ago. Lets see what that looks like...


Here you see the banner, the landing page URL, and some basic stats. Looks like ad has had a total of 30 clicks so far since it went live at 10PM Friday night. Not only can I view this page, but now the provider can to (Just have to set you up with an account)! So now both the admin and the provider are able to view stats for their advertisements.

Going back to the main admin index, there is a URL for 'Providers'. Lets look:


This just shows the existing providers who have purchased advertising. Clicking on the URL of the provider allows me to assign a user to that provider.

Here is a list of members with login details:


As the ability for providers to manage their own ads is new, I've not yet set up anyone or contacted anyone with their details. I'll do that soon or later today.  Pretty basic, but straight to the point.

Want to take it for a spin?

Notes before install:

  1. The OpenAds system uses nginx, so you will need to stop Apache if it is already running, as it will prevent nginx from starting
  2. I have verified that the 1-click installer runs on Ubuntu so that is the system I recommend 

Clone the repository to you local computer. You will always deploy from your local computer. You can do that with:

git clone open_ads
Inside the open_ads folder, there should be a hosts_data.json file. This file contains the configuration of the entire server. Most of the fields in here are fairly self explanatory such as the database settings and the email settings.

The server_login is the SSH login for your server. Any of the following combination types are valid:

[email protected]
[email protected]
[email protected]:2222
The website_url is the URL that the website can be accessed at. A few valid examples are:
You should be able to leave deploy_settings alone because you are running this on a standard operating system.

The admin section at the bottom is where you put down emails of people who get sent an email when the site encounters an error.

Once you are finished editing this file, you need to install Fabric for deployment on your local machine. You can do this by running the following command on your local machine.

pip install fabric
Once this is installed, run the following command to create the deployment:

fab make_deploy
As I release updates to the OpenAds system, you can push those updates by running:

fab update_deploy
So make sure you keep the folder you cloned (or at least just the hosts_data.json file)

This should handle updating your server, installing all packages, pulling all the openads code, generate configuration files and upload them (and symlink them), sync and migrate your database and starting all the required services.

You can stop, start, and restart the site by running:

fab server_stop
fab server_start
fab server_restart
on your local machine with your hosts_data.json file.

Things to note:

The default username and password is 'admin' and 'pass'

Integrating Ads

As someone pointed out, ads on vpsBoard are served with an iFrame. Why? Well, the options right now are intergrating ads on websites via iFrames or Javascript, and with some users browsing with javascript disabled I figured iFrames would be the route to go.

Top banners are called from and sidebar banners, well, you guessed it:

Final Thoughts

Novacha is a bad-ass. He whipped up the original version in record time, I'm talking hours. I've got no clue how many updates he's pushed out since the first version was available, but I believe he may be part machine. He won't accept payment, won't accept donation, so if you use it, like it, or have any ideas, please let him know. He'll be happy to hear you're getting use out of this.

Questions? Just post them here.
Last edited by a moderator:


100% Tier-1 Gogent
Definitely need to post part of this as a tutorial.

Looking for ad software that was open source, fast and under any current development was next to impossible.   Everyone appears to have "sold out" to big third party companies that gladly run the ads, pocket big percentages and do who knows what with the clickstream data.

Kudos to Novacha!  Great work and fantastic development time.  Glad to have folks like Novacha in the community here on vpsBoard.


Content Contributer
Definitely need to post part of this as a tutorial.

Looking for ad software that was open source, fast and under any current development was next to impossible.   Everyone appears to have "sold out" to big third party companies that gladly run the ads, pocket big percentages and do who knows what with the clickstream data.

Kudos to Novacha!  Great work and fantastic development time.  Glad to have folks like Novacha in the community here on vpsBoard.
There will be full docs up soon which will contain a fairly comprehensive tutorial and setup instructions. It will be hosted with (open source) to keep everything open.


Just a dude
vpsBoard Founder

These aren't my words, rather Novacha's. Copying here with his permission.

I have just released an update to the advertising system. This update brings better and safer URLs rather than the old click_register url.

The new system signs the URL with a secret key to prevent scanning of advertisements. The new URLs fit the format

If any part of the url is modified, the request fails. The new update requires a settings update, since you need to create a secret key to sign the URLs. Change your other_settings parameter in your hosts_data.json file and add the following to the top:

"secret_key": "ENTER_SECRET_KEY",
so that the other_settings section looks like:

"other_settings": {
    "secret_key": "ENTER_SECRET_KEY",
    "email_host": "localhost",
    "email_host_user": "username",
    "email_host_password": "password",
    "default_from_email": "[email protected]",
    "email_port": 25,
    "email_use_tls": false
Then replace ENTER_SECRET_KEY with a random alphanumeric string and run the update commands:

fab create_local_settings && fab update_deploy

This update also prepares for a future update, where the URL can expire after a certain amount of time to prevent false clicking / spamming of clicking.


Just a dude
vpsBoard Founder
New updates thanks to Novacha:

1.) Django security update.

2.) Compression of data sent to the user (should speed things up).

On your local machine just run:

fab update_deploy

as you typically would.

Out of curiosity, has anyone else installed this or used it for their website or blog?


 I plan on trying this out a bit on my site. I'd have to fork it and add the ability to support raw HTML blocks or something (since my advertisers want rich media ads).

Random fun fact of the day: Did you know? HTML5 brings the ability to forcefully sandbox iframe tags. <iframe sandbox="allow-same-origin allow-scripts allow-popups">