The marznode
script helps manage the installation, updates and maintenance of MarzNode and its Xray core dependencies. This tool includes commands for installing and controlling the MarzNode service (with custom xray version
and hysteria2
), as well as a built-in system for checking and installing required dependencies.
- Install/Uninstall MarzNode: Easily install or remove MarzNode.
- Start/Stop/Restart: Manage the MarzNode service (start, stop, or restart).
- Logs: View recent MarzNode logs.
- Docker Integration: MarzNode runs as a Docker service.
- Custom Port Configuration: Specify the service port during installation.
To install the script itself and be able to run it from anywhere, follow these steps:
-
Download and Install the script:
sudo bash -c "$(curl -sL https://raw.githubusercontent.com/ahmad02223/marznode-script/main/install.sh)" @ install-script
-
You can now run the script using the
marznode
command.
cd /var/lib/marznode/singbox/ && tar -xzf sing-box-amd.tar.gz && cp /var/lib/marznode/singbox/sing-box-1.10.5-linux-amd64/sing-box /var/lib/marznode/sing-box
marznode restart
cd /var/lib/marznode/singbox/ && tar -xzf sing-box-arm.tar.gz && cp /var/lib/marznode/singbox/sing-box-1.10.5-linux-arm64/sing-box /var/lib/marznode/sing-box
marznode restart
After installation, the script provides multiple commands to manage MarzNode. Here are the basic commands you can use:
To install MarzNode along with the required dependencies, run:
marznode install
You will be asked to provide a service port and the MarzNode certificate from the Marzneshin panel.
- Start the MarzNode service:
marznode start
- Stop the MarzNode service:
marznode stop
- Restart the MarzNode service:
marznode restart
To check if MarzNode is running and view the uptime:
marznode status
To view recent logs of MarzNode:
marznode logs
To uninstall MarzNode and remove all related files:
marznode uninstall
To check the current version of the script:
marznode version
To update the script itself:
marznode update-script
To uninstall the script and remove it from /usr/local/bin
:
marznode uninstall-script
marznode install # Install MarzNode
marznode uninstall # Uninstall MarzNode
marznode start # Start MarzNode service
marznode stop # Stop MarzNode service
marznode restart # Restart MarzNode service
marznode status # Show MarzNode status
marznode logs # Show MarzNode logs
marznode version # Show script version
marznode install-script # Install this script to /usr/local/bin
marznode uninstall-script # Uninstall this script from /usr/local/bin
marznode update-script # Update this script to the latest version
marznode help # Show help message