Skip to content

Collection of automation scripts and utilities for RemnaWave project. Features deployment tools, configuration management, and workflow automation scripts to streamline development and operations

Notifications You must be signed in to change notification settings

DigneZzZ/remnawave-scripts

Repository files navigation

Remnawave Scripts

License: MIT Shell Version Remnawave Panel RemnaNode Backup & Restore Caddy Selfsteal Auto Updates Telegram Integration

remnawave-script

A comprehensive collection of enterprise-grade Bash scripts for Remnawave Panel, RemnaNode, and Reality traffic masking management. Featuring advanced backup/restore capabilities, automated scheduling, Telegram integration, and production-ready deployment tools.


🧭 Navigation Menu

πŸ“š Table of Contents

Core Installers

Backup & Migration System

Advanced Features

Community & Support


πŸš€ Remnawave Panel Installer

A comprehensive enterprise-grade Bash script to install and manage the Remnawave Panel. Features full automation, advanced backup/restore capabilities, scheduled operations, and production-ready deployment tools.

✨ Key Features

πŸŽ›οΈ Complete CLI Management

  • Full command interface: install, up, down, restart, logs, status, edit, update, uninstall
  • Interactive main menu with colorized output
  • Script self-updating with version checking
  • Console access to internal panel CLI

πŸ”§ Advanced Installation

  • Auto-generation of .env, secrets, ports, and docker-compose.yml
  • Development mode support with --dev flag
  • Custom installation paths and names
  • Automatic dependency detection and installation
  • System requirements validation

πŸ’Ύ Enterprise Backup & Restore System

  • Full system backups with compression (.tar.gz)
  • Database-only backups (.sql, .sql.gz)
  • Scheduled backups with cron integration
  • Complete migration system between servers
  • Safety backups with automatic rollback
  • Retention policies with automatic cleanup

πŸ“± Telegram Integration

  • Bot notifications for operations and scheduled backups
  • Large file support with chunked delivery
  • Thread support for group chats
  • Comprehensive status reporting

πŸ“¦ Quick Start

