So you've decided to run your own online Tambola platform. You've purchased the source code, you have a domain name, and now you need to get it live. This guide walks you through the complete server setup process for our Next.js + MongoDB Tambola platform — from provisioning your server to your first live game.
💡 Note: Our source code package includes free installation support. We handle the entire setup for you. This guide is for those who want to understand the process or prefer to do it themselves.
Minimum 1 vCPU, 1GB RAM, 20GB SSD. Recommended: 2 vCPU, 2GB RAM for 100+ concurrent players
Ubuntu 22.04 LTS (recommended) or Debian 11+
Node.js 18+ (LTS version). Use nvm for easy version management
MongoDB Atlas (cloud, free tier available) or self-hosted MongoDB 6.0+
Let's Encrypt (free) via Certbot. Required for HTTPS and player trust
Any registrar (GoDaddy, Namecheap, Google Domains). Point A record to your server IP
Once your VPS is provisioned, connect via SSH using the credentials provided by your hosting provider:
ssh root@YOUR_SERVER_IPCreate a non-root user for security best practices:
adduser tambola
usermod -aG sudo tambola
su - tambolaUsing nvm (Node Version Manager) is the cleanest way to install Node.js:
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.5/install.sh | bash
source ~/.bashrc
nvm install 18
nvm use 18
node --version # Should show v18.x.xUpload the source code to your server using SCP or Git. The easiest method for most users is via SFTP using FileZilla, or using a private Git repository:
# Option A: Upload via SCP from your local machine
scp -r ./tambola-source/ tambola@YOUR_SERVER_IP:/home/tambola/tambola-app/
# Option B: Clone from private Git repo
cd /home/tambola
git clone https://github.com/yourusername/tambola-app.git
cd tambola-appCreate your .env.local file with your specific configuration. This file is critical — it contains your database connection and secret keys:
cd /home/tambola/tambola-app
nano .env.local
# Add these variables:
MONGODB_URI=mongodb+srv://username:password@cluster.mongodb.net/tambola
NEXTAUTH_SECRET=your-super-secure-random-secret-key
NEXTAUTH_URL=https://yourdomain.com
NEXT_PUBLIC_SITE_URL=https://yourdomain.comnpm install
npm run buildThe build process compiles your Next.js application for production. This may take 2–5 minutes. If it completes without errors, you're ready to run.
PM2 keeps your Next.js app running continuously, even after server restarts:
npm install -g pm2
pm2 start npm --name "tambola" -- start
pm2 startup
pm2 saveNginx routes web traffic to your Next.js app on port 3000:
sudo apt install nginx -y
sudo nano /etc/nginx/sites-available/tambolaAdd this configuration:
server {
listen 80;
server_name yourdomain.com www.yourdomain.com;
location / {
proxy_pass http://localhost:3000;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection 'upgrade';
proxy_set_header Host $host;
proxy_cache_bypass $http_upgrade;
}
}sudo ln -s /etc/nginx/sites-available/tambola /etc/nginx/sites-enabled/
sudo nginx -t
sudo systemctl restart nginxsudo apt install certbot python3-certbot-nginx -y
sudo certbot --nginx -d yourdomain.com -d www.yourdomain.comCertbot will automatically configure HTTPS and set up auto-renewal. Your site is now accessible at https://yourdomain.com.
.env.local MONGODB_URIpm2 restart tambolaVisit your domain and verify:
/admin🛎️ Remember: Our source code package includes free installation support. If any step feels overwhelming, simply WhatsApp us and we'll complete the setup on your server for you — included in the package price.
We handle the entire server setup for you. Just share your server access and we'll have your Tambola platform live within 24–48 hours.
💬 WhatsApp Us — +91 7083394557