QuasselCore As A Service (Windows) » History » Version 6
vpx, 07/16/2023 06:26 PM
1 | 1 | ChrisH | h1. QuasselCore As A Service (Windows) |
---|---|---|---|
2 | 1 | ChrisH | |
3 | 1 | ChrisH | Instructions for settting up Quasel as a service can be found here: http://dotknot.blogspot.ca/2012/01/installing-quassel-on-windows.html |
4 | 1 | ChrisH | |
5 | 1 | ChrisH | Note that since the core is running on a different user, your configuration folder will be at <code>C:\Windows\ServiceProfiles\NetworkService\AppData\Roaming\quassel-irc.org</code>. |
6 | 1 | ChrisH | |
7 | 1 | ChrisH | If you already have a configuration setup that you want to migrate, copy the contents of <code>%APPDATA%\.quassel-irc.org\</code> (aka <code>C:\Users\<Username>\AppData\Roaming\.quassel-irc.org\</code>) to the NetworkService's configuration folder. |
8 | 1 | ChrisH | |
9 | 1 | ChrisH | h2. Windows 7 |
10 | 1 | ChrisH | |
11 | 1 | ChrisH | There were a few changes needed to setup the service in step 3. Specifically, the argument <code>bin</code> in <code>sc create</code> changed to <code>binPath</code>, and required the .exe tacked onto the end. |
12 | 1 | ChrisH | |
13 | 1 | ChrisH | <pre> |
14 | 4 | ChrisH | sc create QuasselCore binPath= "C:\Program Files (x86)\Windows Resource Kits\Tools\srvany.exe" DisplayName= "QuasselCore" obj= "NT AUTHORITY\NETWORK SERVICE" |
15 | 1 | ChrisH | reg add HKLM\SYSTEM\CurrentControlSet\Services\QuasselCore\Parameters |
16 | 5 | ChrisH | reg add HKLM\SYSTEM\CurrentControlSet\Services\QuasselCore\Parameters /v Application /t REG_SZ /d "C:\Program Files (x86)\Quassel\quasselcore.exe" |
17 | 1 | ChrisH | </pre> |
18 | 2 | ChrisH | |
19 | 2 | ChrisH | h2. Adding Parameters onto QuasselCore.exe |
20 | 2 | ChrisH | |
21 | 2 | ChrisH | Say you wanted to run the service on a different port like: <code>quasselcore.exe -p 4241</code>. We need to add another registry value according to the "srvany readme":http://www.rezsoft.org/pforward/reskit/readme.txt. |
22 | 2 | ChrisH | |
23 | 2 | ChrisH | <pre> |
24 | 2 | ChrisH | reg add HKLM\SYSTEM\CurrentControlSet\Services\QuasselCore\Parameters /v AppParameters /t REG_SZ /d "-p 4241" |
25 | 2 | ChrisH | </pre> |
26 | 3 | ChrisH | |
27 | 3 | ChrisH | h2. Have The Service Run Automatically |
28 | 3 | ChrisH | |
29 | 1 | ChrisH | Run services.exe. Find the QuasselCore. Right click it and click properties. Then set the Startup Type to Automatic. |
30 | 5 | ChrisH | |
31 | 5 | ChrisH | h2. Where is the QuasselCore Database/ConfigDir now located? |
32 | 5 | ChrisH | |
33 | 5 | ChrisH | The config directory for the QuasselCore when run under the Network Service user account will be located at: |
34 | 5 | ChrisH | |
35 | 5 | ChrisH | <pre> |
36 | 5 | ChrisH | C:\Windows\ServiceProfiles\NetworkService\AppData\Roaming\quassel-irc.org |
37 | 5 | ChrisH | </pre> |
38 | 6 | vpx | |
39 | 6 | vpx | ---- |
40 | 6 | vpx | |
41 | 6 | vpx | h2. Windows 10/11 |
42 | 6 | vpx | |
43 | 6 | vpx | Download Non-Sucking Service Manager (NSSM) .zip file from https://nssm.cc |
44 | 6 | vpx | |
45 | 6 | vpx | Extract the nssm.exe in win64 to "C:\Program Files\Quassel IRC" or wherever you installed it. |
46 | 6 | vpx | |
47 | 6 | vpx | Go to "C:\Program Files", right click the "Quassel IRC" folder and select "Open in Terminal", alternatively just open the terminal and type: |
48 | 6 | vpx | |
49 | 6 | vpx | <pre>cd C:\Program Files\Quassel IRC"</pre> |
50 | 6 | vpx | |
51 | 6 | vpx | !Quassel_terminal.png! |
52 | 6 | vpx | |
53 | 6 | vpx | In the terminal type: |
54 | 6 | vpx | |
55 | 6 | vpx | <pre>nssm install QuasselCore</pre> |
56 | 6 | vpx | !Teminal_install.png! |
57 | 6 | vpx | |
58 | 6 | vpx | A GUI opens. In the tab "Application" under "Path:" press on the "..." button and select the file "quasselcore.exe". |
59 | 6 | vpx | |
60 | 6 | vpx | !NSSM_path.png! |
61 | 6 | vpx | |
62 | 6 | vpx | In the tab "Details" enter "Quassel IRC Core Service" under "Description:". |
63 | 6 | vpx | |
64 | 6 | vpx | !NSSM_details.png! |
65 | 6 | vpx | |
66 | 6 | vpx | In the tab "Log on" enter your credentials under "This account:" as "HOST\USER" with HOST being your PC hostname and USER being your current Windows username (assuming that you are an Administrator, if you don't want to use your user then use "NT AUTHORITY\NETWORK SERVICE" and leave the password empty). |
67 | 6 | vpx | |
68 | 6 | vpx | !NSSM_credentials.png! |
69 | 6 | vpx | |
70 | 6 | vpx | If you don't know your hostname just type ".\USER". Enter your password twice. |
71 | 6 | vpx | |
72 | 6 | vpx | If you don't use your current user but the network service you will have to copy all files from |
73 | 6 | vpx | |
74 | 6 | vpx | <pre>%APPDATA%\quassel-irc.org</pre> |
75 | 6 | vpx | to |
76 | 6 | vpx | <pre>%WINDIR%\ServiceProfiles\NetworkService\AppData\Roaming\quassel-irc.org</pre> |
77 | 6 | vpx | |
78 | 6 | vpx | Click the button "Install service". |
79 | 6 | vpx | |
80 | 6 | vpx | Hold the Windows key + R and type "services.msc", hit Enter. If the service "QuasselCore" is not started, start it manually. |