Start SFTP server automatically when the system restarted

RadhaKrishnaKiJaya used Ask the Experts™
Hi Experts,

We are using freeFTPd as our sftp server and it is working fine. The only problem is when the server is restarted, i does not start automatically. Any suggestion how to start this automatically when the server is restarted? Also any suggestion if there are any better SFTP server which will start automatically after a system reboot?
Thanks in advance.
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®

Place a shortcut to the .exe for the program into your 'startup' folder in ypur applications list.
If you normally double-click a file tonlaunch the program that is the '.exe' im referring to. It could be a different filre type like .msi or .com etc.
This would be the easiest method.

Option #2
If this is available as an option for your software, open Services.msc (run-services.msc- [enter] ) and look for the service for your ftp software.
Open the properties of that service and set it to start automatically if not already.

Other option I have used is Globalscape SFTP software. Inexpensive, one-time purchase.


Hi Michael,
Thank you for the response. I will try the first option. The second option is already automatic. Another quick question. Is there any way we can keep looking at it using some kind of script and if it is not running then start running it?

Thank you again.

Lets handle the first issue in this question and we can answer that in another question, but yes, I am sure a way exists. I actually already have an idea to proof out.

Very important to keep the discussion matching the question so people in the future can get the answers they need.
Ensure you’re charging the right price for your IT

Do you wonder if your IT business is truly profitable or if you should raise your prices? Learn how to calculate your overhead burden using our free interactive tool and use it to determine the right price for your IT services. Start calculating Now!


I tried your suggested option1. It is going to the opening screen(FTP1.png).  But not starting the server itself. I have to start it manually. (FTP2.png). Basically that is my problem. any suggestion?

Thank you!

Any luck with this yet?
I have not been able to find a way to auto-start the SFTP service specifically yet.


Hi Michael,
Yes, luckily I found a way to restart the SFTP server.  

1. Write this code into a batch file.
@echo off
Set log="C:\ftpstartup.log"
echo sleeping 30 seconds > %log%
sleep 30
echo starting service >> %log%
net start freeFTPDService >> %log%
echo looking for listener... >> %log%
for /F "tokens=2" %%i in ('netstat -a -n ^| findstr "^.*TCP.*:22.*LISTENING$"') do Set FTPPROC=%%i
IF "%FTPPROC%"=="" goto failed
echo Service listening on %FTPPROC% >> %log%
goto end

echo failed to start service... >> %log%

Set log=

Open in new window


2.  Go to services -> Change the freeFtpdService to 'manual'
3.  Open the run command window and type 'mmc'
4.  Click File -> Add/Remove snap in
5.  Add 'Group Policy Object' for 'Local computer' -> Click Finish
6. Click 'Local computer policy' -> Computer configuration -> windows setting -> script(startup/shutdown) -> double click startup -> Add the batch file in which the script is present.
7. Restart the computer
8. but in this method you can not see the window, which says sftp is running. If u want to see that then just kill the instance in task manager and open it again.

Hope it will help!


Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial