The passive income promise that failed
You’ve read the stories. Someone builds a niche website, writes fifty articles, puts up some Amazon affiliate links, and makes $10,000 per month while sleeping. You tried it. You built the site. Wrote the content. Got some traffic. Made twelve dollars in six months.
What went wrong?
For a digital nomad in Bali running fifteen niche review sites, the problem was hosting. Cheap shared hosting meant slow pages, frequent downtime, and Google crawling their sites less often. Rankings dropped. Traffic dropped. Income disappeared.
They moved everything to a RakSmart VPS. Six months later, their monthly affiliate income went from 800to4,200. The hosting change didn’t do everything. But it enabled everything else.
Let me show you how to turn a VPS into a passive income machine. These are the exact configurations that let you run multiple niche sites, review blogs, and affiliate funnels without losing your mind or your money.
Why niche sites need a VPS more than any other website
Niche sites have a specific traffic pattern. You write an article. It sits there for weeks or months. Then suddenly, it ranks for a keyword. Traffic jumps from ten visits per day to five hundred. Then it drops. Then another article ranks. Spiky, unpredictable traffic.
Shared hosting hates this pattern. You spike to five hundred concurrent visitors. The host detects a resource spike and throttles you. Or worse, they suspend your account for “abusing resources.”
A VPS doesn’t care. Your resources are yours. Spike to five hundred visitors. Then drop to ten. The VPS adjusts automatically. No throttling. No suspension.
The Bali affiliate ran fifteen niche sites on a single RakSmart VPS. Monthly page views across all sites: 350,000. Peak hourly traffic: 8,000 visitors during a Reddit surge. The VPS handled it without a single error.
Old hand tip. If you’re running multiple niche sites, use a separate subdirectory or subdomain for each site on the same VPS. One Nginx config serves all fifteen sites. One backup script backs up all fifteen. One set of tools manages all fifteen. Efficiency is profit.
The lean Nginx setup for affiliate and review sites
Affiliate sites are mostly content. Text, images, comparison tables, and outbound links. No comments. No logins. No shopping carts. Simple.
Here’s the optimized Nginx config the Bali affiliate uses for each niche site.
sudo nano /etc/nginx/sites-available/niche-review-site.com
server {
listen 443 ssl http2;
server_name niche-review-site.com www.niche-review-site.com;
root /var/www/niche-review-site.com/html;
index index.html index.htm;
ssl_certificate /etc/letsencrypt/live/niche-review-site.com/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/niche-review-site.com/privkey.pem;
HTTP/2 for faster loading
ssl_protocols TLSv1.2 TLSv1.3;
ssl_ciphers HIGH:!aNULL:!MD5;
Gzip compression
gzip on;
gzip_types text/html text/css text/javascript application/javascript image/svg+xml;
Static asset caching
location ~* .(jpg|jpeg|png|webp|gif|ico|css|js|svg|woff|woff2)$ {
expires 1y;
add_header Cache-Control “public, immutable”;
access_log off;
}
Main content location
location / {
try_files uriuri/ =404;
}
Protect affiliate link redirects from bot spam
location /go/ {
internal;
return 404;
}
}
server {
listen 80;
server_name niche-review-site.com www.niche-review-site.com;
return 301 https://servernamerequest_uri;
}
Why the /go/ location is marked internal? Because the Bali affiliate uses a simple PHP script to track outbound affiliate clicks and redirect. That script lives at /go/product-name. Marking the location internal prevents direct access. All clicks go through the tracking script first.
Here’s the affiliate link tracking script they use. Save as /var/www/niche-review-site.com/html/go.php.<?php $link_id = $_GET[‘id’] ?? ”; $links = [ ‘product1’ => ‘https://amazon.com/dp/B000123456?tag=youraffiliatecode’, ‘product2’ => ‘https://clickbank.net/product?affiliate=yourid’, ]; if (isset($links[$link_id])) { $ip = $_SERVER[‘REMOTE_ADDR’]; file_put_contents(‘/var/log/affiliate-clicks.log’, “$ip clicked $link_id at ” . date(‘Y-m-d H:i:s’) . “\n”, FILE_APPEND); header(“Location: ” . $links[$link_id], true, 302); exit; } http_response_code(404); echo “Link not found”; ?>
Then rewrite URLs in Nginx so /go/product1 calls go.php?id=product1.
location /go/ {
rewrite ^/go/(.*)/go.php?id=1 last;
}
Now every affiliate click is logged. You know which products convert. You can optimize your content around what actually sells.
Old hand tip. Rotate your affiliate link destination every few months. Some merchants expire affiliate cookies or change terms. Use a simple database or flat file to manage all your affiliate links in one place. Update once, and all your site’s links update automatically.
Automated content and site management for passive income
Passive income isn’t truly passive. But you can reduce the workload dramatically with automation on your VPS.
The Bali affiliate runs a cron job that checks each niche site’s content freshness. If an article is older than ninety days without updates, the script sends an alert. Then they refresh the article with new data, comparisons, or prices.
Here’s the content freshness checker.
#!/bin/bash
SITES=”/var/www/niche-site1.com/html /var/www/niche-site2.com/html“
for site in SITES;dofindsite -name “*.html” -mtime +90 | while read old_file; do
echo “Old content: $old_file” | mail -s “Update needed” your-email@example.com
done
done
They also use WP-CLI for any niche site that runs WordPress. But most of their sites are static HTML generated from Markdown. They write content locally in Obsidian or VS Code, commit to a Git repository, and pull to the VPS.
Create a Git webhook on the VPS.
sudo mkdir -p /var/www/git-hooks
sudo nano /var/www/git-hooks/post-receive
#!/bin/bash
while read oldrev newrev refname; do
branch=(gitrev−parse−−symbolic−−abbrev−refrefname)
if [ “main” = “branch“];thengit−−work−tree=/var/www/niche−site.com/html−−git−dir=/var/repo/niche−site.gitcheckout−fecho“Siteupdatedat(date)” >> /var/log/site-deploy.log
fi
done
Now every time they push new content from their laptop, the live site updates automatically. No FTP. No manual uploads. Just write, push, done.
The Bali affiliate spends about eight hours per week on fifteen niche sites. That’s thirty minutes per site. Most of that time is writing new content. The VPS handles everything else automatically.
Scaling affiliate income with multiple sites on one VPS
The Bali affiliate started with one niche site. Made 200permonth.Builtasecondsite.Made400 total. Third site. 700total.Bysitefifteen,monthlypassiveincomehit4,200.
But they didn’t buy fifteen separate hosting accounts. Everything runs on one RakSmart VPS. Here’s how they organize fifteen sites on a single server.
Directory structure.
/var/www/
├── site1.com/
│ └── html/
├── site2.com/
│ └── html/
├── site3.com/
│ └── html/
└── shared/
├── affiliate-links.json
├── tracking.js
└── analytics.php
Each site has its own Nginx server block. All sites share common assets from the shared directory.
In each site’s Nginx config, alias the shared directory.
location /shared/ {
alias /var/www/shared/;
}
Now all sites use the same affiliate tracking script, the same analytics code, and the same conversion tracking pixels. Update one file in shared, and all fifteen sites update instantly.
The Bali affiliate also runs a single Redis instance for all fifteen sites. Caching static content, storing session data, and rate limiting comment forms on the few sites that allow comments.
docker run -d –name redis-shared –memory=”512m” –restart always redis
Each site’s PHP config points to this same Redis instance. Fifteen sites sharing one cache. Efficient and fast.
Old hand tip. If one niche site starts ranking and getting serious traffic, consider moving it to its own small VPS. The other fourteen stay on the main VPS. Isolation prevents a traffic spike on one site from affecting others. But for most niches, one VPS is fine.
Monetization beyond Amazon affiliate
Amazon changed its affiliate commission structure. Many niches got crushed. The Bali affiliate learned to diversify.
On their RakSmart VPS, they run multiple monetization methods.
First, direct display ads. They host their own ad server using a lightweight PHP script. Instead of giving AdSense 32% of revenue, they sell banner ads directly to relevant businesses in their niche.
The ad server is simple. A flat file JSON database of ads with impressions and click tracking.
/var/www/shared/ads.json
[
{“id”:1, “image”:”/shared/ads/product-ad.jpg”, “url”:”/go/ad1″, “impressions”:0, “clicks”:0, “active”:true}
]
A PHP script randomly selects an active ad and updates impression count.<?php $ads = json_decode(file_get_contents(‘/var/www/shared/ads.json’), true); $active_ads = array_filter($ads, function($ad) { return $ad[‘active’]; }); if (count($active_ads) > 0) { $ad = $active_ads[array_rand($active_ads)]; $ad[‘impressions’]++; file_put_contents(‘/var/www/shared/ads.json’, json_encode($ads)); echo ‘<a href=”‘ . $ad[‘url’] . ‘”><img src=”‘ . $ad[‘image’] . ‘”></a>’; } ?>
Second, digital products. The Bali affiliate sells PDF guides, checklists, and templates related to their niches. Hosting the products on the VPS means no Etsy or Gumroad fees.
They use a simple one-time download token system. Customer pays via Stripe or PayPal. Webhook hits a PHP script on the VPS that generates a unique, one-time-use download link and emails it to the customer.
Third, email list rental. Their niche sites have built email lists. Thousands of targeted subscribers. Businesses pay to send offers to these lists. The VPS hosts a simple email sending service using Postfix with strict rate limits.
Fourth, sponsored posts. Instead of joining expensive sponsored post networks, they built a “Write for Us” page on each niche site. Sponsors contact them directly. They set pricing based on domain authority and monthly traffic.
The Bali affiliate now gets 40% of affiliate revenue from Amazon, 25% from display ads, 20% from digital products, and 15% from sponsored posts and list rentals. Diversification keeps income stable when one channel dips.
SEO and site speed as a ranking factor
Google confirmed that page speed is a ranking factor. By moving to a RakSmart VPS, the Bali affiliate improved their Core Web Vitals scores dramatically.
Before VPS. Largest Contentful Paint averaged 3.8 seconds. Cumulative Layout Shift was 0.25. First Input Delay was 180ms.
After VPS with optimization. LCP dropped to 1.2 seconds. CLS to 0.05. FID to 35ms.
Search Console showed a noticeable improvement in average position for their target keywords. Pages that were stuck on page two moved to page one. Traffic increased without any additional content creation.
Here’s the exact Core Web Vitals optimization they applied on the VPS.
First, enable Brotli compression instead of Gzip. Brotli compresses HTML and CSS better than Gzip.
In Nginx, after installing the Brotli module.
brotli on;
brotli_comp_level 6;
brotli_types text/html text/css text/javascript application/javascript;
Second, preconnect to critical third-party origins. If you use Google Fonts, Google Analytics, or external APIs, add these headers.
add_header Link “https://fonts.googleapis.com; rel=preconnect”;
add_header Link “https://www.google-analytics.com; rel=preconnect”;
Third, inline critical CSS for above-the-fold content. The Bali affiliate uses a build process that extracts critical CSS from each page and inlines it in the head. The rest of the CSS loads asynchronously.
Fourth, lazy load images that are below the fold. Add loading=”lazy” to image tags.<img src=”product.jpg” loading=”lazy” alt=”Product review”>
The combination of VPS speed and these optimizations moved several of their competitive keywords from position 12 to position 6 or 7. More traffic. More clicks. More affiliate commissions.
Old hand tip. Run Lighthouse from inside the VPS itself using Chrome headless. That tells you the raw server response time without network latency. Aim for Time to First Byte under 100ms from the VPS. If it’s higher, your optimization isn’t finished.
Protecting your passive income from disasters
Passive income stops being passive when your site goes down and you don’t know it for three days.
The Bali affiliate learned this lesson. Their best converting site, making 1,200permonth,wentdownforsixhoursduringaservermigration.Theydidn′thavemonitoringsetup.Lostabout10 in affiliate commissions. Not huge. But the principle hurt.
Now they monitor everything.
First, Uptime Kuma running in Docker on the same VPS. It checks each niche site every thirty seconds.
docker run -d –name uptime-kuma –restart always -p 3001:3001 -v /opt/uptime-kuma/data:/app/data louislam/uptime-kuma
Second, a secondary monitoring service from outside the VPS. They use Upptime, which is free and runs on GitHub. If both the VPS and the internet connection to it fail, Upptime still alerts them.
Third, automated backups that run twice daily. Once at 2 AM, once at 2 PM. Backups go to a different VPS at a different hosting provider. The backup script.
#!/bin/bash
BACKUP_DATE=(date+tar−czf/backups/all−niche−sites−BACKUP_DATE.tar.gz /var/www/
rsync -avz /backups/ backup-user@backup-vps:/backups/niche-sites/
find /backups/ -name “*.tar.gz” -mtime +14 -delete
Cron runs this at 2 AM and 2 PM.
0 2,14 * * * /usr/local/bin/backup-all-sites.sh
Fourth, a simple restore test every month. Pick one niche site at random, delete it from the VPS, and restore from backup. If it takes longer than fifteen minutes, they optimize the restore process.
Old hand tip. Document your restore process step by step. In a crisis, you won’t remember the exact commands. Having a runbook saves hours of panic.
The real numbers from the Bali affiliate
Fifteen niche sites. All on one RakSmart VPS. All generating affiliate income.
Monthly expenses:
- VPS hosting: one fixed cost
- Domain renewals: fifteen domains
- Email sending service: small monthly fee
- Total monthly cost: low
Monthly revenue:
- Amazon Associates: $1,680
- Other affiliate networks: $920
- Direct display ads: $600
- Digital product sales: $480
- Sponsored posts and list rentals: $520
- Total monthly revenue: $4,200
Profit after expenses: about $4,000 per month. All from fifteen sites built over two years.
The affiliate spends about eight hours per week on these sites. That’s thirty-two hours per month. Effective hourly rate for their work: $125 per hour. That’s passive income done right.
Could they make more with a full-time job? Probably. But they live in Bali. Wake up whenever. Work from cafes. Travel when they want. The VPS keeps running. The affiliate links keep clicking. The money keeps arriving.
That’s the freedom passive income can buy.
FAQ – Passive income niche sites on a VPS
Q: How much traffic do I need on a niche site to cover the cost of a VPS?
A. Very little. A RakSmart VPS is inexpensive. If your niche site makes 50permonth,you′vecoveredthecost.Anythingabovethatisprofit.Mostdecentnichesitesmake100 to $500 within six months.
Q: Can I use free hosting instead of a VPS when starting?
A. You can. But free hosting kills your SEO and conversion rates. Slow sites don’t rank. Slow sites don’t convert. You’ll spend months building content only to have Google ignore you. Start on a low-cost VPS. The small investment is worth it.
Q: What’s the best affiliate network for niche sites on a VPS?
A. Start with Amazon Associates. It’s easy to get approved. Commissions are low but consistent. Once you have traffic, add ShareASale, CJ Affiliate, Impact, and direct partnerships with merchants in your niche.
Q: How do I drive traffic to my niche sites without buying ads?
A. SEO is the primary channel. Write content that answers questions. Target long-tail keywords with low competition. Build backlinks by guest posting, broken link building, and HARO. Also share your content on Pinterest, Reddit, and niche-specific forums.
Q: What if Google updates its algorithm and my traffic drops?
A. Diversify. The Bali affiliate’s income didn’t collapse during updates because they have multiple sites and multiple monetization methods. One site might drop 30% while another rises 40%. The aggregate stays stable.
Q: Is it too late to start niche sites for passive income?
A. No. People ask this every year. Every year, new niches emerge. New affiliate programs launch. New search features change the game. The opportunity isn’t gone. It’s just moved. Find a small corner of the market that’s underserved. Build a better site than what exists. Promote it honestly. The money will follow.
The final word on VPS passive income
The Bali affiliate’s journey from 800to4,200 per month didn’t happen because they found a secret niche or hacked Google. It happened because they moved to reliable hosting that enabled everything else.
A RakSmart VPS gives you speed to rank. Stability to keep ranking. Flexibility to run multiple sites, multiple monetization methods, and multiple automation scripts.
You still have to write the content. Still have to promote the sites. Still have to optimize conversions.
But the VPS handles the technical side so you can focus on the money side.
One weekend to set it up. Thirty minutes per week to maintain. A VPS that runs 24/7 earning while you sleep.
That’s the passive income promise. Delivered.