# Install Remnawave Panel
bash <(curl -Ls https://github.com/DigneZzZ/remnawave-scripts/raw/main/remnawave.sh) @ install

# Install only the management script
bash <(curl -Ls https://github.com/DigneZzZ/remnawave-scripts/raw/main/remnawave.sh) @ install-script --name remnawave

βš™οΈ Installation Options

Flag Description Example
--name Custom installation directory name --name panel-prod
--dev Install development version --dev

Examples:

# Development installation with custom name
bash <(curl -Ls https://github.com/DigneZzZ/remnawave-scripts/raw/main/remnawave.sh) @ install --name remnawave-dev --dev

# Production installation with custom name  
bash <(curl -Ls https://github.com/DigneZzZ/remnawave-scripts/raw/main/remnawave.sh) @ install --name panel-prod

πŸ›  Management Commands

Core Operations

Command Description Usage
install Install Remnawave Panel remnawave install [--dev] [--name NAME]
update Update script and containers remnawave update
uninstall Remove panel completely remnawave uninstall
up Start all services remnawave up
down Stop all services remnawave down
restart Restart panel remnawave restart
status Show service status remnawave status

Configuration & Maintenance

Command Description Usage
edit Edit docker-compose.yml remnawave edit
edit-env Edit .env file remnawave edit-env
logs View container logs remnawave logs [--follow]
console Access panel CLI console remnawave console

Backup System

Command Description Usage
backup Create manual backup remnawave backup [--no-compress] [--data-only]
restore Restore from backup remnawave restore [--file FILE] [--database-only]
schedule Manage scheduled backups remnawave schedule

πŸ’Ύ Backup & Restore System

Manual Backups

# Full system backup (compressed by default)
remnawave backup

# Database only backup  
remnawave backup --data-only

# Uncompressed backup (not recommended)
remnawave backup --no-compress

Scheduled Backups

# Configure automated backups
remnawave schedule

# Available schedule options:
# - Daily, Weekly, Monthly intervals
# - Compression settings
# - Retention policies (days, minimum backups)
# - Telegram delivery configuration
# - Automatic backup script version checking

Migration & Restore

# Complete system migration
remnawave restore --file backup.tar.gz --name newpanel --path /opt

# Database only restore
remnawave restore --database-only --file database.sql.gz

# Restore with safety backup
remnawave restore --file backup.tar.gz  # Automatic safety backup created

πŸ” Version Compatibility:

  • Panel version included in all backup metadata and notifications
  • Strict version checking: Major/minor versions must match for restore
  • Patch version differences show warnings but allow restore
  • Script version managed separately from panel version

οΏ½ Recommended Restore Method:

# Transfer backup file to target server, then:
sudo remnawave restore --file backup.tar.gz

# For database-only backups:
sudo remnawave restore --database-only --file database.sql.gz

πŸ›  Manual Restore (if automatic fails):

# Option A: New installation (recommended)
curl -Ls https://github.com/DigneZzZ/remnawave-scripts/raw/main/remnawave.sh
sudo bash remnawave.sh @ install --name remnawave
sudo remnawave down
tar -xzf backup.tar.gz
cat backup_folder/database.sql | docker exec -i -e PGPASSWORD="actual_password" remnawave-db psql -U postgres -d postgres

# Option B: Existing installation  
sudo remnawave down
cat database.sql | docker exec -i -e PGPASSWORD="actual_password" remnawave-db psql -U postgres -d postgres
sudo remnawave up

⚠️ Note: Built-in restore function includes automatic version checking, safety backups, and error handling.


οΏ½ Telegram Integration

Configure during installation or via .env:

# Enable Telegram notifications
IS_TELEGRAM_NOTIFICATIONS_ENABLED=true
TELEGRAM_BOT_TOKEN=your_bot_token

# User notifications
TELEGRAM_NOTIFY_USERS_CHAT_ID=your_chat_id
TELEGRAM_NOTIFY_USERS_THREAD_ID=thread_id  # Optional

# Node notifications  
TELEGRAM_NOTIFY_NODES_CHAT_ID=your_chat_id
TELEGRAM_NOTIFY_NODES_THREAD_ID=thread_id  # Optional

# OAuth integration
TELEGRAM_OAUTH_ENABLED=true
TELEGRAM_OAUTH_ADMIN_IDS=123456789,987654321

Features:

  • Backup completion notifications
  • System status alerts
  • Large file delivery (>50MB) with chunked uploads
  • Thread support for organized group chats

🌍 Production Deployment

Reverse Proxy Setup

# Nginx example
server {
    server_name panel.example.com;
    location / {
        proxy_pass http://127.0.0.1:3000;
        proxy_set_header Host $host;
        proxy_set_header X-Real-IP $remote_addr;
    }
}

server {
    server_name sub.example.com;
    location /sub {
        proxy_pass http://127.0.0.1:3010;
        proxy_set_header Host $host;
    }
}

Environment Variables

# Panel access domain
FRONT_END_DOMAIN=panel.example.com

# Subscription domain (without protocol)
SUB_PUBLIC_DOMAIN=sub.example.com

# Database performance
API_INSTANCES=2  # Number of API instances

πŸ“‚ File Structure

/opt/remnawave/                    # Default installation
β”œβ”€β”€ .env                          # Main configuration
β”œβ”€β”€ .env.subscription             # Subscription page config
β”œβ”€β”€ docker-compose.yml            # Container orchestration
β”œβ”€β”€ app-config.json              # Optional app configuration
β”œβ”€β”€ backup-config.json           # Backup system config
β”œβ”€β”€ backup-scheduler.sh          # Automated backup script
β”œβ”€β”€ backups/                     # Backup storage
β”‚   β”œβ”€β”€ remnawave_full_*.tar.gz  # Full system backups
β”‚   β”œβ”€β”€ remnawave_db_*.sql.gz    # Database backups
β”‚   └── remnawave_scheduled_*    # Automated backups
└── logs/                        # System logs
    β”œβ”€β”€ backup.log               # Backup operations log
    └── panel.log               # Panel operations log

/usr/local/bin/remnawave          # Management script

πŸ›° RemnaNode Installer

A production-ready Bash script to install and manage RemnaNode - high-performance proxy nodes with advanced Xray-core integration. Designed for seamless connection to Remnawave Panel with enterprise-grade features.

✨ Key Features

πŸŽ›οΈ Complete Node Management

  • Full CLI interface: install, up, down, restart, status, logs, update, uninstall
  • Interactive main menu with adaptive terminal sizing
  • Automatic port conflict detection and resolution
  • Real-time log monitoring for Xray-core

⚑ Advanced Xray-core Integration

  • Automatic latest version detection and installation
  • Interactive version selection with pre-release support
  • Custom Xray-core binary management
  • Real-time log streaming (xray_log_out, xray_log_err)

πŸ”§ Production Features

  • Log rotation with configurable retention
  • Multi-architecture support (x86_64, ARM64, ARM32, MIPS)
  • Development mode support with --dev flag
  • Comprehensive system requirements validation

πŸ“¦ Quick Start

# Install RemnaNode
bash <(curl -Ls https://github.com/DigneZzZ/remnawave-scripts/raw/main/remnanode.sh) @ install

# Install with custom name
bash <(curl -Ls https://github.com/DigneZzZ/remnawave-scripts/raw/main/remnanode.sh) @ install --name node-prod

# Install development version
bash <(curl -Ls https://github.com/DigneZzZ/remnawave-scripts/raw/main/remnanode.sh) @ install --dev --name node-dev

πŸ›  Management Commands

Command Description Usage
install Install RemnaNode remnanode install [--dev] [--name NAME]
update Update script and container remnanode update
uninstall Remove node and data remnanode uninstall
up Start node services remnanode up
down Stop node services remnanode down
restart Restart node remnanode restart
status Show service status remnanode status
logs View container logs remnanode logs
core-update Update Xray-core binary remnanode core-update
edit Edit docker-compose.yml remnanode edit
setup-logs Configure log rotation remnanode setup-logs
xray_log_out Monitor Xray output logs remnanode xray_log_out
xray_log_err Monitor Xray error logs remnanode xray_log_err

⚑ Xray-core Management

Automatic Installation

# Install latest Xray-core during setup
remnanode install  # Automatically offers latest Xray-core

# Update to specific version
remnanode core-update  # Interactive version selection

Real-time Monitoring

# Monitor Xray output in real-time
remnanode xray_log_out

# Monitor Xray errors
remnanode xray_log_err

# Standard container logs
remnanode logs

πŸ”§ Production Configuration

Log Rotation Setup

# Configure automatic log rotation
remnanode setup-logs

# Rotation settings:
# - Max size: 50MB per log file
# - Keep 5 rotated files
# - Compress old logs
# - Safe truncation without stopping services

Security Hardening

# Recommended UFW configuration
sudo ufw allow from PANEL_IP to any port NODE_PORT
sudo ufw enable

# The script automatically:
# - Detects occupied ports
# - Suggests available alternatives
# - Validates port ranges

πŸ“‚ File Structure

/opt/remnanode/                   # Node installation
β”œβ”€β”€ .env                         # Environment configuration
└── docker-compose.yml          # Container orchestration

/var/lib/remnanode/              # Data directory
β”œβ”€β”€ xray                        # Xray-core binary (if installed)
β”œβ”€β”€ access.log                  # Xray access logs
β”œβ”€β”€ error.log                   # Xray error logs
└── *.log                       # Additional Xray logs

/usr/local/bin/remnanode         # Management script
/etc/logrotate.d/remnanode       # Log rotation config

🌐 Multi-Architecture Support

Supported Platforms:

  • x86_64 (Intel/AMD 64-bit)
  • ARM64 (ARMv8 64-bit)
  • ARM32 (ARMv7 32-bit)
  • MIPS (MIPS architecture)

Automatic Detection: The script automatically detects your system architecture and downloads the appropriate Xray-core binary.


🎭 Caddy Selfsteal for Reality

A specialized Bash script for deploying Caddy as a Reality traffic masking solution. Provides legitimate HTTPS traffic camouflage for Xray Reality configurations with professional web templates.

✨ Key Features

🎭 Traffic Masking

  • Professional website templates for traffic camouflage
  • Automatic HTTPS certificate management
  • Configurable ports for Reality integration
  • DNS validation with propagation checking

🌐 Template System

  • Multiple pre-built website templates
  • Automatic template downloading and installation
  • Fallback HTML creation if download fails
  • Professional appearance for traffic masking

πŸ”§ Reality Integration

  • Port configuration for Xray Reality compatibility
  • Automatic redirects and traffic handling
  • Internal certificate management
  • DNS validation for proper setup

οΏ½ Quick Start

# Install Caddy Selfsteal
bash <(curl -Ls https://github.com/DigneZzZ/remnawave-scripts/raw/main/selfsteal.sh) @ install

πŸ›  Management Commands

Command Description Usage
install Install Caddy Selfsteal selfsteal install
up Start Caddy services selfsteal up
down Stop Caddy services selfsteal down
restart Restart Caddy selfsteal restart
status Show service status selfsteal status
logs View Caddy logs selfsteal logs
template Manage website templates selfsteal template
edit Edit Caddyfile selfsteal edit
uninstall Remove Caddy setup selfsteal uninstall
guide Show Reality integration guide selfsteal guide
update Update script selfsteal update

🎨 Template Management

Available Templates:

  • 10gag - Social media style template
  • converter - File converter service template
  • downloader - Download service template
  • filecloud - Cloud storage template
  • games-site - Gaming website template
  • modmanager - Mod management template
  • speedtest - Speed test service template
  • YouTube - Video platform template

Template Operations:

# List available templates
selfsteal template list

# Install specific template
selfsteal template install converter

# Show current template info
selfsteal template info

# Download template manually
selfsteal template download speedtest

πŸ”— Reality Integration

Configuration for Xray Reality:

{
  "realitySettings": {
    "dest": "127.0.0.1:9443",
    "serverNames": ["your-domain.com"]
  }
}

Caddy Configuration:

# Automatic generation during setup
{
    https_port 9443
    default_bind 127.0.0.1
    auto_https disable_redirects
}

https://your-domain.com {
    root * /var/www/html
    file_server
}

πŸ” DNS Validation

Automatic Checks:

  • Domain format validation
  • A record DNS resolution
  • AAAA record (IPv6) checking
  • CNAME record detection
  • DNS propagation across multiple servers (8.8.8.8, 1.1.1.1, etc.)
  • Port availability verification

Setup Requirements:

  • Domain must point to server IP
  • Port 443 free for Xray Reality
  • Port 80 available for HTTP redirects
  • Proper DNS propagation

πŸ“‚ File Structure

/opt/caddy/                      # Caddy installation
β”œβ”€β”€ .env                        # Environment configuration
β”œβ”€β”€ docker-compose.yml         # Container orchestration
β”œβ”€β”€ Caddyfile                   # Caddy configuration
β”œβ”€β”€ logs/                       # Caddy logs
└── html/                       # Website content
    β”œβ”€β”€ index.html             # Main page
    β”œβ”€β”€ 404.html               # Error page
    └── assets/                # Template assets
        β”œβ”€β”€ style.css          # Styling
        β”œβ”€β”€ script.js          # JavaScript
        └── images/            # Images and icons

/usr/local/bin/selfsteal        # Management script

βš™οΈ System Requirements

πŸ–₯️ Supported Operating Systems

Linux Distributions:

  • Ubuntu 18.04+ (LTS recommended)
  • Debian 10+ (Buster and newer)
  • CentOS 7+ / AlmaLinux 8+
  • Amazon Linux 2
  • Fedora 32+
  • Arch Linux (rolling)
  • openSUSE Leap 15+

πŸ—οΈ Hardware Requirements

Minimum Requirements:

  • CPU: 1 core (2+ cores recommended for production)
  • RAM: 512MB (1GB+ recommended)
  • Storage: 2GB free space (5GB+ for backups)
  • Network: Stable internet connection

Recommended for Production:

  • CPU: 2+ cores
  • RAM: 2GB+
  • Storage: 10GB+ SSD storage
  • Network: 100Mbps+ connection

πŸ›οΈ Architecture Support

Supported Architectures:

  • x86_64 (Intel/AMD 64-bit) - Primary support
  • ARM64 (ARMv8 64-bit) - Full support
  • ARM32 (ARMv7 32-bit) - Basic support
  • MIPS - Limited support

οΏ½ Dependencies

Automatically Installed:

  • Docker Engine (latest stable)
  • Docker Compose V2
  • curl / wget
  • openssl
  • jq (for JSON processing)
  • unzip / tar / gzip

Text Editors (Auto-detected):

  • nano (default)
  • vim / vi
  • micro
  • emacs

πŸ” Security Features

πŸ›‘οΈ Built-in Security

Network Security:

  • All services bind to 127.0.0.1 by default
  • Automatic port conflict detection
  • UFW firewall configuration guidance
  • SSL/TLS certificate management

Data Protection:

  • Database credentials auto-generation
  • JWT secrets randomization
  • Environment variable validation
  • Secure backup encryption support

Access Control:

  • Telegram OAuth integration
  • Admin ID validation
  • Rate limiting support
  • Webhook signature verification

πŸ”’ Production Hardening

Recommended Security Setup:

# Configure UFW firewall
sudo ufw default deny incoming
sudo ufw default allow outgoing
sudo ufw allow ssh
sudo ufw allow from trusted_ip to any port panel_port
sudo ufw enable

# Regular security updates
sudo apt update && sudo apt upgrade -y  # Ubuntu/Debian
sudo yum update -y  # CentOS/AlmaLinux

# Monitor logs
remnawave logs --follow
tail -f /var/log/auth.log

Environment Security:

  • Regular backup verification
  • Database access auditing
  • Container image scanning
  • Dependency vulnerability monitoring

πŸ“Š Monitoring & Logs

πŸ“ˆ System Monitoring

Built-in Monitoring:

# Service status
remnawave status
remnanode status
selfsteal status

# Resource usage
docker stats
docker system df

# Log monitoring
remnawave logs --follow
remnanode logs
selfsteal logs

Metrics Integration:

  • Prometheus metrics endpoint (/api/metrics)
  • Custom metrics collection
  • Performance monitoring
  • Resource usage tracking

πŸ“‹ Log Management

Log Locations:

# Panel logs
/opt/remnawave/logs/
β”œβ”€β”€ backup.log              # Backup operations
β”œβ”€β”€ panel.log               # Panel operations  
└── docker-compose.log      # Container logs

# Node logs
/var/lib/remnanode/
β”œβ”€β”€ access.log              # Xray access logs
β”œβ”€β”€ error.log               # Xray error logs
└── node.log                # Node operations

# Caddy logs
/opt/caddy/logs/
β”œβ”€β”€ access.log              # HTTP access
β”œβ”€β”€ error.log               # HTTP errors
└── caddy.log               # Caddy operations

Log Rotation:

  • Automatic rotation (50MB max per file)
  • Compression of old logs
  • Configurable retention (5 files default)
  • Safe truncation without service interruption

🀝 Contributing

We welcome contributions to improve the Remnawave Scripts! Here's how you can help:

πŸ› Bug Reports

  1. Check existing issues before creating new ones
  2. Provide detailed information:
    • OS and version
    • Script version
    • Error messages
    • Steps to reproduce

πŸ’‘ Feature Requests

  1. Describe the use case clearly
  2. Explain the expected behavior
  3. Consider backward compatibility
  4. Provide implementation ideas if possible

πŸ”§ Pull Requests

  1. Fork the repository
  2. Create a feature branch
  3. Make your changes
  4. Test thoroughly
  5. Update documentation
  6. Submit pull request

Development Guidelines:

  • Follow existing code style
  • Add comments for complex logic
  • Test on multiple distributions
  • Update README if needed

πŸ“œ License

This project is licensed under the MIT License - see the LICENSE file for details.

πŸ”“ MIT License Summary

  • βœ… Commercial use allowed
  • βœ… Modification allowed
  • βœ… Distribution allowed
  • βœ… Private use allowed
  • ❌ No liability for authors
  • ❌ No warranty provided

πŸ‘₯ Community

🌐 Join Our Communities

πŸ”— GIG.ovh

  • Website: https://gig.ovh
  • FOCUS: Next-Gen forum comminity with AI ChatBot, VIP Groups and other..

πŸ”— OpeNode.XYZ

  • Website: https://openode.xyz
  • Focus: Open-source networking solutions
  • Community: Developers and system administrators
  • Topics: Proxy panels, VPN solutions, networking tools

πŸ”— NeoNode.cc


⭐ If you find this project helpful, please consider giving it a star!

πŸ”— Report Bug β€’ Request Feature β€’ Contribute

About

Collection of automation scripts and utilities for RemnaWave project. Features deployment tools, configuration management, and workflow automation scripts to streamline development and operations

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published