Forums » Contribute to Project Fedena » How to automate Fedena start - Install it as Windows Service
Hi all,

Right after Fedena is configured, the start of the application is via console which should stay open for all the times if we want the application to be up and running. But quite often will get closed (human error, server down etc) and the application will go down.
The same applies if the server is rebooted/bounced and all over again.

So here is the solution if you don't want to go over this hassle:

1. Download
2. Unpack it (lets say C:\NSSM)
3. Create a batch file ( lets say C:\Fedena\StartFedena.bat)
4. Edit the batch file ( right click on the bat file and click Edit)
Past the following code (change the paths accordingly)
********************************** (without the stars and this comment)

cd \
cd Fedena
mongrel_rails start -e production

Note: If you want to start it as development mode remove -e production from the last line

5. Open CMD
6. Type cd\
7. Type cd NSSM
8. depending on the system type: "cd win32" ot "cd win64"
9.Type in the cmd : "nssm install"
10. A modal window will pop-up
11. Click Browse
12. Navigate to the location where the batch file is and select it;
13. Leave options empty
14. Service name "Fedena"
15. Install Service
16. Go to "Services" (usually under Control Panel\System and Security\Administrative Tools)
17. Start Services
18. You should find service named "Fedena"
19. Start Service
20. Navigate to http://host:3000 and Fedena should be up
21. The service should be already set as automatic so if the server is restarted Fedena will come up automatically.

If you need to bounce the application just restart the Fedena Service.

That is,

Thank you