An automated installation script for deploying Remnawave VPN panel infrastructure with Supabase PostgreSQL database support.
This script is a customized fork of the official Remnawave reverse-proxy installer that replaces the default local PostgreSQL container with Supabase cloud database. This provides several advantages:
- Managed Database: No need to maintain PostgreSQL yourself
- Automatic Backups: Supabase handles database backups
- Scalability: Easy to scale database resources as needed
- High Availability: Built-in redundancy and reliability
- Cost Effective: Free tier available for small deployments
- OS: Debian 11/12 or Ubuntu 22.04/24.04
- Architecture: x86_64 or ARM64
- RAM: Minimum 1GB (2GB+ recommended)
- Disk: 10GB+ free space
- Root Access: Required
- Network: Public IP address with ports 80, 443, and 2222 accessible
You need three domains or subdomains with DNS configured:
- Panel Domain: Admin panel access (e.g.,
panel.yourdomain.com) - Subscription Domain: User subscription endpoint (e.g.,
sub.yourdomain.com) - Node Domain: Traffic proxy "camouflage" domain (e.g.,
node.yourdomain.com)
All domains must point to your server's IP address via A records.
Before running the script, you need to set up a Supabase database:
-
Go to supabase.com and sign up/login
-
Click "New Project"
-
Choose an organization
-
Enter project details:
- Name: Choose any name (e.g., "remnawave-db")
- Database Password: Create a strong password (save this!)
- Region: Choose closest to your server (e.g., EU Central for AWS Frankfurt)
- Pricing Plan: Free tier works for small deployments
-
Wait for project to be created (~2 minutes)
-
In your Supabase project dashboard, go to Settings → Database
-
Scroll down to Connection String section
-
Select Connection Pooling → Session mode
-
You'll see a URL like:
postgresql://postgres.abcdefghijklmnop:[YOUR-PASSWORD]@aws-1-eu-central-1.pooler.supabase.com:5432/postgres -
Extract these values:
- Project Identifier: The part after
postgres.and before:[YOUR-PASSWORD]- Example:
abcdefghijklmnop
- Example:
- Database Password: The password you set when creating the project
- Project Identifier: The part after
Important Notes:
- Use the Connection Pooling URL (with
pooler.supabase.com), NOT the direct connection - Make sure to use Session mode pooling
- Save both the project identifier and password - you'll need them during installation
The Remnawave application may require certain PostgreSQL extensions. In Supabase:
- Go to Database → Extensions
- Enable these extensions if needed:
uuid-ossp: UUID generationpgcrypto: Cryptographic functions
The fastest way to install:
sudo bash <(curl -Ls https://raw.githubusercontent.com/organicnz/egames-remnawave-supabase/main/install_remnawave.sh)This command downloads and executes the script directly without saving it locally.
If you prefer to download the script first:
# Download the script
wget https://raw.githubusercontent.com/organicnz/egames-remnawave-supabase/main/install_remnawave.sh
# Make it executable
chmod +x install_remnawave.sh
# Run as root
sudo bash install_remnawave.shThe script will guide you through an interactive installation process:
Choose your preferred language:
1- English2- Русский (Russian)
Select one of the following installation modes:
Option 1: Install Panel and Node on One Server
- Complete installation with admin panel and node on same server
- Recommended for single-server deployments
- Requires all three domains
Option 2: Install Only the Panel
- Just the admin panel without node
- Use this if you want to add nodes on separate servers later
- Requires panel and subscription domains
Option 3: Add Node to Panel
- Add additional node to existing panel
- Run this on a separate node server
- Requires connection to existing panel
Option 4: Install Only the Node
- Standalone node installation
- For advanced multi-server setups
Enter your three domains when prompted:
Enter panel domain: panel.yourdomain.com
Enter subscription domain: sub.yourdomain.com
Enter selfsteal domain for node: node.yourdomain.com
This is the key difference from the standard installation:
When prompted, enter your Supabase credentials:
Enter Supabase project identifier: abcdefghijklmnop
Enter Supabase database password: [your-password]
- Project Identifier: Just the ID part (e.g.,
abcdefghijklmnop)- NOT
postgres.abcdefghijklmnop - The script automatically adds the
postgres.prefix
- NOT
- Database Password: The password from your Supabase project
The script will automatically:
- Install Certbot
- Generate Let's Encrypt SSL certificates for your domains
- Configure Nginx with HTTPS
The script will automatically:
- Install Docker and required packages
- Pull Remnawave Docker images
- Generate secure credentials (JWT secrets, admin password, etc.)
- Create Docker Compose configuration
- Start all services
- Register initial superadmin account
After successful installation, you'll see:
=================================================
INSTALLATION COMPLETE!
=================================================
Panel URL:
https://panel.yourdomain.com/auth/login?[auth-cookie]
To log into the panel, use the following data:
Username: [generated-username]
Password: [generated-password]
-------------------------------------------------
To relaunch the manager, use the following command:
remnawave_reverse
=================================================
Important: Save these credentials immediately! They are shown only once.
- Open the panel URL shown after installation
- Login with the provided credentials
- Configure your VPN settings, protocols, and users
After installation, you can manage your Remnawave installation using:
remnawave_reverseOr directly via the script:
sudo bash install_remnawave.shThe management menu provides options for:
- Starting/stopping services
- Updating panel and nodes
- Viewing logs
- Managing certificates
- Adding additional nodes
- Managing IPv6
- Installing custom templates
Manual service management:
# Navigate to installation directory
cd /opt/remnawave
# View running containers
docker compose ps
# View logs
docker compose logs -f remnawave
docker compose logs -f remnawave-redis
docker compose logs -f remnawave-nginx
# Restart services
docker compose restart
# Stop services
docker compose down
# Start services
docker compose up -dImportant files location:
- Installation directory:
/opt/remnawave/ - Environment variables:
/opt/remnawave/.env - Docker Compose:
/opt/remnawave/docker-compose.yml - Nginx config:
/opt/remnawave/nginx.conf - SSL certificates:
/etc/letsencrypt/live/[your-domain]/
The script creates a DATABASE_URL in the following format:
postgresql://postgres.[PROJECT_ID]:[PASSWORD]@aws-1-eu-central-1.pooler.supabase.com:5432/postgres?sslmode=requireExample:
postgresql://postgres.abcdefghijklmnop:mySecurePassword123@aws-1-eu-central-1.pooler.supabase.com:5432/postgres?sslmode=requireNote: The region (aws-1-eu-central-1) in the connection string should match your Supabase project region. If your Supabase project is in a different region, you'll need to modify the script or manually update the .env file after installation.
1. "Cannot connect to database"
- Verify Supabase credentials are correct
- Check that you're using the Connection Pooling URL
- Ensure your server can reach Supabase (check firewall)
- Verify the region in DATABASE_URL matches your Supabase project
2. "Domain not resolving"
- Wait for DNS propagation (up to 48 hours, usually minutes)
- Verify A records point to correct IP:
dig +short yourdomain.com - Try accessing via IP temporarily to test installation
3. "Certificate generation failed"
- Ensure ports 80 and 443 are accessible
- Check DNS is properly configured
- Verify no other web server is using these ports
4. "Docker errors"
- Ensure system is up to date:
apt update && apt upgrade - Check Docker service:
systemctl status docker - Review logs:
journalctl -u docker
# Panel logs
docker compose -f /opt/remnawave/docker-compose.yml logs remnawave
# Database connection issues
docker compose -f /opt/remnawave/docker-compose.yml logs remnawave | grep -i database
# All services
docker compose -f /opt/remnawave/docker-compose.yml logs -fTest Supabase connection from your server:
# Install PostgreSQL client
apt install postgresql-client -y
# Test connection (replace with your credentials)
psql "postgresql://postgres.abcdefghijklmnop:password@aws-1-eu-central-1.pooler.supabase.com:5432/postgres?sslmode=require"If you need to reinstall:
# Stop and remove containers
cd /opt/remnawave
docker compose down -v
# Remove installation directory
rm -rf /opt/remnawave
# Re-run installation script
sudo bash install_remnawave.shNote: This does NOT delete your Supabase database. Your data remains safe in Supabase.
- Database Password: Never commit or share your Supabase password
- Admin Credentials: Change the auto-generated admin password after first login
- Firewall: Use UFW or iptables to restrict access
- Updates: Keep system and Docker images updated
- Backups: Supabase handles database backups, but export configs periodically
- SSL Certificates: Auto-renewed by Certbot, check expiration:
certbot certificates
To update Remnawave to the latest version:
# Run management script
remnawave_reverse
# Select: "3. Manage panel/node"
# Then: "3. Update panel/node"This pulls the latest Docker images and restarts services.
- Remnawave Documentation: https://remna.st/docs
- Supabase Documentation: https://supabase.com/docs
- Issues: GitHub Issues
This script is based on the original Remnawave installation script by eGamesAPI. Please refer to the original project for licensing information.
Contributions are welcome! Please feel free to submit issues or pull requests.
- Modified to support dynamic Supabase database credentials
- Added prompts for DB_PROJECT_ID and DB_PASSWORD during installation
- Removed hardcoded database credentials
- Added bilingual support for Supabase credential prompts (EN/RU)