From AnopeWiki
Jump to: navigation, search


Anope will NOT run on Windows 98/ME or Below, or Windows NT 4 or Below

There are two ways of running Anope on Windows, downloading the precompiled version (recommended) or compiling your own version of Anope.

Precompiled Version


For information on compiling Anope BEFORE version, see Windows:OldCompileMethod

  • Download the Anope source code tar.gz from
  • Install the following software:
    1. Microsoft Visual C++ 2005 or above Microsoft Visual C++ 2010 Express Edition
    2. Microsoft PlatformSDK
    3. MySQL (if you wish to build with MySQL compatibility)
  • Unpack Anope Source Code to a location on your hard disk. (We suggest C:\Program Files\Anope)
  • Open the Visual Studio Command Prompt (NOT A DOS BOX), and change directory to the location of your extracted Anope Source Code
  • At the prompt type Config (And answer the questions).
  • At the prompt type nmake -f makefile.win32
  • Locate your anope directory
  • Rename the example.conf to services.conf and configure it to your suiting
  • Configure your IRCd's config file and /rehash
  • Run anope and check for errors on IRC / Log files


If you are unsure of the settings, you can go to the dos command prompt and run "anope.exe -nofork -debug" and watch the information as it attempts to connect. You can launch services in two ways. If you are sure that the entered configuration information is correct, simply double clicking the Anope executable will cause it to start; no window will pop up. If you'd rather have a more textual output, you can start at the dos prompt and type in "anope.exe". If services are successfully started up the dos prompt will seem to hang; at this point you can safely close the dos window.


You can obtain modules from the Anope Modules Site, you can then refer to Windows:Modules in order to compile modules with Windows.


  • Copy libmysql.dll to c:\windows\system32\, or ensure it's in a directory in your PATH variable, or in the same folder as Anope. The pre-compiled version of Anope is built against the latest stable MySQL branch at the time - currently 5.0.
  • Find and change:
    1. MysqlHost "localhost" - This needs to be the host or IP address of your MySQL server. If it's on the same machine, you can leave this as localhost.
    2. MysqlUser "username" - This needs to be the user that has access to your database.
    3. MysqlPass "password" - The password assosiated with the MySQL user defined above.
    4. MysqlName "anope" - This needs to be the name of the database that Anope will use. All tables have anope_ as their prefix by default.
    5. #MysqlSock "/tmp/mysql.sock" - You won't need to uncomment or define this when running Anope on Windows.
    6. #MysqlPort 3306 - If you run MySQL on a port other than 3306, you'll need to change this line as required.
  • Import the tables.sql file that came with Anope into your MySQL database. This can be done via a web-interface, or by issuing the following command in a command prompt window, inside the bin folder of your MySQL installation:
mysql --user=<value of MysqlUser> --pass <value of MysqlName> < "c:\program files\anope\data\tables.sql"
  • Now, either start or restart Anope and MySQL should now be in use. If you want to have Anope read from the SQL database on startup too (NOTE: This could cause a slight delay on loading), you'll need to uncomment the UseRDB option in services.conf.

If MySQL is not enabled, check your logs for any error messages. Also ensure you are using a version of Anope with MySQL enabled. If you are still having problems, check out the Forums or ask in our support channel.

Anope as service

NOTE: The following is an unofficial solution to the Anope as a service problem. In future versions of Anope (possibly 1.7.20 or later) an option will be included with the Installer that offers this. This solution will be different from that listed below. The following is offered as a temporary solution, but is in no way supported by the Anope Team.

  • Download the Windows Resource Kit and install it link
  • At a command prompt window, type the following command: path\INSTSRV.EXE Anope path\SRVANY.EXE (Where path is the drive and directory of the Windows Resource Kit - for example, C:\RESKIT - and Anope is the name of the service you are creating).


C:\Program Files\Windows Resource Kit\Tools\Instsrv.exe Anope C:\Program Files\Windows Resource Kit\Tools\Srvany.exe

NOTE: To verify that the service was created correctly, check the registry to verify that the ImagePath value under HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\service name is set to point to SRVANY.EXE. If this is not set correctly, the service will stop shortly after it starts and return an Event ID 7000 "The service name failed to start."

  • Run Registry Editor (Regedt32.exe)and locate the following subkey:
  • From the Edit menu, click Add Key. Type the following and click OK:
Key Name: Parameters
Class : <leave blank>
  • Select the Parameters key.
  • From the Edit menu, click Add Value. Type the following and click OK:
Value Name: Application
Data Type : REG_SZ
String : C:\Program Files\Anope\anope.exe
  • Select the Parameters key again.
  • From the Edit menu, click Add Value. Type the following and click OK:
Value Name: AppDirectory
Data Type : REG_SZ
String : C:\Program Files\Anope\
  • Close Registry Editor
  • Start anope from the Services applet in Control Panel or from a MS-DOS command prompt, type the following:
Personal tools