September 24, 20169 yr Hi everyone! I'm new to the forum. I have three Unraid servers and remote access has become a primary goal for me recently. I can't for the life of me find the commands that I can run via SSH to start and stop the array. For example I upgraded my server to 6.2 remotely and rebooted. Now I'm stuck with SSH access and in order to access the web gui I need to start Docker which needs the array to be up. One of my containers contains a proxy server that allows me to access the web gui. I'm guessing that on this server I forgot to enable "Auto Start Array" Thank you for your help!
September 24, 20169 yr Hi everyone! I'm new to the forum. I have three Unraid servers and remote access has become a primary goal for me recently. I can't for the life of me find the commands that I can run via SSH to start and stop the array. For example I upgraded my server to 6.2 remotely and rebooted. Now I'm stuck with SSH access and in order to access the web gui I need to start Docker which needs the array to be up. One of my containers contains a proxy server that allows me to access the web gui. I'm guessing that on this server I forgot to enable "Auto Start Array" Thank you for your help! Start: wget -qO /dev/null http://localhost:$(lsof -nPc emhttp | grep -Po 'TCP[^\d]*\K\d+')/update.htm?cmdStart=Start Stop: wget -qO /dev/null http://localhost:$(lsof -nPc emhttp | grep -Po 'TCP[^\d]*\K\d+')/update.htm?cmdStop=Stop
September 24, 20169 yr Start: wget -qO /dev/null http://localhost:$(lsof -nPc emhttp | grep -Po 'TCP[^\d]*\K\d+')/update.htm?cmdStart=Start Stop: wget -qO /dev/null http://localhost:$(lsof -nPc emhttp | grep -Po 'TCP[^\d]*\K\d+')/update.htm?cmdStop=Stop Yikes! Probably works though. Might want to appeal to Tom for a return to the simpler mdcmd commands.
September 24, 20169 yr Start: wget -qO /dev/null http://localhost:$(lsof -nPc emhttp | grep -Po 'TCP[^\d]*\K\d+')/update.htm?cmdStart=Start Stop: wget -qO /dev/null http://localhost:$(lsof -nPc emhttp | grep -Po 'TCP[^\d]*\K\d+')/update.htm?cmdStop=Stop Yikes! Probably works though. Might want to appeal to Tom for a return to the simpler mdcmd commands. Eric gave them to me for another plugin thats fallen by the wayside. Its just hitting the webUI to do it. There is no "command" per se to accomplish starts and stops
September 24, 20169 yr Start: wget -qO /dev/null http://localhost:$(lsof -nPc emhttp | grep -Po 'TCP[^\d]*\K\d+')/update.htm?cmdStart=Start Stop: wget -qO /dev/null http://localhost:$(lsof -nPc emhttp | grep -Po 'TCP[^\d]*\K\d+')/update.htm?cmdStop=Stop Yikes! Probably works though. Might want to appeal to Tom for a return to the simpler mdcmd commands. Eric gave them to me for another plugin thats fallen by the wayside. Its just hitting the webUI to do it. There is no "command" per se to accomplish starts and stops I think there used to be, long ago, something very simple like 'mdcmd start' and 'mdcmd stop'...
September 24, 20169 yr I think there used to be, long ago, something very simple like 'mdcmd start' and 'mdcmd stop'... This day and age there is a ton of other services (docker, vms) that need to be started / stopped that the basic array commands (mdcmd) do not take into consideration. Hence all the bugaboo going on with a replacement for powerdown now.
September 25, 20169 yr Author Start: wget -qO /dev/null http://localhost:$(lsof -nPc emhttp | grep -Po 'TCP[^\d]*\K\d+')/update.htm?cmdStart=Start Stop: wget -qO /dev/null http://localhost:$(lsof -nPc emhttp | grep -Po 'TCP[^\d]*\K\d+')/update.htm?cmdStop=Stop Awesome it works! Never though to do it this way! Thank a bunch!
December 3, 20187 yr I know this is a very old thread. Will this work if array is encrypted? How to mount encrypted array
December 3, 20187 yr 8 hours ago, bphillips330 said: I know this is a very old thread. Will this work if array is encrypted? How to mount encrypted array That command basically pushes the stop array button. So no reason why encryption would make a difference either way
December 9, 20187 yr Is there a "start" button so to speak. and a spot to put in encryption key from the cli?
December 9, 20187 yr No there isn't. You would have to say have the array autostart and utilize a key file from somewhere in order to accomplish this. Don't use encryption, so can't particularly help.
September 1, 20196 yr If the webgui is corrupted (have an open thread) is there a way to manual start the array that does not invoke the GUI?
March 31, 20206 yr On 9/1/2019 at 5:55 PM, J.Nerdy said: If the webgui is corrupted (have an open thread) is there a way to manual start the array that does not invoke the GUI? I second that question! I have 500 Internal error on time to time so have to do a host reset, which lead on a parity check after restart...
March 25, 20224 yr what parameter would I need to add to that command if my drives are with a passphrase?
March 25, 20224 yr 20 minutes ago, brianvicente said: what parameter would I need to add to that command if my drives are with a passphrase? Not possible
March 26, 20224 yr Community Expert 8 hours ago, brianvicente said: what parameter would I need to add to that command if my drives are with a passphrase? a file called keyfile is created so you can create before running the command. File is in /root and it is called keyfile. I get the file via ftp from another device i.e. Raspberry PI to allow autostart in my go. # Start the Management Utility wget --ftps-implicit --user=pi --password='raspberry' ftp://x.x.x.x/files/keyfile -O /root/keyfile
October 19, 2025Oct 19 Community Expert 7.1.4 1 line terminal command to stop the array... As if you hit the stop button on the main tabstop array:CSRF=$(grep -Po '^csrf_token="\K[^"]+' /var/local/emhttp/var.ini) # try HTTP first curl -sS -k --fail -e "http://localhost/Main" \ -c /tmp/unraid.cookies -b /tmp/unraid.cookies \ --data "startState=STARTED&file=&csrf_token=${CSRF}&cmdStop=Stop" \ http://localhost/update.htm || \ # fallback to HTTPS curl -sS -k --fail -e "https://localhost/Main" \ -c /tmp/unraid.cookies -b /tmp/unraid.cookies \ --data "startState=STARTED&file=&csrf_token=${CSRF}&cmdStop=Stop" \ https://localhost/update.htm stat array:CSRF=$(grep -Po '^csrf_token="\K[^"]+' /var/local/emhttp/var.ini) curl -sS -k --fail -e "http://localhost/Main" \ -c /tmp/unraid.cookies -b /tmp/unraid.cookies \ --data "startState=STOPPED&file=&csrf_token=${CSRF}&cmdStart=Start" \ http://localhost/update.htm || \ curl -sS -k --fail -e "https://localhost/Main" \ -c /tmp/unraid.cookies -b /tmp/unraid.cookies \ --data "startState=STOPPED&file=&csrf_token=${CSRF}&cmdStart=Start" \ https://localhost/update.htm *ASUMES A VALD ARRAY CONFIG!!!Verify and check:root@The-Borg:~# grep -E '^(mdState|fsState)=' /var/local/emhttp/var.inimdState="STARTED"fsState="Started"root@The-Borg:~# Why these parameters? Because the GUI’s JS adds a hidden cmdStop=Stop input and posts to /update.htm with csrf_token, plus a startState field (STARTED when stopping, STOPPED when starting) and an empty file param. Community-confirmed payloads (worked for others when GETs failed):
November 15, 2025Nov 15 If my array is stuck in the stopping state (been 12 hours now since I tried to stop it), am I at risk of data loss if I force a reboot?:~# grep -E '^(mdState|fsState)=' /var/local/emhttp/var.inimdState="STARTED"fsState="Stopping"
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.