Laragon auto startup on Windows Server 2008

  • | 4834 points


    I'm using Laragon 2.2.2 on Windows Server 2008 R2 Enterprise and I would like to get Laragon to start automatically when the server is restarted. If it's of any further help I am using MariaDB (running on port 3306) and Apache (running on port 8000).

    I have tried the following:

    1. Switching on the following settings in Laragon:
    • "Preferences > General > Run Laragon when Windows starts"
    • "Preferences > General > Start All automatically"

    However, Laragon does not start even after logging in via remote desktop.

    1. Looking for Apache and MariaDB/MySQL in services.msc and setting the "Startup Type" to automatic, but I could not find any of these services?

    I've also found I have to right click on Laragon and to run as administrator to get it to run properly, otherwise, I receive lots of errors once Laragon starts.

    Any suggestions on how I could get this to work?

    Thank you!

  • administrators
    | 118445 points

    I want Laragon to be portable, so I make my own service management. It's faster than Windows Services but just suitable for development.
    However, you can make Apache and MariaDB run as Services easily yourself.
    Here's how:

    1. Uncheck "Run Laragon when Windows starts"

    2. Run Laragon as Administrator, then open Laragon's Terminal and type:

    httpd.exe -k install -n LaragonApache
    mysqld --install LaragonMariaDB
    1. Start the services:
    net start LaragonApache
    net start LaragonMariaDB

    That's all.
    Note: When quitting, Laragon will try to stop the services. I will improve the behavior on next version.

  • | 4834 points

    @leokhoa Thanks so much for your reply!

    I'll look more into what these commands are doing before I use them and then try experimenting.

    By the way, do you have a way Laragon users can contribute a donation to the Laragon project? I have benefitted a lot from this tool and the support on the forum is fantastic. I would be happy to make a small donation if possible. Thank you.

  • administrators
    | 118445 points

    @haakym :
    You're welcome. A donation will not make me rich, but your appreciation makes me happy :)
    I'm willing to help, so feel free to ask anytime.

  • | 4834 points


    Thank you! Your efforts are greatly appreciated.

  • | 131 points

    and for nginx service how you do?

  • | 131 points

    @leokhoa I assume that apache start php-cgi too, and if we chosse nginx how can i put nginx as windows server, and php start with nginx or another service, how do you call the proceess to start in laragon

  • administrators
    | 118445 points

    @jpnr79 : New version of Laragon will help you create Windows services a breeze. Stay tune...

  • | 54 points


    I created the Windows Services as indicated. Most of my web apps worked well but one them read files from a network mapped drive.... this way I can't access these files.
    How could I do It?


  • administrators
    | 118445 points

    @almirb : I guess it is related to folder permissions.

Log in to reply

Looks like your connection to Laragon was lost, please wait while we try to reconnect.