<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
		<id>https://www.alandfaraway.info/Wiki/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Basilica</id>
		<title>ALFA - User contributions [en]</title>
		<link rel="self" type="application/atom+xml" href="https://www.alandfaraway.info/Wiki/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Basilica"/>
		<link rel="alternate" type="text/html" href="https://www.alandfaraway.info/wiki/Special:Contributions/Basilica"/>
		<updated>2026-04-14T17:24:02Z</updated>
		<subtitle>User contributions</subtitle>
		<generator>MediaWiki 1.29.1</generator>

	<entry>
		<id>https://www.alandfaraway.info/Wiki/index.php?title=Creating_a_Content_Patch&amp;diff=2898</id>
		<title>Creating a Content Patch</title>
		<link rel="alternate" type="text/html" href="https://www.alandfaraway.info/Wiki/index.php?title=Creating_a_Content_Patch&amp;diff=2898"/>
				<updated>2017-06-19T06:29:48Z</updated>
		
		<summary type="html">&lt;p&gt;Basilica: /* Content Patch Downloader Resource Updates */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Technical Manuals]]&lt;br /&gt;
ACR 1.87 supports the creation and deployment of '''content patches''', which are server-side hotfixes that are automatically deployed to live servers on startup.  The content patch system is intended to make it easier to deploy important bugfixes to an already released ACR version.&lt;br /&gt;
&lt;br /&gt;
Content patches can be used to perform the following tasks:&lt;br /&gt;
* Place a file in the Override directory for the server.  Note that module and hak resources supersede &amp;quot;Override&amp;quot; resources (but Override supersedes in-box .zip files and can be used to deploy a new script that could be called by a hak, etc.).  Override-targetted content patch files go in &amp;quot;override\ACR_ContentPatches&amp;quot; on each live server.&lt;br /&gt;
* Place an updated hak in the Hak directory for the server (for example, alfa2_acr.hak).&lt;br /&gt;
* Recompile module scripts.&lt;br /&gt;
* Patch moduledownloaderresources.xml with new hak file download information for game clients (module specific downloader resources are left as-is).&lt;br /&gt;
&lt;br /&gt;
Content patches '''cannot''' be used to make client-side content changes alone (those must go through the standard release process in addition).  As of ACR 1.90, the content patch system can recompile all module scripts (if the RecompileModule database column is set for a content_patch_files row that required updating), if necessary.  This facility can be used to update includes in the ACR hak and recompile scripts in a module that reference the include.&lt;br /&gt;
&lt;br /&gt;
Content patches automatically update the downloader XML for a server (see [[#Content Patch Downloader Resources]] for how to configure new dowmloader XML information for new client-side release).  Server admins should be careful to not restage haks that have been hotfixed by the content patch system (typically, alfa2_acr.hak), but if any of the downloader XML descriptors for noticed files were incorrect, the server will correct these on next startup (incurring an additional server process restart).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Content Patch Components ==&lt;br /&gt;
A content patch contains several distinct components which must be assembled:&lt;br /&gt;
* The content files to patch (e.g. alfa2_acr.hak, or a free-standing file to place in the Override directory).  Any number of files can theoretically be content patched, but you're encouraged to keep the set of file small.  The content files must be placed on the central server vault, in a special directory, for them to be downloadable by the content patch system.&lt;br /&gt;
* A set of database entries in the '''content_patch_files''' table that describe what ACR hak version the patch applies to (e.g. 1.87), and what file is associated with the patch.  You need a database record for each file that is contained within the content patch.&lt;br /&gt;
* An optional initialization script, called &amp;quot;acr_patch_initialize&amp;quot;.  If present, this script is run during module startup, to provide opportunity for a content patch to hook script callbacks or set things up.  The script is never located in the ACR hak or the module, but should only be distributed as a content_patch_files record.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Creating a Content Patch ==&lt;br /&gt;
The following is a checklist of the steps necessary to build and deploy a content patch.  Once deployed, it will be automatically picked up by live servers on their next restart.  (If necessary, you can remotely restart a server using the Restart Server tool.)&lt;br /&gt;
&lt;br /&gt;
These steps assume that you have already verified that the new hak to install works correctly, and that it compiles correctly for a module.  These steps are highly recommended to make sure that the patch process goes smoothly.&lt;br /&gt;
&lt;br /&gt;
# First, create the content files to patch.  For example, the fixed script or the patched ACR hak.  Typically this would be done by checking out the ACR branch for the released ACR version to be patched, making the necessary changes and checking them in to the repository, and then rebuilding the hak from that branch.&lt;br /&gt;
# Record the existing content_patch_files contents from the database, in case a rollback is necessary.&lt;br /&gt;
# Next, copy the patched content files to the Azure updater using the UpdaterConnectionString (formerly, the files were placed on the central vault).  They should go under ACR_ContentPatches/Global/&amp;lt;ACR_Version&amp;gt; on the updater Azure storage (for example ACR_ContentPatches/Global/1.87 for an ACR 1.87 patch).  [http://aka.ms/AzCopy AzCopy] or [https://docs.microsoft.com/en-us/azure/vs-azure-tools-storage-manage-with-storage-explorer Storage Explorer] can be used to upload content patch files.  Optionally, and recommended, content patch file hosted on Azure storage can be gzip compressed with a tool like gzip.exe from msysgit, or 7-zip (append .gzip to the filename uploaded to Azure, e.g. alfa2_acr.hak.gzip after compressing with gzip.exe).  Compression was not supported for updates distributed by the central vault, though that method is deprecated.  Remember that Azure storage is case sensitive, so path cases must match exactly, and that the compression format must be gzip.&lt;br /&gt;
## Note!  It is highly recommended that the previous content patch files be downloaded or saved, for any files that will be replaced, so that a rollback can be performed.&lt;br /&gt;
## The content patch files are stored in the alfa-nwn2-acr-updater storage container on Azure storage.  By convention, the content patches are stored in the ACR_ContentPatches\Global\&amp;lt;hak version&amp;gt; directory; the latter path is drawn from the config table &amp;quot;ContentPatchPath&amp;quot; variable.&lt;br /&gt;
## By current convention, the ACR version is left at 1.9201 and has not been incremented for some time.  The content patch system allows different patches to be selected based on the previous ACR version of the server, but it has proven more conventient in many cases to simply keep the same version number and produce a new patch content.&lt;br /&gt;
## Presently, the server vault and ACR updater are on the same Azure storage account, though this is not architecturally required.&lt;br /&gt;
# Generate a md5 checksum of each of the patched content files.  The md5sum utility (included with msysgit - [http://code.google.com/p/msysgit/ http://code.google.com/p/msysgit/] - or cygwin, can do this).  You'll need these checksums to insert into the database in the next step.  If compressed files were stored on Azure storage, the checksum must be that of the uncompressed file.&lt;br /&gt;
# Create (or, as need be, update) a database record in content_patch_files for each file present in the content patch.&lt;br /&gt;
## Set the '''FileName''' column to the name of the file to patch (with extension, no spaces, for example &amp;quot;alfa2_acr.hak&amp;quot;).  This should not include the .gzip appended for compressed content patches, rather it should reflect the final on disk filename of the content to update.&lt;br /&gt;
## Set the '''HakVersion''' column based on the ACR version that is matched when deciding whether the content patch is applicable (for example, &amp;quot;1.87&amp;quot;).&lt;br /&gt;
## Set the '''Location''' column to either &amp;quot;override&amp;quot; or &amp;quot;hak&amp;quot;, depending on where the content file should be stored on live servers.&lt;br /&gt;
## Set the '''Checksum''' column to the md5sum value (32 hex characters) for the file that is being patched.&lt;br /&gt;
## Set the '''RecompileModule''' column to true if the module needs to have all scripts recompiled, else false if a recompile is not required.  A recompile is generally only necessary if an include in the ACR HAK has been changed and the include is referenced by a script distributed with the module.  This option is only supported in ACR 1.90 or higher (otherwise the module is never recompiled).&lt;br /&gt;
## Only one row for a specific combination of both a given '''FileName''' and '''HakVersion''' should exist in the table.&lt;br /&gt;
# Connect a test server to the database and central server vault, and restart it.  Check the log to make sure that the content patch applied successfully; the server should restart a second time after applying the patches.  There will be server log entries containing &amp;quot;ModuleContentPatcher&amp;quot; updating you with the status of content patches as they're applied.&lt;br /&gt;
# If a content patch needs to cause new client content to be downloaded, follow the steps for [[#Content Patch Downloader Resource Updates]] to configure the moduledownloaderresources.xml entries that will be patched on each server.  Patches that only have server-side script changes do not need this, but 2DA or template or GUI updates will need client-side updates, and have to go through that process.&lt;br /&gt;
&lt;br /&gt;
It is highly recommended that you test the content patch on a test server before copying the patch data to the live server.  You should still verify that the patch applied correctly to a live server, however, once the patch has been deployed to production.&lt;br /&gt;
&lt;br /&gt;
Remember to set the RecompileModule flag on the ACR hak if any script includes that are included by the module are modified.  Most script files are included by the module, so this is often necessary.  Without this step, for a script update, servers may not see the update take effect.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Troubleshooting ==&lt;br /&gt;
The IRC bot will send status messages in #alfa-players and #alfa-tech as an update is under way, so being present in these channels is recommended.&lt;br /&gt;
&lt;br /&gt;
Detailed logging information is logged to the server log.  If that is not present, stop the server, edit nwn2player.ini for the server, and make sure that &amp;quot;Scripts Print to Log=1&amp;quot; is present (the default might be &amp;quot;Scripts Print to Log=0&amp;quot;).  This is required for WriteTimestampedLogEntry to log to the server log, and most diagnostics are written with that mechanism.  Within the server log, search for the strings '''ModuleContentPatcher''' and '''PatchContentFiles''' to find the log messages relevant for the ACR updater.&lt;br /&gt;
&lt;br /&gt;
In order for the module recompile to work, NWNScriptCompiler.exe has to be installed in the NWNX4 directory of the server.  This is part of the standard server configuration and deployment process.  A file not found error when launching the compiler, in the server log, may indicate that NWNScriptCompiler.exe is not properly installed.  The recompile process only takes effect when the given hak is updated, so you may need to copy the old hak onto the server and start it again to cause a recompile to take, if the recompiler flag was not properly set the first time around.&lt;br /&gt;
&lt;br /&gt;
If a server does not pick up an update at all, the database entries in content_patch_files are likely to be incorrect.&lt;br /&gt;
&lt;br /&gt;
Client downloader resources need to be processed using the [[#Content Patch Downloader Resources]] step below, so if a client side change does not take effect, make sure that both processes have been followed.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Content Patch Downloader Resource Updates ==&lt;br /&gt;
The content patch system can automatically maintain moduledownloaderresources.xml if new haks need to be pushed to client machines.  There is a separate process, outlined below, to configure updates to moduledownloaderresources.xml on each server.  This checklist needs to be followed in addition to the steps for [[#Creating a Content Patch]] when any .hak updates need to be downloaded by client machines.  Note that this process can only update existing entries in moduledownloaderresources.xml; if an entirely new hak is created from scratch, this must be manually added to moduledownloaderresources.xml for each server, or the content patch system would need to be extended to support adding new download resources.&lt;br /&gt;
&lt;br /&gt;
The database table content_download_config contains a set of rows that describe override values that are installed into each server's moduledownloaderresources.xml on startup, replacing any previous values.  This provides a mechanism to update the autodownloader manifest on all servers as they deploy a content patch, and avoids the downloader resources from having picking up invalid values for ACR-controlled resources when a per-module content update is performed.&lt;br /&gt;
&lt;br /&gt;
Note that this process does not replace publishing new hak files to the download server for clients to download, and that is a separate step fron the Azure ACR updater.&lt;br /&gt;
&lt;br /&gt;
# First, go through the normal process to stage the new hak contents for the autodownloader using the toolset using any module that references the ACR haks after installing the new hak that will be published to the autodownloader, and take note of the specific hak files that need client updates.  These are typically all haks, except that the ACR hak can be stale on the client in the case of server-side script only updates.  Note that it is important to use the same hak on the client and server, so it is best to perform the steps listed in [[#Creating a Content Patch]] followed by those in this section at the same time, unless an update is a server-side only script change.&lt;br /&gt;
# For each hak file that needs client-side updates, take note of the following elements from the new moduledownloaderresources.xml produced by the toolset.  Each of these values will need to be updated in the corresponding row of content_download_config, which is keyed off of by hak filename.  Below, the name of each moduledownloaderresources.xml element is followed, in parenthesis, by the corresponding database column name in content_download_config.&lt;br /&gt;
## name (Name)&lt;br /&gt;
## hash (Hash)&lt;br /&gt;
## downloadHash (DownloadHash)&lt;br /&gt;
## dlsize (DLSize)&lt;br /&gt;
## size (Size)&lt;br /&gt;
# Record the existing content_download_config contents from the database, in case a rollback is necessary.&lt;br /&gt;
# Each hak that needs a new client-side update must have its corresponding content_download_config rows updated to match the new moduledownloaderresources.xml elements on the computer that you have used to stage a new ACR-controlled hak.  There should be only one entry in the table for each .hak Name value.&lt;br /&gt;
# As normal, the staged lzma files from the toolset need to be uploaded to the download server so that clients can find them.&lt;br /&gt;
## Note!  It is highly recommended that the previous LZMA files be downloaded or saved, for any files that will be replaced, so that a rollback can be performed.&lt;br /&gt;
&lt;br /&gt;
== Content Patches and the Standard Release Process ==&lt;br /&gt;
The content patch system ensures that patches are tagged with a specific ACR version that they apply to.  When a server upgrades to a new ACR version, using the standard release process, previous content patches will no longer be applicable and won't be applied anymore.  In most cases, the ACR version is not incremented, and is kept at 1.9201, though previously it used to have been incremented.  This was found to create more overhead than benefit and so the old version is &lt;br /&gt;
&lt;br /&gt;
For content patch files located in the &amp;quot;hak&amp;quot; directory, no action is taken.  It's expected that if the administrator did an ACR upgrade, that they have manually upgraded the haks anyway.  (No new haks can be added with the content patch system, only hotfixes to existing haks.)&lt;br /&gt;
&lt;br /&gt;
For content patch files located in the &amp;quot;override&amp;quot; directory, the content patch system automatically removes any patch files not applicable to the ACR version the server starts up with at startup time.  Thus it's not necessary to manually clean the content patch override directory out.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Content Patch Server Log Messages ==&lt;br /&gt;
Messages in the NWN2 server log file track the progress of the content patch system. When a content patch has been successfully applied, a log message of the form '''&amp;quot;ModuleContentPatcher.ProcessContentPatches: Successfully updated content patch file &amp;lt;filename&amp;gt;.&amp;quot;''' will be written to the server log. Log messages related to the content patcher can be easily identified by searching for '''ModuleContentPatcher''' in the log file. To verify that a content patch was deployed successfully, examine the server log after a server restart. Be sure to check the log message timestamp; it is usually best to start searching from the end of the server log file.&lt;br /&gt;
&lt;br /&gt;
If a content patch requests a module script recompile, then the console output of the script compiler is printed to the server log file.  An error message prefixed with the standard '''ModuleContentPatcher''' prefix is printed to the server log if any scripts failed to compile.&lt;/div&gt;</summary>
		<author><name>Basilica</name></author>	</entry>

	<entry>
		<id>https://www.alandfaraway.info/Wiki/index.php?title=Creating_a_Content_Patch&amp;diff=2897</id>
		<title>Creating a Content Patch</title>
		<link rel="alternate" type="text/html" href="https://www.alandfaraway.info/Wiki/index.php?title=Creating_a_Content_Patch&amp;diff=2897"/>
				<updated>2017-06-19T06:12:10Z</updated>
		
		<summary type="html">&lt;p&gt;Basilica: Document some undocumented parts of content patches and downloader XML updates, and generally expand documentation for the patch process and existing conventions.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Technical Manuals]]&lt;br /&gt;
ACR 1.87 supports the creation and deployment of '''content patches''', which are server-side hotfixes that are automatically deployed to live servers on startup.  The content patch system is intended to make it easier to deploy important bugfixes to an already released ACR version.&lt;br /&gt;
&lt;br /&gt;
Content patches can be used to perform the following tasks:&lt;br /&gt;
* Place a file in the Override directory for the server.  Note that module and hak resources supersede &amp;quot;Override&amp;quot; resources (but Override supersedes in-box .zip files and can be used to deploy a new script that could be called by a hak, etc.).  Override-targetted content patch files go in &amp;quot;override\ACR_ContentPatches&amp;quot; on each live server.&lt;br /&gt;
* Place an updated hak in the Hak directory for the server (for example, alfa2_acr.hak).&lt;br /&gt;
* Recompile module scripts.&lt;br /&gt;
* Patch moduledownloaderresources.xml with new hak file download information for game clients (module specific downloader resources are left as-is).&lt;br /&gt;
&lt;br /&gt;
Content patches '''cannot''' be used to make client-side content changes alone (those must go through the standard release process in addition).  As of ACR 1.90, the content patch system can recompile all module scripts (if the RecompileModule database column is set for a content_patch_files row that required updating), if necessary.  This facility can be used to update includes in the ACR hak and recompile scripts in a module that reference the include.&lt;br /&gt;
&lt;br /&gt;
Content patches automatically update the downloader XML for a server (see [[#Content Patch Downloader Resources]] for how to configure new dowmloader XML information for new client-side release).  Server admins should be careful to not restage haks that have been hotfixed by the content patch system (typically, alfa2_acr.hak), but if any of the downloader XML descriptors for noticed files were incorrect, the server will correct these on next startup (incurring an additional server process restart).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Content Patch Components ==&lt;br /&gt;
A content patch contains several distinct components which must be assembled:&lt;br /&gt;
* The content files to patch (e.g. alfa2_acr.hak, or a free-standing file to place in the Override directory).  Any number of files can theoretically be content patched, but you're encouraged to keep the set of file small.  The content files must be placed on the central server vault, in a special directory, for them to be downloadable by the content patch system.&lt;br /&gt;
* A set of database entries in the '''content_patch_files''' table that describe what ACR hak version the patch applies to (e.g. 1.87), and what file is associated with the patch.  You need a database record for each file that is contained within the content patch.&lt;br /&gt;
* An optional initialization script, called &amp;quot;acr_patch_initialize&amp;quot;.  If present, this script is run during module startup, to provide opportunity for a content patch to hook script callbacks or set things up.  The script is never located in the ACR hak or the module, but should only be distributed as a content_patch_files record.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Creating a Content Patch ==&lt;br /&gt;
The following is a checklist of the steps necessary to build and deploy a content patch.  Once deployed, it will be automatically picked up by live servers on their next restart.  (If necessary, you can remotely restart a server using the Restart Server tool.)&lt;br /&gt;
&lt;br /&gt;
These steps assume that you have already verified that the new hak to install works correctly, and that it compiles correctly for a module.  These steps are highly recommended to make sure that the patch process goes smoothly.&lt;br /&gt;
&lt;br /&gt;
# First, create the content files to patch.  For example, the fixed script or the patched ACR hak.  Typically this would be done by checking out the ACR branch for the released ACR version to be patched, making the necessary changes and checking them in to the repository, and then rebuilding the hak from that branch.&lt;br /&gt;
# Record the existing content_patch_files contents from the database, in case a rollback is necessary.&lt;br /&gt;
# Next, copy the patched content files to the Azure updater using the UpdaterConnectionString (formerly, the files were placed on the central vault).  They should go under ACR_ContentPatches/Global/&amp;lt;ACR_Version&amp;gt; on the updater Azure storage (for example ACR_ContentPatches/Global/1.87 for an ACR 1.87 patch).  [http://aka.ms/AzCopy AzCopy] or [https://docs.microsoft.com/en-us/azure/vs-azure-tools-storage-manage-with-storage-explorer Storage Explorer] can be used to upload content patch files.  Optionally, and recommended, content patch file hosted on Azure storage can be gzip compressed with a tool like gzip.exe from msysgit, or 7-zip (append .gzip to the filename uploaded to Azure, e.g. alfa2_acr.hak.gzip after compressing with gzip.exe).  Compression was not supported for updates distributed by the central vault, though that method is deprecated.  Remember that Azure storage is case sensitive, so path cases must match exactly, and that the compression format must be gzip.&lt;br /&gt;
## Note!  It is highly recommended that the previous content patch files be downloaded or saved, for any files that will be replaced, so that a rollback can be performed.&lt;br /&gt;
## The content patch files are stored in the alfa-nwn2-acr-updater storage container on Azure storage.  By convention, the content patches are stored in the ACR_ContentPatches\Global\&amp;lt;hak version&amp;gt; directory; the latter path is drawn from the config table &amp;quot;ContentPatchPath&amp;quot; variable.&lt;br /&gt;
## By current convention, the ACR version is left at 1.9201 and has not been incremented for some time.  The content patch system allows different patches to be selected based on the previous ACR version of the server, but it has proven more conventient in many cases to simply keep the same version number and produce a new patch content.&lt;br /&gt;
## Presently, the server vault and ACR updater are on the same Azure storage account, though this is not architecturally required.&lt;br /&gt;
# Generate a md5 checksum of each of the patched content files.  The md5sum utility (included with msysgit - [http://code.google.com/p/msysgit/ http://code.google.com/p/msysgit/] - or cygwin, can do this).  You'll need these checksums to insert into the database in the next step.  If compressed files were stored on Azure storage, the checksum must be that of the uncompressed file.&lt;br /&gt;
# Create (or, as need be, update) a database record in content_patch_files for each file present in the content patch.&lt;br /&gt;
## Set the '''FileName''' column to the name of the file to patch (with extension, no spaces, for example &amp;quot;alfa2_acr.hak&amp;quot;).  This should not include the .gzip appended for compressed content patches, rather it should reflect the final on disk filename of the content to update.&lt;br /&gt;
## Set the '''HakVersion''' column based on the ACR version that is matched when deciding whether the content patch is applicable (for example, &amp;quot;1.87&amp;quot;).&lt;br /&gt;
## Set the '''Location''' column to either &amp;quot;override&amp;quot; or &amp;quot;hak&amp;quot;, depending on where the content file should be stored on live servers.&lt;br /&gt;
## Set the '''Checksum''' column to the md5sum value (32 hex characters) for the file that is being patched.&lt;br /&gt;
## Set the '''RecompileModule''' column to true if the module needs to have all scripts recompiled, else false if a recompile is not required.  A recompile is generally only necessary if an include in the ACR HAK has been changed and the include is referenced by a script distributed with the module.  This option is only supported in ACR 1.90 or higher (otherwise the module is never recompiled).&lt;br /&gt;
## Only one row for a specific combination of both a given '''FileName''' and '''HakVersion''' should exist in the table.&lt;br /&gt;
# Connect a test server to the database and central server vault, and restart it.  Check the log to make sure that the content patch applied successfully; the server should restart a second time after applying the patches.  There will be server log entries containing &amp;quot;ModuleContentPatcher&amp;quot; updating you with the status of content patches as they're applied.&lt;br /&gt;
# If a content patch needs to cause new client content to be downloaded, follow the steps for [[#Content Patch Downloader Resource Updates]] to configure the moduledownloaderresources.xml entries that will be patched on each server.  Patches that only have server-side script changes do not need this, but 2DA or template or GUI updates will need client-side updates, and have to go through that process.&lt;br /&gt;
&lt;br /&gt;
It is highly recommended that you test the content patch on a test server before copying the patch data to the live server.  You should still verify that the patch applied correctly to a live server, however, once the patch has been deployed to production.&lt;br /&gt;
&lt;br /&gt;
Remember to set the RecompileModule flag on the ACR hak if any script includes that are included by the module are modified.  Most script files are included by the module, so this is often necessary.  Without this step, for a script update, servers may not see the update take effect.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Troubleshooting ==&lt;br /&gt;
The IRC bot will send status messages in #alfa-players and #alfa-tech as an update is under way, so being present in these channels is recommended.&lt;br /&gt;
&lt;br /&gt;
Detailed logging information is logged to the server log.  If that is not present, stop the server, edit nwn2player.ini for the server, and make sure that &amp;quot;Scripts Print to Log=1&amp;quot; is present (the default might be &amp;quot;Scripts Print to Log=0&amp;quot;).  This is required for WriteTimestampedLogEntry to log to the server log, and most diagnostics are written with that mechanism.  Within the server log, search for the strings '''ModuleContentPatcher''' and '''PatchContentFiles''' to find the log messages relevant for the ACR updater.&lt;br /&gt;
&lt;br /&gt;
In order for the module recompile to work, NWNScriptCompiler.exe has to be installed in the NWNX4 directory of the server.  This is part of the standard server configuration and deployment process.  A file not found error when launching the compiler, in the server log, may indicate that NWNScriptCompiler.exe is not properly installed.  The recompile process only takes effect when the given hak is updated, so you may need to copy the old hak onto the server and start it again to cause a recompile to take, if the recompiler flag was not properly set the first time around.&lt;br /&gt;
&lt;br /&gt;
If a server does not pick up an update at all, the database entries in content_patch_files are likely to be incorrect.&lt;br /&gt;
&lt;br /&gt;
Client downloader resources need to be processed using the [[#Content Patch Downloader Resources]] step below, so if a client side change does not take effect, make sure that both processes have been followed.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Content Patch Downloader Resource Updates ==&lt;br /&gt;
The content patch system can automatically maintain moduledownloaderresources.xml if new haks need to be pushed to client machines.  There is a separate process, outlined below, to configure updates to moduledownloaderresources.xml on each server.  This checklist needs to be followed in addition to the steps for [[#Creating a Content Patch]] when any .hak updates need to be downloaded by client machines.  Note that this process can only update existing entries in moduledownloaderresources.xml; if an entirely new hak is created from scratch, this must be manually added to moduledownloaderresources.xml for each server, or the content patch system would need to be extended to support adding new download resources.&lt;br /&gt;
&lt;br /&gt;
The database table content_download_config contains a set of rows that describe override values that are installed into each server's moduledownloaderresources.xml on startup, replacing any previous values.  This provides a mechanism to update the autodownloader manifest on all servers as they deploy a content patch, and avoids the downloader resources from having picking up invalid values for ACR-controlled resources when a per-module content update is performed.&lt;br /&gt;
&lt;br /&gt;
Note that this process does not replace publishing new hak files to the download server for clients to download, and that is a separate step fron the Azure ACR updater.&lt;br /&gt;
&lt;br /&gt;
# First, go through the normal process to stage the new hak contents for the autodownloader using the toolset using any module that references the ACR haks after installing the new hak that will be published to the autodownloader, and take note of the specific hak files that need client updates.  These are typically all haks, except that the ACR hak can be stale on the client in the case of server-side script only updates.  Note that it is important to use the same hak on the client and server, so it is best to perform the steps listed in [[#Creating a Content Patch]] followed by those in this section at the same time, unless an update is a server-side only script change.&lt;br /&gt;
# For each hak file that needs client-side updates, take note of the following elements from the new moduledownloaderresources.xml produced by the toolset.  Each of these values will need to be updated in the corresponding row of content_download_config, which is keyed off of by hak filename.  Below, the name of each moduledownloaderresources.xml element is followed, in parenthesis, by the corresponding database column name in content_download_config.&lt;br /&gt;
## name (Name)&lt;br /&gt;
## hash (Hash)&lt;br /&gt;
## downloadHash (DownloadHash)&lt;br /&gt;
## dlsize (DLSize)&lt;br /&gt;
## size (Size)&lt;br /&gt;
# Record the existing content_download_config contents from the database, in case a rollback is necessary.&lt;br /&gt;
# Each hak that needs a new client-side update must have its corresponding content_download_config rows updated to match the new moduledownloaderresources.xml elements on the computer that you have used to stage a new ACR-controlled hak.&lt;br /&gt;
# As normal, the staged lzma files from the toolset need to be uploaded to the download server so that clients can find them.&lt;br /&gt;
## Note!  It is highly recommended that the previous LZMA files be downloaded or saved, for any files that will be replaced, so that a rollback can be performed.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Content Patches and the Standard Release Process ==&lt;br /&gt;
The content patch system ensures that patches are tagged with a specific ACR version that they apply to.  When a server upgrades to a new ACR version, using the standard release process, previous content patches will no longer be applicable and won't be applied anymore.  In most cases, the ACR version is not incremented, and is kept at 1.9201, though previously it used to have been incremented.  This was found to create more overhead than benefit and so the old version is &lt;br /&gt;
&lt;br /&gt;
For content patch files located in the &amp;quot;hak&amp;quot; directory, no action is taken.  It's expected that if the administrator did an ACR upgrade, that they have manually upgraded the haks anyway.  (No new haks can be added with the content patch system, only hotfixes to existing haks.)&lt;br /&gt;
&lt;br /&gt;
For content patch files located in the &amp;quot;override&amp;quot; directory, the content patch system automatically removes any patch files not applicable to the ACR version the server starts up with at startup time.  Thus it's not necessary to manually clean the content patch override directory out.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Content Patch Server Log Messages ==&lt;br /&gt;
Messages in the NWN2 server log file track the progress of the content patch system. When a content patch has been successfully applied, a log message of the form '''&amp;quot;ModuleContentPatcher.ProcessContentPatches: Successfully updated content patch file &amp;lt;filename&amp;gt;.&amp;quot;''' will be written to the server log. Log messages related to the content patcher can be easily identified by searching for '''ModuleContentPatcher''' in the log file. To verify that a content patch was deployed successfully, examine the server log after a server restart. Be sure to check the log message timestamp; it is usually best to start searching from the end of the server log file.&lt;br /&gt;
&lt;br /&gt;
If a content patch requests a module script recompile, then the console output of the script compiler is printed to the server log file.  An error message prefixed with the standard '''ModuleContentPatcher''' prefix is printed to the server log if any scripts failed to compile.&lt;/div&gt;</summary>
		<author><name>Basilica</name></author>	</entry>

	<entry>
		<id>https://www.alandfaraway.info/Wiki/index.php?title=Virtual_Machine_Setup&amp;diff=2888</id>
		<title>Virtual Machine Setup</title>
		<link rel="alternate" type="text/html" href="https://www.alandfaraway.info/Wiki/index.php?title=Virtual_Machine_Setup&amp;diff=2888"/>
				<updated>2015-10-06T05:48:37Z</updated>
		
		<summary type="html">&lt;p&gt;Basilica: More troubleshooting documents.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Technical Manuals]]&lt;br /&gt;
This document describes in rough detail the recommended checklist for setting up a new game server host VM in the standard configuration.  This configuration is suitable for running nwn2server.exe as a limited user account.&lt;br /&gt;
&lt;br /&gt;
== Prerequisites ==&lt;br /&gt;
.NET 3.5 and the DirectX End-User Runtime are optional unless the toolset will be run locally on the game server host machine.&lt;br /&gt;
&lt;br /&gt;
* If running the toolset on the host is desired (optional), enable .NET 3.5 in Add/Remove Windows Features before installing DirectX&lt;br /&gt;
* [http://www.microsoft.com/en-us/download/details.aspx?id=35 DirectX End-User Runtime]  (required only if the toolset will be used to stage content on the game server)&lt;br /&gt;
* [http://www.microsoft.com/en-us/download/details.aspx?id=17851 Microsoft .NET Framework 4]&lt;br /&gt;
* [http://www.microsoft.com/en-us/download/details.aspx?id=26347 Microsoft Visual C++ 2005 Service Pack 1 Redistributable Package MFC Security Update]&lt;br /&gt;
* [http://www.microsoft.com/en-us/download/details.aspx?id=26999 Microsoft Visual C++ 2010 Service Pack 1 Redistributable Package MFC Security Update]&lt;br /&gt;
&lt;br /&gt;
== Process ==&lt;br /&gt;
# Install Windows Server&lt;br /&gt;
# Copy standard tools over&lt;br /&gt;
# Create SG &amp;quot;NWN2 Servers&amp;quot;&lt;br /&gt;
# Create SG &amp;quot;NWN2 Admins&amp;quot;&lt;br /&gt;
# Create user &amp;quot;NWN2Server&amp;quot;&lt;br /&gt;
## Add to &amp;quot;NWN2 Servers&amp;quot; SG&lt;br /&gt;
# Create C:\NWN2, xcopy NWN2 install over&lt;br /&gt;
## Grant &amp;quot;NWN2 Servers&amp;quot; create files, create folders to &amp;quot;This folder only&amp;quot;&lt;br /&gt;
## Grant &amp;quot;NWN2 Admins&amp;quot; modify to folder, subfolders, and files&lt;br /&gt;
## Import NWN2.reg&lt;br /&gt;
# Create C:\NWN2User&lt;br /&gt;
## Grant full control to &amp;quot;NWN2 Servers&amp;quot;&lt;br /&gt;
## Grant modify/execute/list/read/write to &amp;quot;NWN2 Admins&amp;quot;&lt;br /&gt;
# Runas /profile /user:NWN2Server cmd.exe&lt;br /&gt;
## cd /d &amp;quot;%userprofile%\Documents&amp;quot;&lt;br /&gt;
## mklink /j &amp;quot;Neverwinter Nights 2&amp;quot; C:\NWN2User&lt;br /&gt;
## putty -ssh alfa@sql.alandfaraway.org&lt;br /&gt;
### Confirm and accept central server public key for vault tunnel to work&lt;br /&gt;
# Create C:\NWNX4, xcopy NWNX4 installation over&lt;br /&gt;
## Grant modify/execute/list/read/write to &amp;quot;NWN2 Admins&amp;quot;&lt;br /&gt;
## Grant modify/execute/list/read/write to &amp;quot;NWN2 Servers&amp;quot; for:&lt;br /&gt;
### AuroraServerNWScript.log&lt;br /&gt;
### AuroraServerVault.log&lt;br /&gt;
### nwnx.txt&lt;br /&gt;
### nwnx_controller.txt&lt;br /&gt;
### StandardQueryLog.txt&lt;br /&gt;
### xp_mysql.txt&lt;br /&gt;
### xp_bugfix.txt&lt;br /&gt;
### xp_objectattributes.txt&lt;br /&gt;
### xp_srvadmin.txt&lt;br /&gt;
### xp_system.txt&lt;br /&gt;
### xp_time.txt&lt;br /&gt;
# Create C:\Users\Public\Desktop\Credentials.txt&lt;br /&gt;
# Copy standard links to C:\Users\Public\Desktop&lt;br /&gt;
# Copy standard links to C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Tools&lt;br /&gt;
# Copy standard scripts to C:\Scripts&lt;br /&gt;
# Copy standard NWN2 tools to C:\Tools&lt;br /&gt;
# Copy NWNServerConsole to C:\NWN2\Console&lt;br /&gt;
# Fix PowerShell signing&lt;br /&gt;
## Set-ExecutionPolicy -Scope LocalMachine -ExecutionPolicy Unrestricted -Force&lt;br /&gt;
# Install [http://git-scm.com/ Git]&lt;br /&gt;
# Install [https://filezilla-project.org/ FileZilla]&lt;br /&gt;
# Install [http://msdn.microsoft.com/en-us/windows/apps/br229516 Win8 Performance Toolkit]&lt;br /&gt;
# Install [http://www.7-zip.org/ 7-zip]&lt;br /&gt;
# Install [http://gvim.en.softonic.com/ gvim]&lt;br /&gt;
# Install WinDbg for [http://www.microsoft.com/en-us/download/details.aspx?id=8279 Windows 7] or [http://msdn.microsoft.com/en-US/windows/desktop/bg162891 Windows 8.1].&lt;br /&gt;
# Set &amp;lt;code&amp;gt;_NT_SYMBOL_PATH&amp;lt;/code&amp;gt; to &amp;lt;code&amp;gt;SRV*C:\Symbols*http://msdl.microsoft.com/download/symbols&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== NWNX4 Installation ==&lt;br /&gt;
# nwnx4_controller.exe -installservice&lt;br /&gt;
# Configure NWNX4-1 service to run as the &amp;quot;NWN2Server&amp;quot; user&lt;br /&gt;
## If using a Microsoft account (user@email) for the server user, use Computername\Username where Username is the value that %USERNAME% shows from &amp;quot;echo %USERNAME%&amp;quot; in cmd.exe and Computername is the value that %COMPUTERNAME% shows from &amp;quot;echo %COMPUTERNAME%&amp;quot; in cmd.exe.  Also, in this case, you have to manually grant this user &amp;quot;Log on as a service&amp;quot; rights by going to Local Security Policy, Local Policies, User Rights Assignment, Log on as a service, and adding Computername\Username to the list.  This only applies to accounts set up as a Microsoft account initially, not to local accounts that a Microsoft account was connected to afterwards.&lt;br /&gt;
# Get SID for NWN2Server user with PowerShell:&lt;br /&gt;
::: &amp;lt;code&amp;gt;([wmi]&amp;quot;win32_Group.Domain='$env:ComputerName',Name='NWN2 Admins'&amp;quot;).sid&amp;lt;/code&amp;gt;&lt;br /&gt;
# Set SD on nwnx4-1 service to allow NWN2 Admins to start/stop:&lt;br /&gt;
::: &amp;lt;code&amp;gt;sc sdset nwnx4-1 D:(A;;CCLCSWRPWPDTLOCRRC;;;SY)(A;;CCDCLCSWRPWPDTLOCRSDRCWDWO;;;BA)(A;;CCLCSWLOCRRC;;;IU)(A;;CCLCSWLOCRRC;;;SU)(A;;RPWP;;;&amp;lt;NWN2 Admins SID from above command&amp;gt;)S:(AU;FA;CCDCLCSWRPWPDTLOCRSDRCWDWO;;;WD)&amp;lt;/code&amp;gt;&lt;br /&gt;
# Install SSH private key to C:\NWNX4\sshfs.ppk&lt;br /&gt;
# Add SSH public key to alfa@sql.alandfaraway.org:~/.ssh/authorized_keys&lt;br /&gt;
# Set configuration in C:\NWNX4\nwnx.ini&lt;br /&gt;
# Set configuration in C:\NWNX4\AuroraServerNWScript.ini&lt;br /&gt;
# Set configuration in C:\NWNX4\xp_mysql.ini&lt;br /&gt;
# Set configuration in C:\NWNX4\DatabaseConnector.ini&lt;br /&gt;
# Set configuration in C:\NWNX4\AuroraServerVault.ini&lt;br /&gt;
&lt;br /&gt;
== Module preparation ==&lt;br /&gt;
# If the module is being cloned directly from source control or copied from a very old backup, it may be necessary to recompile the module against a current alfa2_acr.hak to ensure that the database connection (and self-update) work at module startup.  If the module never loads acr_databaseconnector in AuroraServerNWScript.log and no &amp;quot;DatabaseConnector&amp;quot; log messages in nwserverLog1.txt are seen before the ACR_OnModuleLoad: log line then this may be the problem (but also check for errors in AuroraServerNWScript.log that might indicate a misconfigured NWScript Accelerator installation).&lt;br /&gt;
# Make sure that alfa2_acr.hak is recent.  An extremely old build predating the DatabaseConnector integration may not be able to self-update the rest of the ACR.&lt;br /&gt;
&lt;br /&gt;
== Troubleshooting ==&lt;br /&gt;
Fixes for some problems encountered during server deployment are listed here.&lt;br /&gt;
# Module didn't load or server doesn't start up?&lt;br /&gt;
## Look at the server log file and C:\NWNX4\AuroraServerNWScript.log for errors/exceptions for next troubleshooting steps.&lt;br /&gt;
# Database doesn't connect, or many exceptions in server log about the database, or PCs (but not DM's) are booted at log on?&lt;br /&gt;
## Make sure that plink.exe was run once as the user that the NWNX4-1 service runs as in order to accept the SSH key of the central server.&lt;br /&gt;
# Monitor Server Uptime script closes immediately?&lt;br /&gt;
## Make sure that the following command was run from an administrator privileged PowerShell session: Set-ExecutionPolicy -Scope LocalMachine -ExecutionPolicy Unrestricted -Force&lt;br /&gt;
# Game server starts with NWNX4_GUI.exe but not as a service?&lt;br /&gt;
## Make sure that the service is running as the right user.  Go to services.msc and configure it to run as the user whose %userprofile%\Documents\Neverwinter Nights 2 has the module, server vault, etc. present.&lt;br /&gt;
# Toolset doesn't start/work properly?&lt;br /&gt;
## Make sure that .NET Framework v3.5 (sometimes called .NET Framework v2.0) is installed, and then the DirectX End-User Runtime is installed.  If the DirectX End-User Runtime was installed first, it's installer has to be re-run after installing .NET Framework v3.5.&lt;br /&gt;
# Database or scripts don't work, or NWNX4 plugins didn't load?&lt;br /&gt;
## Make sure that all Visual C++ and .NET runtime dependencies were installed.&lt;br /&gt;
## Make sure that NWNScriptJIT.dll, NWNScriptJITIntrinsics.dll are installed in the NWN2 installation directory (not necessarily the NWNX4 installation directory).&lt;br /&gt;
## Make sure that plink.exe was run once as the service user (see above).&lt;br /&gt;
# Using a Microsoft account for the service account and the service fails to start with &amp;quot;The service dependency failed to start.&amp;quot;?&lt;br /&gt;
## Configure the service to log on using Computername\Username and ensure that from Local Security Policy, Local Policies, User Rights Assignment, that Computername\Username was granted &amp;quot;Log on as a service&amp;quot; rights.&lt;/div&gt;</summary>
		<author><name>Basilica</name></author>	</entry>

	<entry>
		<id>https://www.alandfaraway.info/Wiki/index.php?title=Virtual_Machine_Setup&amp;diff=2887</id>
		<title>Virtual Machine Setup</title>
		<link rel="alternate" type="text/html" href="https://www.alandfaraway.info/Wiki/index.php?title=Virtual_Machine_Setup&amp;diff=2887"/>
				<updated>2015-10-06T05:46:43Z</updated>
		
		<summary type="html">&lt;p&gt;Basilica: Add some documentation for what to do to resolve specific problem symptoms.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Technical Manuals]]&lt;br /&gt;
This document describes in rough detail the recommended checklist for setting up a new game server host VM in the standard configuration.  This configuration is suitable for running nwn2server.exe as a limited user account.&lt;br /&gt;
&lt;br /&gt;
== Prerequisites ==&lt;br /&gt;
.NET 3.5 and the DirectX End-User Runtime are optional unless the toolset will be run locally on the game server host machine.&lt;br /&gt;
&lt;br /&gt;
* If running the toolset on the host is desired (optional), enable .NET 3.5 in Add/Remove Windows Features before installing DirectX&lt;br /&gt;
* [http://www.microsoft.com/en-us/download/details.aspx?id=35 DirectX End-User Runtime]  (required only if the toolset will be used to stage content on the game server)&lt;br /&gt;
* [http://www.microsoft.com/en-us/download/details.aspx?id=17851 Microsoft .NET Framework 4]&lt;br /&gt;
* [http://www.microsoft.com/en-us/download/details.aspx?id=26347 Microsoft Visual C++ 2005 Service Pack 1 Redistributable Package MFC Security Update]&lt;br /&gt;
* [http://www.microsoft.com/en-us/download/details.aspx?id=26999 Microsoft Visual C++ 2010 Service Pack 1 Redistributable Package MFC Security Update]&lt;br /&gt;
&lt;br /&gt;
== Process ==&lt;br /&gt;
# Install Windows Server&lt;br /&gt;
# Copy standard tools over&lt;br /&gt;
# Create SG &amp;quot;NWN2 Servers&amp;quot;&lt;br /&gt;
# Create SG &amp;quot;NWN2 Admins&amp;quot;&lt;br /&gt;
# Create user &amp;quot;NWN2Server&amp;quot;&lt;br /&gt;
## Add to &amp;quot;NWN2 Servers&amp;quot; SG&lt;br /&gt;
# Create C:\NWN2, xcopy NWN2 install over&lt;br /&gt;
## Grant &amp;quot;NWN2 Servers&amp;quot; create files, create folders to &amp;quot;This folder only&amp;quot;&lt;br /&gt;
## Grant &amp;quot;NWN2 Admins&amp;quot; modify to folder, subfolders, and files&lt;br /&gt;
## Import NWN2.reg&lt;br /&gt;
# Create C:\NWN2User&lt;br /&gt;
## Grant full control to &amp;quot;NWN2 Servers&amp;quot;&lt;br /&gt;
## Grant modify/execute/list/read/write to &amp;quot;NWN2 Admins&amp;quot;&lt;br /&gt;
# Runas /profile /user:NWN2Server cmd.exe&lt;br /&gt;
## cd /d &amp;quot;%userprofile%\Documents&amp;quot;&lt;br /&gt;
## mklink /j &amp;quot;Neverwinter Nights 2&amp;quot; C:\NWN2User&lt;br /&gt;
## putty -ssh alfa@sql.alandfaraway.org&lt;br /&gt;
### Confirm and accept central server public key for vault tunnel to work&lt;br /&gt;
# Create C:\NWNX4, xcopy NWNX4 installation over&lt;br /&gt;
## Grant modify/execute/list/read/write to &amp;quot;NWN2 Admins&amp;quot;&lt;br /&gt;
## Grant modify/execute/list/read/write to &amp;quot;NWN2 Servers&amp;quot; for:&lt;br /&gt;
### AuroraServerNWScript.log&lt;br /&gt;
### AuroraServerVault.log&lt;br /&gt;
### nwnx.txt&lt;br /&gt;
### nwnx_controller.txt&lt;br /&gt;
### StandardQueryLog.txt&lt;br /&gt;
### xp_mysql.txt&lt;br /&gt;
### xp_bugfix.txt&lt;br /&gt;
### xp_objectattributes.txt&lt;br /&gt;
### xp_srvadmin.txt&lt;br /&gt;
### xp_system.txt&lt;br /&gt;
### xp_time.txt&lt;br /&gt;
# Create C:\Users\Public\Desktop\Credentials.txt&lt;br /&gt;
# Copy standard links to C:\Users\Public\Desktop&lt;br /&gt;
# Copy standard links to C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Tools&lt;br /&gt;
# Copy standard scripts to C:\Scripts&lt;br /&gt;
# Copy standard NWN2 tools to C:\Tools&lt;br /&gt;
# Copy NWNServerConsole to C:\NWN2\Console&lt;br /&gt;
# Fix PowerShell signing&lt;br /&gt;
## Set-ExecutionPolicy -Scope LocalMachine -ExecutionPolicy Unrestricted -Force&lt;br /&gt;
# Install [http://git-scm.com/ Git]&lt;br /&gt;
# Install [https://filezilla-project.org/ FileZilla]&lt;br /&gt;
# Install [http://msdn.microsoft.com/en-us/windows/apps/br229516 Win8 Performance Toolkit]&lt;br /&gt;
# Install [http://www.7-zip.org/ 7-zip]&lt;br /&gt;
# Install [http://gvim.en.softonic.com/ gvim]&lt;br /&gt;
# Install WinDbg for [http://www.microsoft.com/en-us/download/details.aspx?id=8279 Windows 7] or [http://msdn.microsoft.com/en-US/windows/desktop/bg162891 Windows 8.1].&lt;br /&gt;
# Set &amp;lt;code&amp;gt;_NT_SYMBOL_PATH&amp;lt;/code&amp;gt; to &amp;lt;code&amp;gt;SRV*C:\Symbols*http://msdl.microsoft.com/download/symbols&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== NWNX4 Installation ==&lt;br /&gt;
# nwnx4_controller.exe -installservice&lt;br /&gt;
# Configure NWNX4-1 service to run as the &amp;quot;NWN2Server&amp;quot; user&lt;br /&gt;
## If using a Microsoft account (user@email) for the server user, use Computername\Username where Username is the value that %USERNAME% shows from &amp;quot;echo %USERNAME%&amp;quot; in cmd.exe and Computername is the value that %COMPUTERNAME% shows from &amp;quot;echo %COMPUTERNAME%&amp;quot; in cmd.exe.  Also, in this case, you have to manually grant this user &amp;quot;Log on as a service&amp;quot; rights by going to Local Security Policy, Local Policies, User Rights Assignment, Log on as a service, and adding Computername\Username to the list.  This only applies to accounts set up as a Microsoft account initially, not to local accounts that a Microsoft account was connected to afterwards.&lt;br /&gt;
# Get SID for NWN2Server user with PowerShell:&lt;br /&gt;
::: &amp;lt;code&amp;gt;([wmi]&amp;quot;win32_Group.Domain='$env:ComputerName',Name='NWN2 Admins'&amp;quot;).sid&amp;lt;/code&amp;gt;&lt;br /&gt;
# Set SD on nwnx4-1 service to allow NWN2 Admins to start/stop:&lt;br /&gt;
::: &amp;lt;code&amp;gt;sc sdset nwnx4-1 D:(A;;CCLCSWRPWPDTLOCRRC;;;SY)(A;;CCDCLCSWRPWPDTLOCRSDRCWDWO;;;BA)(A;;CCLCSWLOCRRC;;;IU)(A;;CCLCSWLOCRRC;;;SU)(A;;RPWP;;;&amp;lt;NWN2 Admins SID from above command&amp;gt;)S:(AU;FA;CCDCLCSWRPWPDTLOCRSDRCWDWO;;;WD)&amp;lt;/code&amp;gt;&lt;br /&gt;
# Install SSH private key to C:\NWNX4\sshfs.ppk&lt;br /&gt;
# Add SSH public key to alfa@sql.alandfaraway.org:~/.ssh/authorized_keys&lt;br /&gt;
# Set configuration in C:\NWNX4\nwnx.ini&lt;br /&gt;
# Set configuration in C:\NWNX4\AuroraServerNWScript.ini&lt;br /&gt;
# Set configuration in C:\NWNX4\xp_mysql.ini&lt;br /&gt;
# Set configuration in C:\NWNX4\DatabaseConnector.ini&lt;br /&gt;
# Set configuration in C:\NWNX4\AuroraServerVault.ini&lt;br /&gt;
&lt;br /&gt;
== Module preparation ==&lt;br /&gt;
# If the module is being cloned directly from source control or copied from a very old backup, it may be necessary to recompile the module against a current alfa2_acr.hak to ensure that the database connection (and self-update) work at module startup.  If the module never loads acr_databaseconnector in AuroraServerNWScript.log and no &amp;quot;DatabaseConnector&amp;quot; log messages in nwserverLog1.txt are seen before the ACR_OnModuleLoad: log line then this may be the problem (but also check for errors in AuroraServerNWScript.log that might indicate a misconfigured NWScript Accelerator installation).&lt;br /&gt;
# Make sure that alfa2_acr.hak is recent.  An extremely old build predating the DatabaseConnector integration may not be able to self-update the rest of the ACR.&lt;br /&gt;
&lt;br /&gt;
== Troubleshooting ==&lt;br /&gt;
Fixes for some problems encountered during server deployment are listed here.&lt;br /&gt;
# Module didn't load or server doesn't start up?&lt;br /&gt;
## Look at the server log file and C:\NWNX4\AuroraServerNWScript.log for errors/exceptions for next troubleshooting steps.&lt;br /&gt;
# Database doesn't connect, or many exceptions in server log about the database, or PCs (but not DM's) are booted at log on?&lt;br /&gt;
## Make sure that plink.exe was run once as the user that the NWNX4-1 service runs as in order to accept the SSH key of the central server.&lt;br /&gt;
# Monitor Server Uptime script closes immediately?&lt;br /&gt;
## Make sure that the following command was run from an administrator privileged PowerShell session: Set-ExecutionPolicy -Scope LocalMachine -ExecutionPolicy Unrestricted -Force&lt;br /&gt;
# Game server starts with NWNX4_GUI.exe but not as a service?&lt;br /&gt;
## Make sure that the service is running as the right user.  Go to services.msc and configure it to run as the user whose %userprofile%\Documents\Neverwinter Nights 2 has the module, server vault, etc. present.&lt;br /&gt;
# Toolset doesn't start/work properly?&lt;br /&gt;
## Make sure that .NET Framework v3.5 (sometimes called .NET Framework v2.0) is installed, and then the DirectX End-User Runtime is installed.  If the DirectX End-User Runtime was installed first, it's installer has to be re-run after installing .NET Framework v3.5.&lt;br /&gt;
# Database or scripts don't work, or NWNX4 plugins didn't load?&lt;br /&gt;
## Make sure that all Visual C++ and .NET runtime dependencies were installed.&lt;br /&gt;
# Using a Microsoft account for the service account and the service fails to start with &amp;quot;The service dependency failed to start.&amp;quot;?&lt;br /&gt;
## Configure the service to log on using Computername\Username and ensure that from Local Security Policy, Local Policies, User Rights Assignment, that Computername\Username was granted &amp;quot;Log on as a service&amp;quot; rights.&lt;/div&gt;</summary>
		<author><name>Basilica</name></author>	</entry>

	<entry>
		<id>https://www.alandfaraway.info/Wiki/index.php?title=Virtual_Machine_Setup&amp;diff=2886</id>
		<title>Virtual Machine Setup</title>
		<link rel="alternate" type="text/html" href="https://www.alandfaraway.info/Wiki/index.php?title=Virtual_Machine_Setup&amp;diff=2886"/>
				<updated>2015-10-06T05:07:00Z</updated>
		
		<summary type="html">&lt;p&gt;Basilica: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Technical Manuals]]&lt;br /&gt;
This document describes in rough detail the recommended checklist for setting up a new game server host VM in the standard configuration.  This configuration is suitable for running nwn2server.exe as a limited user account.&lt;br /&gt;
&lt;br /&gt;
== Prerequisites ==&lt;br /&gt;
.NET 3.5 and the DirectX End-User Runtime are optional unless the toolset will be run locally on the game server host machine.&lt;br /&gt;
&lt;br /&gt;
* If running the toolset on the host is desired (optional), enable .NET 3.5 in Add/Remove Windows Features before installing DirectX&lt;br /&gt;
* [http://www.microsoft.com/en-us/download/details.aspx?id=35 DirectX End-User Runtime]  (required only if the toolset will be used to stage content on the game server)&lt;br /&gt;
* [http://www.microsoft.com/en-us/download/details.aspx?id=17851 Microsoft .NET Framework 4]&lt;br /&gt;
* [http://www.microsoft.com/en-us/download/details.aspx?id=26347 Microsoft Visual C++ 2005 Service Pack 1 Redistributable Package MFC Security Update]&lt;br /&gt;
* [http://www.microsoft.com/en-us/download/details.aspx?id=26999 Microsoft Visual C++ 2010 Service Pack 1 Redistributable Package MFC Security Update]&lt;br /&gt;
&lt;br /&gt;
== Process ==&lt;br /&gt;
# Install Windows Server&lt;br /&gt;
# Copy standard tools over&lt;br /&gt;
# Create SG &amp;quot;NWN2 Servers&amp;quot;&lt;br /&gt;
# Create SG &amp;quot;NWN2 Admins&amp;quot;&lt;br /&gt;
# Create user &amp;quot;NWN2Server&amp;quot;&lt;br /&gt;
## Add to &amp;quot;NWN2 Servers&amp;quot; SG&lt;br /&gt;
# Create C:\NWN2, xcopy NWN2 install over&lt;br /&gt;
## Grant &amp;quot;NWN2 Servers&amp;quot; create files, create folders to &amp;quot;This folder only&amp;quot;&lt;br /&gt;
## Grant &amp;quot;NWN2 Admins&amp;quot; modify to folder, subfolders, and files&lt;br /&gt;
## Import NWN2.reg&lt;br /&gt;
# Create C:\NWN2User&lt;br /&gt;
## Grant full control to &amp;quot;NWN2 Servers&amp;quot;&lt;br /&gt;
## Grant modify/execute/list/read/write to &amp;quot;NWN2 Admins&amp;quot;&lt;br /&gt;
# Runas /profile /user:NWN2Server cmd.exe&lt;br /&gt;
## cd /d &amp;quot;%userprofile%\Documents&amp;quot;&lt;br /&gt;
## mklink /j &amp;quot;Neverwinter Nights 2&amp;quot; C:\NWN2User&lt;br /&gt;
## putty -ssh alfa@sql.alandfaraway.org&lt;br /&gt;
### Confirm and accept central server public key for vault tunnel to work&lt;br /&gt;
# Create C:\NWNX4, xcopy NWNX4 installation over&lt;br /&gt;
## Grant modify/execute/list/read/write to &amp;quot;NWN2 Admins&amp;quot;&lt;br /&gt;
## Grant modify/execute/list/read/write to &amp;quot;NWN2 Servers&amp;quot; for:&lt;br /&gt;
### AuroraServerNWScript.log&lt;br /&gt;
### AuroraServerVault.log&lt;br /&gt;
### nwnx.txt&lt;br /&gt;
### nwnx_controller.txt&lt;br /&gt;
### StandardQueryLog.txt&lt;br /&gt;
### xp_mysql.txt&lt;br /&gt;
### xp_bugfix.txt&lt;br /&gt;
### xp_objectattributes.txt&lt;br /&gt;
### xp_srvadmin.txt&lt;br /&gt;
### xp_system.txt&lt;br /&gt;
### xp_time.txt&lt;br /&gt;
# Create C:\Users\Public\Desktop\Credentials.txt&lt;br /&gt;
# Copy standard links to C:\Users\Public\Desktop&lt;br /&gt;
# Copy standard links to C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Tools&lt;br /&gt;
# Copy standard scripts to C:\Scripts&lt;br /&gt;
# Copy standard NWN2 tools to C:\Tools&lt;br /&gt;
# Copy NWNServerConsole to C:\NWN2\Console&lt;br /&gt;
# Fix PowerShell signing&lt;br /&gt;
## Set-ExecutionPolicy -Scope LocalMachine -ExecutionPolicy Unrestricted -Force&lt;br /&gt;
# Install [http://git-scm.com/ Git]&lt;br /&gt;
# Install [https://filezilla-project.org/ FileZilla]&lt;br /&gt;
# Install [http://msdn.microsoft.com/en-us/windows/apps/br229516 Win8 Performance Toolkit]&lt;br /&gt;
# Install [http://www.7-zip.org/ 7-zip]&lt;br /&gt;
# Install [http://gvim.en.softonic.com/ gvim]&lt;br /&gt;
# Install WinDbg for [http://www.microsoft.com/en-us/download/details.aspx?id=8279 Windows 7] or [http://msdn.microsoft.com/en-US/windows/desktop/bg162891 Windows 8.1].&lt;br /&gt;
# Set &amp;lt;code&amp;gt;_NT_SYMBOL_PATH&amp;lt;/code&amp;gt; to &amp;lt;code&amp;gt;SRV*C:\Symbols*http://msdl.microsoft.com/download/symbols&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== NWNX4 Installation ==&lt;br /&gt;
# nwnx4_controller.exe -installservice&lt;br /&gt;
# Configure NWNX4-1 service to run as the &amp;quot;NWN2Server&amp;quot; user&lt;br /&gt;
## If using a Microsoft account (user@email) for the server user, use Computername\Username where Username is the value that %USERNAME% shows from &amp;quot;echo %USERNAME%&amp;quot; in cmd.exe and Computername is the value that %COMPUTERNAME% shows from &amp;quot;echo %COMPUTERNAME%&amp;quot; in cmd.exe.  Also, in this case, you have to manually grant this user &amp;quot;Log on as a service&amp;quot; rights by going to Local Security Policy, Local Policies, User Rights Assignment, Log on as a service, and adding Computername\Username to the list.  This only applies to accounts set up as a Microsoft account initially, not to local accounts that a Microsoft account was connected to afterwards.&lt;br /&gt;
# Get SID for NWN2Server user with PowerShell:&lt;br /&gt;
::: &amp;lt;code&amp;gt;([wmi]&amp;quot;win32_Group.Domain='$env:ComputerName',Name='NWN2 Admins'&amp;quot;).sid&amp;lt;/code&amp;gt;&lt;br /&gt;
# Set SD on nwnx4-1 service to allow NWN2 Admins to start/stop:&lt;br /&gt;
::: &amp;lt;code&amp;gt;sc sdset nwnx4-1 D:(A;;CCLCSWRPWPDTLOCRRC;;;SY)(A;;CCDCLCSWRPWPDTLOCRSDRCWDWO;;;BA)(A;;CCLCSWLOCRRC;;;IU)(A;;CCLCSWLOCRRC;;;SU)(A;;RPWP;;;&amp;lt;NWN2 Admins SID from above command&amp;gt;)S:(AU;FA;CCDCLCSWRPWPDTLOCRSDRCWDWO;;;WD)&amp;lt;/code&amp;gt;&lt;br /&gt;
# Install SSH private key to C:\NWNX4\sshfs.ppk&lt;br /&gt;
# Add SSH public key to alfa@sql.alandfaraway.org:~/.ssh/authorized_keys&lt;br /&gt;
# Set configuration in C:\NWNX4\nwnx.ini&lt;br /&gt;
# Set configuration in C:\NWNX4\AuroraServerNWScript.ini&lt;br /&gt;
# Set configuration in C:\NWNX4\xp_mysql.ini&lt;br /&gt;
# Set configuration in C:\NWNX4\DatabaseConnector.ini&lt;br /&gt;
# Set configuration in C:\NWNX4\AuroraServerVault.ini&lt;br /&gt;
&lt;br /&gt;
== Module preparation ==&lt;br /&gt;
# If the module is being cloned directly from source control or copied from a very old backup, it may be necessary to recompile the module against a current alfa2_acr.hak to ensure that the database connection (and self-update) work at module startup.  If the module never loads acr_databaseconnector in AuroraServerNWScript.log and no &amp;quot;DatabaseConnector&amp;quot; log messages in nwserverLog1.txt are seen before the ACR_OnModuleLoad: log line then this may be the problem (but also check for errors in AuroraServerNWScript.log that might indicate a misconfigured NWScript Accelerator installation).&lt;br /&gt;
# Make sure that alfa2_acr.hak is recent.  An extremely old build predating the DatabaseConnector integration may not be able to self-update the rest of the ACR.&lt;/div&gt;</summary>
		<author><name>Basilica</name></author>	</entry>

	<entry>
		<id>https://www.alandfaraway.info/Wiki/index.php?title=Virtual_Machine_Setup&amp;diff=2885</id>
		<title>Virtual Machine Setup</title>
		<link rel="alternate" type="text/html" href="https://www.alandfaraway.info/Wiki/index.php?title=Virtual_Machine_Setup&amp;diff=2885"/>
				<updated>2015-10-06T04:07:06Z</updated>
		
		<summary type="html">&lt;p&gt;Basilica: Cleanup toolset documentation&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Technical Manuals]]&lt;br /&gt;
This document describes in rough detail the recommended checklist for setting up a new game server host VM in the standard configuration.  This configuration is suitable for running nwn2server.exe as a limited user account.&lt;br /&gt;
&lt;br /&gt;
== Prerequisites ==&lt;br /&gt;
.NET 3.5 and the DirectX End-User Runtime are optional unless the toolset will be run locally on the game server host machine.&lt;br /&gt;
&lt;br /&gt;
* If running the toolset on the host is desired (optional), enable .NET 3.5 in Add/Remove Windows Features before installing DirectX&lt;br /&gt;
* [http://www.microsoft.com/en-us/download/details.aspx?id=35 DirectX End-User Runtime]  (required only if the toolset will be used to stage content on the game server)&lt;br /&gt;
* [http://www.microsoft.com/en-us/download/details.aspx?id=17851 Microsoft .NET Framework 4]&lt;br /&gt;
* [http://www.microsoft.com/en-us/download/details.aspx?id=26347 Microsoft Visual C++ 2005 Service Pack 1 Redistributable Package MFC Security Update]&lt;br /&gt;
* [http://www.microsoft.com/en-us/download/details.aspx?id=26999 Microsoft Visual C++ 2010 Service Pack 1 Redistributable Package MFC Security Update]&lt;br /&gt;
&lt;br /&gt;
== Process ==&lt;br /&gt;
# Install Windows Server&lt;br /&gt;
# Copy standard tools over&lt;br /&gt;
# Create SG &amp;quot;NWN2 Servers&amp;quot;&lt;br /&gt;
# Create SG &amp;quot;NWN2 Admins&amp;quot;&lt;br /&gt;
# Create user &amp;quot;NWN2Server&amp;quot;&lt;br /&gt;
## Add to &amp;quot;NWN2 Servers&amp;quot; SG&lt;br /&gt;
# Create C:\NWN2, xcopy NWN2 install over&lt;br /&gt;
## Grant &amp;quot;NWN2 Servers&amp;quot; create files, create folders to &amp;quot;This folder only&amp;quot;&lt;br /&gt;
## Grant &amp;quot;NWN2 Admins&amp;quot; modify to folder, subfolders, and files&lt;br /&gt;
## Import NWN2.reg&lt;br /&gt;
# Create C:\NWN2User&lt;br /&gt;
## Grant full control to &amp;quot;NWN2 Servers&amp;quot;&lt;br /&gt;
## Grant modify/execute/list/read/write to &amp;quot;NWN2 Admins&amp;quot;&lt;br /&gt;
# Runas /profile /user:NWN2Server cmd.exe&lt;br /&gt;
## cd /d &amp;quot;%userprofile%\Documents&amp;quot;&lt;br /&gt;
## mklink /j &amp;quot;Neverwinter Nights 2&amp;quot; C:\NWN2User&lt;br /&gt;
## putty -ssh alfa@sql.alandfaraway.org&lt;br /&gt;
### Confirm and accept central server public key for vault tunnel to work&lt;br /&gt;
# Create C:\NWNX4, xcopy NWNX4 installation over&lt;br /&gt;
## Grant modify/execute/list/read/write to &amp;quot;NWN2 Admins&amp;quot;&lt;br /&gt;
## Grant modify/execute/list/read/write to &amp;quot;NWN2 Servers&amp;quot; for:&lt;br /&gt;
### AuroraServerNWScript.log&lt;br /&gt;
### AuroraServerVault.log&lt;br /&gt;
### nwnx.txt&lt;br /&gt;
### nwnx_controller.txt&lt;br /&gt;
### StandardQueryLog.txt&lt;br /&gt;
### xp_mysql.txt&lt;br /&gt;
### xp_bugfix.txt&lt;br /&gt;
### xp_objectattributes.txt&lt;br /&gt;
### xp_srvadmin.txt&lt;br /&gt;
### xp_system.txt&lt;br /&gt;
### xp_time.txt&lt;br /&gt;
# Create C:\Users\Public\Desktop\Credentials.txt&lt;br /&gt;
# Copy standard links to C:\Users\Public\Desktop&lt;br /&gt;
# Copy standard links to C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Tools&lt;br /&gt;
# Copy standard scripts to C:\Scripts&lt;br /&gt;
# Copy standard NWN2 tools to C:\Tools&lt;br /&gt;
# Copy NWNServerConsole to C:\NWN2\Console&lt;br /&gt;
# Fix PowerShell signing&lt;br /&gt;
## Set-ExecutionPolicy -Scope LocalMachine -ExecutionPolicy Unrestricted -Force&lt;br /&gt;
# Install [http://git-scm.com/ Git]&lt;br /&gt;
# Install [https://filezilla-project.org/ FileZilla]&lt;br /&gt;
# Install [http://msdn.microsoft.com/en-us/windows/apps/br229516 Win8 Performance Toolkit]&lt;br /&gt;
# Install [http://www.7-zip.org/ 7-zip]&lt;br /&gt;
# Install [http://gvim.en.softonic.com/ gvim]&lt;br /&gt;
# Install WinDbg for [http://www.microsoft.com/en-us/download/details.aspx?id=8279 Windows 7] or [http://msdn.microsoft.com/en-US/windows/desktop/bg162891 Windows 8.1].&lt;br /&gt;
# Set &amp;lt;code&amp;gt;_NT_SYMBOL_PATH&amp;lt;/code&amp;gt; to &amp;lt;code&amp;gt;SRV*C:\Symbols*http://msdl.microsoft.com/download/symbols&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== NWNX4 Installation ==&lt;br /&gt;
# nwnx4_controller.exe -installservice&lt;br /&gt;
# Configure NWNX4-1 service to run as the &amp;quot;NWN2Server&amp;quot; user&lt;br /&gt;
# Get SID for NWN2Server user with PowerShell:&lt;br /&gt;
::: &amp;lt;code&amp;gt;([wmi]&amp;quot;win32_Group.Domain='$env:ComputerName',Name='NWN2 Admins'&amp;quot;).sid&amp;lt;/code&amp;gt;&lt;br /&gt;
# Set SD on nwnx4-1 service to allow NWN2 Admins to start/stop:&lt;br /&gt;
::: &amp;lt;code&amp;gt;sc sdset nwnx4-1 D:(A;;CCLCSWRPWPDTLOCRRC;;;SY)(A;;CCDCLCSWRPWPDTLOCRSDRCWDWO;;;BA)(A;;CCLCSWLOCRRC;;;IU)(A;;CCLCSWLOCRRC;;;SU)(A;;RPWP;;;&amp;lt;NWN2 Admins SID from above command&amp;gt;)S:(AU;FA;CCDCLCSWRPWPDTLOCRSDRCWDWO;;;WD)&amp;lt;/code&amp;gt;&lt;br /&gt;
# Install SSH private key to C:\NWNX4\sshfs.ppk&lt;br /&gt;
# Add SSH public key to alfa@sql.alandfaraway.org:~/.ssh/authorized_keys&lt;br /&gt;
# Set configuration in C:\NWNX4\nwnx.ini&lt;br /&gt;
# Set configuration in C:\NWNX4\AuroraServerNWScript.ini&lt;br /&gt;
# Set configuration in C:\NWNX4\xp_mysql.ini&lt;br /&gt;
# Set configuration in C:\NWNX4\DatabaseConnector.ini&lt;br /&gt;
# Set configuration in C:\NWNX4\AuroraServerVault.ini&lt;br /&gt;
&lt;br /&gt;
== Module preparation ==&lt;br /&gt;
# If the module is being cloned directly from source control or copied from a very old backup, it may be necessary to recompile the module against a current alfa2_acr.hak to ensure that the database connection (and self-update) work at module startup.  If the module never loads acr_databaseconnector in AuroraServerNWScript.log and no &amp;quot;DatabaseConnector&amp;quot; log messages in nwserverLog1.txt are seen before the ACR_OnModuleLoad: log line then this may be the problem (but also check for errors in AuroraServerNWScript.log that might indicate a misconfigured NWScript Accelerator installation).&lt;br /&gt;
# Make sure that alfa2_acr.hak is recent.  An extremely old build predating the DatabaseConnector integration may not be able to self-update the rest of the ACR.&lt;/div&gt;</summary>
		<author><name>Basilica</name></author>	</entry>

	<entry>
		<id>https://www.alandfaraway.info/Wiki/index.php?title=Virtual_Machine_Setup&amp;diff=2884</id>
		<title>Virtual Machine Setup</title>
		<link rel="alternate" type="text/html" href="https://www.alandfaraway.info/Wiki/index.php?title=Virtual_Machine_Setup&amp;diff=2884"/>
				<updated>2015-10-06T04:04:20Z</updated>
		
		<summary type="html">&lt;p&gt;Basilica: Add notes about toolset configuration needed&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Technical Manuals]]&lt;br /&gt;
This document describes in rough detail the recommended checklist for setting up a new game server host VM in the standard configuration.  This configuration is suitable for running nwn2server.exe as a limited user account.&lt;br /&gt;
&lt;br /&gt;
== Prerequisites ==&lt;br /&gt;
* [http://www.microsoft.com/en-us/download/details.aspx?id=35 DirectX End-User Runtime]  (required only if the toolset will be used to stage content on the game server; the toolset (only) also requires .NET Framework 3.5 which must be enabled from Add/Remove Windows Features and should be done before installing the DirectX runtime, only if you want to run the toolset on the server)&lt;br /&gt;
* [http://www.microsoft.com/en-us/download/details.aspx?id=17851 Microsoft .NET Framework 4]&lt;br /&gt;
* [http://www.microsoft.com/en-us/download/details.aspx?id=26347 Microsoft Visual C++ 2005 Service Pack 1 Redistributable Package MFC Security Update]&lt;br /&gt;
* [http://www.microsoft.com/en-us/download/details.aspx?id=26999 Microsoft Visual C++ 2010 Service Pack 1 Redistributable Package MFC Security Update]&lt;br /&gt;
&lt;br /&gt;
== Process ==&lt;br /&gt;
# Install Windows Server&lt;br /&gt;
# Copy standard tools over&lt;br /&gt;
# Create SG &amp;quot;NWN2 Servers&amp;quot;&lt;br /&gt;
# Create SG &amp;quot;NWN2 Admins&amp;quot;&lt;br /&gt;
# Create user &amp;quot;NWN2Server&amp;quot;&lt;br /&gt;
## Add to &amp;quot;NWN2 Servers&amp;quot; SG&lt;br /&gt;
# Create C:\NWN2, xcopy NWN2 install over&lt;br /&gt;
## Grant &amp;quot;NWN2 Servers&amp;quot; create files, create folders to &amp;quot;This folder only&amp;quot;&lt;br /&gt;
## Grant &amp;quot;NWN2 Admins&amp;quot; modify to folder, subfolders, and files&lt;br /&gt;
## Import NWN2.reg&lt;br /&gt;
# Create C:\NWN2User&lt;br /&gt;
## Grant full control to &amp;quot;NWN2 Servers&amp;quot;&lt;br /&gt;
## Grant modify/execute/list/read/write to &amp;quot;NWN2 Admins&amp;quot;&lt;br /&gt;
# Runas /profile /user:NWN2Server cmd.exe&lt;br /&gt;
## cd /d &amp;quot;%userprofile%\Documents&amp;quot;&lt;br /&gt;
## mklink /j &amp;quot;Neverwinter Nights 2&amp;quot; C:\NWN2User&lt;br /&gt;
## putty -ssh alfa@sql.alandfaraway.org&lt;br /&gt;
### Confirm and accept central server public key for vault tunnel to work&lt;br /&gt;
# Create C:\NWNX4, xcopy NWNX4 installation over&lt;br /&gt;
## Grant modify/execute/list/read/write to &amp;quot;NWN2 Admins&amp;quot;&lt;br /&gt;
## Grant modify/execute/list/read/write to &amp;quot;NWN2 Servers&amp;quot; for:&lt;br /&gt;
### AuroraServerNWScript.log&lt;br /&gt;
### AuroraServerVault.log&lt;br /&gt;
### nwnx.txt&lt;br /&gt;
### nwnx_controller.txt&lt;br /&gt;
### StandardQueryLog.txt&lt;br /&gt;
### xp_mysql.txt&lt;br /&gt;
### xp_bugfix.txt&lt;br /&gt;
### xp_objectattributes.txt&lt;br /&gt;
### xp_srvadmin.txt&lt;br /&gt;
### xp_system.txt&lt;br /&gt;
### xp_time.txt&lt;br /&gt;
# Create C:\Users\Public\Desktop\Credentials.txt&lt;br /&gt;
# Copy standard links to C:\Users\Public\Desktop&lt;br /&gt;
# Copy standard links to C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Tools&lt;br /&gt;
# Copy standard scripts to C:\Scripts&lt;br /&gt;
# Copy standard NWN2 tools to C:\Tools&lt;br /&gt;
# Copy NWNServerConsole to C:\NWN2\Console&lt;br /&gt;
# Fix PowerShell signing&lt;br /&gt;
## Set-ExecutionPolicy -Scope LocalMachine -ExecutionPolicy Unrestricted -Force&lt;br /&gt;
# Install [http://git-scm.com/ Git]&lt;br /&gt;
# Install [https://filezilla-project.org/ FileZilla]&lt;br /&gt;
# Install [http://msdn.microsoft.com/en-us/windows/apps/br229516 Win8 Performance Toolkit]&lt;br /&gt;
# Install [http://www.7-zip.org/ 7-zip]&lt;br /&gt;
# Install [http://gvim.en.softonic.com/ gvim]&lt;br /&gt;
# Install WinDbg for [http://www.microsoft.com/en-us/download/details.aspx?id=8279 Windows 7] or [http://msdn.microsoft.com/en-US/windows/desktop/bg162891 Windows 8.1].&lt;br /&gt;
# Set &amp;lt;code&amp;gt;_NT_SYMBOL_PATH&amp;lt;/code&amp;gt; to &amp;lt;code&amp;gt;SRV*C:\Symbols*http://msdl.microsoft.com/download/symbols&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== NWNX4 Installation ==&lt;br /&gt;
# nwnx4_controller.exe -installservice&lt;br /&gt;
# Configure NWNX4-1 service to run as the &amp;quot;NWN2Server&amp;quot; user&lt;br /&gt;
# Get SID for NWN2Server user with PowerShell:&lt;br /&gt;
::: &amp;lt;code&amp;gt;([wmi]&amp;quot;win32_Group.Domain='$env:ComputerName',Name='NWN2 Admins'&amp;quot;).sid&amp;lt;/code&amp;gt;&lt;br /&gt;
# Set SD on nwnx4-1 service to allow NWN2 Admins to start/stop:&lt;br /&gt;
::: &amp;lt;code&amp;gt;sc sdset nwnx4-1 D:(A;;CCLCSWRPWPDTLOCRRC;;;SY)(A;;CCDCLCSWRPWPDTLOCRSDRCWDWO;;;BA)(A;;CCLCSWLOCRRC;;;IU)(A;;CCLCSWLOCRRC;;;SU)(A;;RPWP;;;&amp;lt;NWN2 Admins SID from above command&amp;gt;)S:(AU;FA;CCDCLCSWRPWPDTLOCRSDRCWDWO;;;WD)&amp;lt;/code&amp;gt;&lt;br /&gt;
# Install SSH private key to C:\NWNX4\sshfs.ppk&lt;br /&gt;
# Add SSH public key to alfa@sql.alandfaraway.org:~/.ssh/authorized_keys&lt;br /&gt;
# Set configuration in C:\NWNX4\nwnx.ini&lt;br /&gt;
# Set configuration in C:\NWNX4\AuroraServerNWScript.ini&lt;br /&gt;
# Set configuration in C:\NWNX4\xp_mysql.ini&lt;br /&gt;
# Set configuration in C:\NWNX4\DatabaseConnector.ini&lt;br /&gt;
# Set configuration in C:\NWNX4\AuroraServerVault.ini&lt;br /&gt;
&lt;br /&gt;
== Module preparation ==&lt;br /&gt;
# If the module is being cloned directly from source control or copied from a very old backup, it may be necessary to recompile the module against a current alfa2_acr.hak to ensure that the database connection (and self-update) work at module startup.  If the module never loads acr_databaseconnector in AuroraServerNWScript.log and no &amp;quot;DatabaseConnector&amp;quot; log messages in nwserverLog1.txt are seen before the ACR_OnModuleLoad: log line then this may be the problem (but also check for errors in AuroraServerNWScript.log that might indicate a misconfigured NWScript Accelerator installation).&lt;br /&gt;
# Make sure that alfa2_acr.hak is recent.  An extremely old build predating the DatabaseConnector integration may not be able to self-update the rest of the ACR.&lt;/div&gt;</summary>
		<author><name>Basilica</name></author>	</entry>

	<entry>
		<id>https://www.alandfaraway.info/Wiki/index.php?title=Virtual_Machine_Setup&amp;diff=2883</id>
		<title>Virtual Machine Setup</title>
		<link rel="alternate" type="text/html" href="https://www.alandfaraway.info/Wiki/index.php?title=Virtual_Machine_Setup&amp;diff=2883"/>
				<updated>2015-10-06T04:01:14Z</updated>
		
		<summary type="html">&lt;p&gt;Basilica: Remove duplication.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Technical Manuals]]&lt;br /&gt;
This document describes in rough detail the recommended checklist for setting up a new game server host VM in the standard configuration.  This configuration is suitable for running nwn2server.exe as a limited user account.&lt;br /&gt;
&lt;br /&gt;
== Prerequisites ==&lt;br /&gt;
* [http://www.microsoft.com/en-us/download/details.aspx?id=35 DirectX End-User Runtime]  (required only if the toolset will be used to stage content on the game server)&lt;br /&gt;
* [http://www.microsoft.com/en-us/download/details.aspx?id=17851 Microsoft .NET Framework 4]&lt;br /&gt;
* [http://www.microsoft.com/en-us/download/details.aspx?id=26347 Microsoft Visual C++ 2005 Service Pack 1 Redistributable Package MFC Security Update]&lt;br /&gt;
* [http://www.microsoft.com/en-us/download/details.aspx?id=26999 Microsoft Visual C++ 2010 Service Pack 1 Redistributable Package MFC Security Update]&lt;br /&gt;
&lt;br /&gt;
== Process ==&lt;br /&gt;
# Install Windows Server&lt;br /&gt;
# Copy standard tools over&lt;br /&gt;
# Create SG &amp;quot;NWN2 Servers&amp;quot;&lt;br /&gt;
# Create SG &amp;quot;NWN2 Admins&amp;quot;&lt;br /&gt;
# Create user &amp;quot;NWN2Server&amp;quot;&lt;br /&gt;
## Add to &amp;quot;NWN2 Servers&amp;quot; SG&lt;br /&gt;
# Create C:\NWN2, xcopy NWN2 install over&lt;br /&gt;
## Grant &amp;quot;NWN2 Servers&amp;quot; create files, create folders to &amp;quot;This folder only&amp;quot;&lt;br /&gt;
## Grant &amp;quot;NWN2 Admins&amp;quot; modify to folder, subfolders, and files&lt;br /&gt;
## Import NWN2.reg&lt;br /&gt;
# Create C:\NWN2User&lt;br /&gt;
## Grant full control to &amp;quot;NWN2 Servers&amp;quot;&lt;br /&gt;
## Grant modify/execute/list/read/write to &amp;quot;NWN2 Admins&amp;quot;&lt;br /&gt;
# Runas /profile /user:NWN2Server cmd.exe&lt;br /&gt;
## cd /d &amp;quot;%userprofile%\Documents&amp;quot;&lt;br /&gt;
## mklink /j &amp;quot;Neverwinter Nights 2&amp;quot; C:\NWN2User&lt;br /&gt;
## putty -ssh alfa@sql.alandfaraway.org&lt;br /&gt;
### Confirm and accept central server public key for vault tunnel to work&lt;br /&gt;
# Create C:\NWNX4, xcopy NWNX4 installation over&lt;br /&gt;
## Grant modify/execute/list/read/write to &amp;quot;NWN2 Admins&amp;quot;&lt;br /&gt;
## Grant modify/execute/list/read/write to &amp;quot;NWN2 Servers&amp;quot; for:&lt;br /&gt;
### AuroraServerNWScript.log&lt;br /&gt;
### AuroraServerVault.log&lt;br /&gt;
### nwnx.txt&lt;br /&gt;
### nwnx_controller.txt&lt;br /&gt;
### StandardQueryLog.txt&lt;br /&gt;
### xp_mysql.txt&lt;br /&gt;
### xp_bugfix.txt&lt;br /&gt;
### xp_objectattributes.txt&lt;br /&gt;
### xp_srvadmin.txt&lt;br /&gt;
### xp_system.txt&lt;br /&gt;
### xp_time.txt&lt;br /&gt;
# Create C:\Users\Public\Desktop\Credentials.txt&lt;br /&gt;
# Copy standard links to C:\Users\Public\Desktop&lt;br /&gt;
# Copy standard links to C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Tools&lt;br /&gt;
# Copy standard scripts to C:\Scripts&lt;br /&gt;
# Copy standard NWN2 tools to C:\Tools&lt;br /&gt;
# Copy NWNServerConsole to C:\NWN2\Console&lt;br /&gt;
# Fix PowerShell signing&lt;br /&gt;
## Set-ExecutionPolicy -Scope LocalMachine -ExecutionPolicy Unrestricted -Force&lt;br /&gt;
# Install [http://git-scm.com/ Git]&lt;br /&gt;
# Install [https://filezilla-project.org/ FileZilla]&lt;br /&gt;
# Install [http://msdn.microsoft.com/en-us/windows/apps/br229516 Win8 Performance Toolkit]&lt;br /&gt;
# Install [http://www.7-zip.org/ 7-zip]&lt;br /&gt;
# Install [http://gvim.en.softonic.com/ gvim]&lt;br /&gt;
# Install WinDbg for [http://www.microsoft.com/en-us/download/details.aspx?id=8279 Windows 7] or [http://msdn.microsoft.com/en-US/windows/desktop/bg162891 Windows 8.1].&lt;br /&gt;
# Set &amp;lt;code&amp;gt;_NT_SYMBOL_PATH&amp;lt;/code&amp;gt; to &amp;lt;code&amp;gt;SRV*C:\Symbols*http://msdl.microsoft.com/download/symbols&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== NWNX4 Installation ==&lt;br /&gt;
# nwnx4_controller.exe -installservice&lt;br /&gt;
# Configure NWNX4-1 service to run as the &amp;quot;NWN2Server&amp;quot; user&lt;br /&gt;
# Get SID for NWN2Server user with PowerShell:&lt;br /&gt;
::: &amp;lt;code&amp;gt;([wmi]&amp;quot;win32_Group.Domain='$env:ComputerName',Name='NWN2 Admins'&amp;quot;).sid&amp;lt;/code&amp;gt;&lt;br /&gt;
# Set SD on nwnx4-1 service to allow NWN2 Admins to start/stop:&lt;br /&gt;
::: &amp;lt;code&amp;gt;sc sdset nwnx4-1 D:(A;;CCLCSWRPWPDTLOCRRC;;;SY)(A;;CCDCLCSWRPWPDTLOCRSDRCWDWO;;;BA)(A;;CCLCSWLOCRRC;;;IU)(A;;CCLCSWLOCRRC;;;SU)(A;;RPWP;;;&amp;lt;NWN2 Admins SID from above command&amp;gt;)S:(AU;FA;CCDCLCSWRPWPDTLOCRSDRCWDWO;;;WD)&amp;lt;/code&amp;gt;&lt;br /&gt;
# Install SSH private key to C:\NWNX4\sshfs.ppk&lt;br /&gt;
# Add SSH public key to alfa@sql.alandfaraway.org:~/.ssh/authorized_keys&lt;br /&gt;
# Set configuration in C:\NWNX4\nwnx.ini&lt;br /&gt;
# Set configuration in C:\NWNX4\AuroraServerNWScript.ini&lt;br /&gt;
# Set configuration in C:\NWNX4\xp_mysql.ini&lt;br /&gt;
# Set configuration in C:\NWNX4\DatabaseConnector.ini&lt;br /&gt;
# Set configuration in C:\NWNX4\AuroraServerVault.ini&lt;br /&gt;
&lt;br /&gt;
== Module preparation ==&lt;br /&gt;
# If the module is being cloned directly from source control or copied from a very old backup, it may be necessary to recompile the module against a current alfa2_acr.hak to ensure that the database connection (and self-update) work at module startup.  If the module never loads acr_databaseconnector in AuroraServerNWScript.log and no &amp;quot;DatabaseConnector&amp;quot; log messages in nwserverLog1.txt are seen before the ACR_OnModuleLoad: log line then this may be the problem (but also check for errors in AuroraServerNWScript.log that might indicate a misconfigured NWScript Accelerator installation).&lt;br /&gt;
# Make sure that alfa2_acr.hak is recent.  An extremely old build predating the DatabaseConnector integration may not be able to self-update the rest of the ACR.&lt;/div&gt;</summary>
		<author><name>Basilica</name></author>	</entry>

	<entry>
		<id>https://www.alandfaraway.info/Wiki/index.php?title=Virtual_Machine_Setup&amp;diff=2882</id>
		<title>Virtual Machine Setup</title>
		<link rel="alternate" type="text/html" href="https://www.alandfaraway.info/Wiki/index.php?title=Virtual_Machine_Setup&amp;diff=2882"/>
				<updated>2015-10-06T04:00:07Z</updated>
		
		<summary type="html">&lt;p&gt;Basilica: Add some missing deployment steps about service configuration and script configuration&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Technical Manuals]]&lt;br /&gt;
This document describes in rough detail the recommended checklist for setting up a new game server host VM in the standard configuration.  This configuration is suitable for running nwn2server.exe as a limited user account.&lt;br /&gt;
&lt;br /&gt;
== Prerequisites ==&lt;br /&gt;
* [http://www.microsoft.com/en-us/download/details.aspx?id=35 DirectX End-User Runtime]  (required only if the toolset will be used to stage content on the game server)&lt;br /&gt;
* [http://www.microsoft.com/en-us/download/details.aspx?id=17851 Microsoft .NET Framework 4]&lt;br /&gt;
* [http://www.microsoft.com/en-us/download/details.aspx?id=26347 Microsoft Visual C++ 2005 Service Pack 1 Redistributable Package MFC Security Update]&lt;br /&gt;
* [http://www.microsoft.com/en-us/download/details.aspx?id=26999 Microsoft Visual C++ 2010 Service Pack 1 Redistributable Package MFC Security Update]&lt;br /&gt;
&lt;br /&gt;
== Process ==&lt;br /&gt;
# Install Windows Server&lt;br /&gt;
# Copy standard tools over (C:\Scripts, etc.).  Scripts must be in C:\Scripts for the server status script to work right.&lt;br /&gt;
# Create SG &amp;quot;NWN2 Servers&amp;quot;&lt;br /&gt;
# Create SG &amp;quot;NWN2 Admins&amp;quot;&lt;br /&gt;
# Create user &amp;quot;NWN2Server&amp;quot;&lt;br /&gt;
## Add to &amp;quot;NWN2 Servers&amp;quot; SG&lt;br /&gt;
# Create C:\NWN2, xcopy NWN2 install over&lt;br /&gt;
## Grant &amp;quot;NWN2 Servers&amp;quot; create files, create folders to &amp;quot;This folder only&amp;quot;&lt;br /&gt;
## Grant &amp;quot;NWN2 Admins&amp;quot; modify to folder, subfolders, and files&lt;br /&gt;
## Import NWN2.reg&lt;br /&gt;
# Create C:\NWN2User&lt;br /&gt;
## Grant full control to &amp;quot;NWN2 Servers&amp;quot;&lt;br /&gt;
## Grant modify/execute/list/read/write to &amp;quot;NWN2 Admins&amp;quot;&lt;br /&gt;
# Runas /profile /user:NWN2Server cmd.exe&lt;br /&gt;
## cd /d &amp;quot;%userprofile%\Documents&amp;quot;&lt;br /&gt;
## mklink /j &amp;quot;Neverwinter Nights 2&amp;quot; C:\NWN2User&lt;br /&gt;
## putty -ssh alfa@sql.alandfaraway.org&lt;br /&gt;
### Confirm and accept central server public key for vault tunnel to work&lt;br /&gt;
# Create C:\NWNX4, xcopy NWNX4 installation over&lt;br /&gt;
## Grant modify/execute/list/read/write to &amp;quot;NWN2 Admins&amp;quot;&lt;br /&gt;
## Grant modify/execute/list/read/write to &amp;quot;NWN2 Servers&amp;quot; for:&lt;br /&gt;
### AuroraServerNWScript.log&lt;br /&gt;
### AuroraServerVault.log&lt;br /&gt;
### nwnx.txt&lt;br /&gt;
### nwnx_controller.txt&lt;br /&gt;
### StandardQueryLog.txt&lt;br /&gt;
### xp_mysql.txt&lt;br /&gt;
### xp_bugfix.txt&lt;br /&gt;
### xp_objectattributes.txt&lt;br /&gt;
### xp_srvadmin.txt&lt;br /&gt;
### xp_system.txt&lt;br /&gt;
### xp_time.txt&lt;br /&gt;
# Create C:\Users\Public\Desktop\Credentials.txt&lt;br /&gt;
# Copy standard links to C:\Users\Public\Desktop&lt;br /&gt;
# Copy standard links to C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Tools&lt;br /&gt;
# Copy standard scripts to C:\Scripts&lt;br /&gt;
# Copy standard NWN2 tools to C:\Tools&lt;br /&gt;
# Copy NWNServerConsole to C:\NWN2\Console&lt;br /&gt;
# Fix PowerShell signing&lt;br /&gt;
## Set-ExecutionPolicy -Scope LocalMachine -ExecutionPolicy Unrestricted -Force&lt;br /&gt;
# Install [http://git-scm.com/ Git]&lt;br /&gt;
# Install [https://filezilla-project.org/ FileZilla]&lt;br /&gt;
# Install [http://msdn.microsoft.com/en-us/windows/apps/br229516 Win8 Performance Toolkit]&lt;br /&gt;
# Install [http://www.7-zip.org/ 7-zip]&lt;br /&gt;
# Install [http://gvim.en.softonic.com/ gvim]&lt;br /&gt;
# Install WinDbg for [http://www.microsoft.com/en-us/download/details.aspx?id=8279 Windows 7] or [http://msdn.microsoft.com/en-US/windows/desktop/bg162891 Windows 8.1].&lt;br /&gt;
# Set &amp;lt;code&amp;gt;_NT_SYMBOL_PATH&amp;lt;/code&amp;gt; to &amp;lt;code&amp;gt;SRV*C:\Symbols*http://msdl.microsoft.com/download/symbols&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== NWNX4 Installation ==&lt;br /&gt;
# nwnx4_controller.exe -installservice&lt;br /&gt;
# Configure NWNX4-1 service to run as the &amp;quot;NWN2Server&amp;quot; user&lt;br /&gt;
# Get SID for NWN2Server user with PowerShell:&lt;br /&gt;
::: &amp;lt;code&amp;gt;([wmi]&amp;quot;win32_Group.Domain='$env:ComputerName',Name='NWN2 Admins'&amp;quot;).sid&amp;lt;/code&amp;gt;&lt;br /&gt;
# Set SD on nwnx4-1 service to allow NWN2 Admins to start/stop:&lt;br /&gt;
::: &amp;lt;code&amp;gt;sc sdset nwnx4-1 D:(A;;CCLCSWRPWPDTLOCRRC;;;SY)(A;;CCDCLCSWRPWPDTLOCRSDRCWDWO;;;BA)(A;;CCLCSWLOCRRC;;;IU)(A;;CCLCSWLOCRRC;;;SU)(A;;RPWP;;;&amp;lt;NWN2 Admins SID from above command&amp;gt;)S:(AU;FA;CCDCLCSWRPWPDTLOCRSDRCWDWO;;;WD)&amp;lt;/code&amp;gt;&lt;br /&gt;
# Install SSH private key to C:\NWNX4\sshfs.ppk&lt;br /&gt;
# Add SSH public key to alfa@sql.alandfaraway.org:~/.ssh/authorized_keys&lt;br /&gt;
# Set configuration in C:\NWNX4\nwnx.ini&lt;br /&gt;
# Set configuration in C:\NWNX4\AuroraServerNWScript.ini&lt;br /&gt;
# Set configuration in C:\NWNX4\xp_mysql.ini&lt;br /&gt;
# Set configuration in C:\NWNX4\DatabaseConnector.ini&lt;br /&gt;
# Set configuration in C:\NWNX4\AuroraServerVault.ini&lt;br /&gt;
&lt;br /&gt;
== Module preparation ==&lt;br /&gt;
# If the module is being cloned directly from source control or copied from a very old backup, it may be necessary to recompile the module against a current alfa2_acr.hak to ensure that the database connection (and self-update) work at module startup.  If the module never loads acr_databaseconnector in AuroraServerNWScript.log and no &amp;quot;DatabaseConnector&amp;quot; log messages in nwserverLog1.txt are seen before the ACR_OnModuleLoad: log line then this may be the problem (but also check for errors in AuroraServerNWScript.log that might indicate a misconfigured NWScript Accelerator installation).&lt;br /&gt;
# Make sure that alfa2_acr.hak is recent.  An extremely old build predating the DatabaseConnector integration may not be able to self-update the rest of the ACR.&lt;/div&gt;</summary>
		<author><name>Basilica</name></author>	</entry>

	<entry>
		<id>https://www.alandfaraway.info/Wiki/index.php?title=Virtual_Machine_Setup&amp;diff=2876</id>
		<title>Virtual Machine Setup</title>
		<link rel="alternate" type="text/html" href="https://www.alandfaraway.info/Wiki/index.php?title=Virtual_Machine_Setup&amp;diff=2876"/>
				<updated>2015-06-27T23:32:15Z</updated>
		
		<summary type="html">&lt;p&gt;Basilica: Add note about recompiling module if the module is very old.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Technical Manuals]]&lt;br /&gt;
This document describes in rough detail the recommended checklist for setting up a new game server host VM in the standard configuration.  This configuration is suitable for running nwn2server.exe as a limited user account.&lt;br /&gt;
&lt;br /&gt;
== Prerequisites ==&lt;br /&gt;
* [http://www.microsoft.com/en-us/download/details.aspx?id=35 DirectX End-User Runtime]  (required only if the toolset will be used to stage content on the game server)&lt;br /&gt;
* [http://www.microsoft.com/en-us/download/details.aspx?id=17851 Microsoft .NET Framework 4]&lt;br /&gt;
* [http://www.microsoft.com/en-us/download/details.aspx?id=26347 Microsoft Visual C++ 2005 Service Pack 1 Redistributable Package MFC Security Update]&lt;br /&gt;
* [http://www.microsoft.com/en-us/download/details.aspx?id=26999 Microsoft Visual C++ 2010 Service Pack 1 Redistributable Package MFC Security Update]&lt;br /&gt;
&lt;br /&gt;
== Process ==&lt;br /&gt;
# Install Windows Server&lt;br /&gt;
# Copy standard tools over&lt;br /&gt;
# Create SG &amp;quot;NWN2 Servers&amp;quot;&lt;br /&gt;
# Create SG &amp;quot;NWN2 Admins&amp;quot;&lt;br /&gt;
# Create user &amp;quot;NWN2Server&amp;quot;&lt;br /&gt;
## Add to &amp;quot;NWN2 Servers&amp;quot; SG&lt;br /&gt;
# Create C:\NWN2, xcopy NWN2 install over&lt;br /&gt;
## Grant &amp;quot;NWN2 Servers&amp;quot; create files, create folders to &amp;quot;This folder only&amp;quot;&lt;br /&gt;
## Grant &amp;quot;NWN2 Admins&amp;quot; modify to folder, subfolders, and files&lt;br /&gt;
## Import NWN2.reg&lt;br /&gt;
# Create C:\NWN2User&lt;br /&gt;
## Grant full control to &amp;quot;NWN2 Servers&amp;quot;&lt;br /&gt;
## Grant modify/execute/list/read/write to &amp;quot;NWN2 Admins&amp;quot;&lt;br /&gt;
# Runas /profile /user:NWN2Server cmd.exe&lt;br /&gt;
## cd /d &amp;quot;%userprofile%\Documents&amp;quot;&lt;br /&gt;
## mklink /j &amp;quot;Neverwinter Nights 2&amp;quot; C:\NWN2User&lt;br /&gt;
## putty -ssh alfa@sql.alandfaraway.org&lt;br /&gt;
### Confirm and accept central server public key for vault tunnel to work&lt;br /&gt;
# Create C:\NWNX4, xcopy NWNX4 installation over&lt;br /&gt;
## Grant modify/execute/list/read/write to &amp;quot;NWN2 Admins&amp;quot;&lt;br /&gt;
## Grant modify/execute/list/read/write to &amp;quot;NWN2 Servers&amp;quot; for:&lt;br /&gt;
### AuroraServerNWScript.log&lt;br /&gt;
### AuroraServerVault.log&lt;br /&gt;
### nwnx.txt&lt;br /&gt;
### nwnx_controller.txt&lt;br /&gt;
### StandardQueryLog.txt&lt;br /&gt;
### xp_mysql.txt&lt;br /&gt;
### xp_bugfix.txt&lt;br /&gt;
### xp_objectattributes.txt&lt;br /&gt;
### xp_srvadmin.txt&lt;br /&gt;
### xp_system.txt&lt;br /&gt;
### xp_time.txt&lt;br /&gt;
# Create C:\Users\Public\Desktop\Credentials.txt&lt;br /&gt;
# Copy standard links to C:\Users\Public\Desktop&lt;br /&gt;
# Copy standard links to C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Tools&lt;br /&gt;
# Copy standard scripts to C:\Scripts&lt;br /&gt;
# Copy standard NWN2 tools to C:\Tools&lt;br /&gt;
# Copy NWNServerConsole to C:\NWN2\Console&lt;br /&gt;
# Fix PowerShell signing&lt;br /&gt;
## Set-ExecutionPolicy -Scope LocalMachine -ExecutionPolicy Unrestricted -Force&lt;br /&gt;
# Install [http://git-scm.com/ Git]&lt;br /&gt;
# Install [https://filezilla-project.org/ FileZilla]&lt;br /&gt;
# Install [http://msdn.microsoft.com/en-us/windows/apps/br229516 Win8 Performance Toolkit]&lt;br /&gt;
# Install [http://www.7-zip.org/ 7-zip]&lt;br /&gt;
# Install [http://gvim.en.softonic.com/ gvim]&lt;br /&gt;
# Install WinDbg for [http://www.microsoft.com/en-us/download/details.aspx?id=8279 Windows 7] or [http://msdn.microsoft.com/en-US/windows/desktop/bg162891 Windows 8.1].&lt;br /&gt;
# Set &amp;lt;code&amp;gt;_NT_SYMBOL_PATH&amp;lt;/code&amp;gt; to &amp;lt;code&amp;gt;SRV*C:\Symbols*http://msdl.microsoft.com/download/symbols&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== NWNX4 Installation ==&lt;br /&gt;
# nwnx4_controller.exe -installservice&lt;br /&gt;
# Get SID for NWN2Server user with PowerShell:&lt;br /&gt;
::: &amp;lt;code&amp;gt;([wmi]&amp;quot;win32_Group.Domain='$env:ComputerName',Name='NWN2 Admins'&amp;quot;).sid&amp;lt;/code&amp;gt;&lt;br /&gt;
# Set SD on nwnx4-1 service to allow NWN2 Admins to start/stop:&lt;br /&gt;
::: &amp;lt;code&amp;gt;sc sdset nwnx4-1 D:(A;;CCLCSWRPWPDTLOCRRC;;;SY)(A;;CCDCLCSWRPWPDTLOCRSDRCWDWO;;;BA)(A;;CCLCSWLOCRRC;;;IU)(A;;CCLCSWLOCRRC;;;SU)(A;;RPWP;;;&amp;lt;NWN2 Admins SID from above command&amp;gt;)S:(AU;FA;CCDCLCSWRPWPDTLOCRSDRCWDWO;;;WD)&amp;lt;/code&amp;gt;&lt;br /&gt;
# Install SSH private key to C:\NWNX4\sshfs.ppk&lt;br /&gt;
# Add SSH public key to alfa@sql.alandfaraway.org:~/.ssh/authorized_keys&lt;br /&gt;
# Set configuration in C:\NWNX4\nwnx.ini&lt;br /&gt;
# Set configuration in C:\NWNX4\AuroraServerNWScript.ini&lt;br /&gt;
# Set configuration in C:\NWNX4\xp_mysql.ini&lt;br /&gt;
# Set configuration in C:\NWNX4\DatabaseConnector.ini&lt;br /&gt;
# Set configuration in C:\NWNX4\AuroraServerVault.ini&lt;br /&gt;
&lt;br /&gt;
== Module preparation ==&lt;br /&gt;
# If the module is being cloned directly from source control or copied from a very old backup, it may be necessary to recompile the module against a current alfa2_acr.hak to ensure that the database connection (and self-update) work at module startup.  If the module never loads acr_databaseconnector in AuroraServerNWScript.log and no &amp;quot;DatabaseConnector&amp;quot; log messages in nwserverLog1.txt are seen before the ACR_OnModuleLoad: log line then this may be the problem (but also check for errors in AuroraServerNWScript.log that might indicate a misconfigured NWScript Accelerator installation).&lt;br /&gt;
# Make sure that alfa2_acr.hak is recent.  An extremely old build predating the DatabaseConnector integration may not be able to self-update the rest of the ACR.&lt;/div&gt;</summary>
		<author><name>Basilica</name></author>	</entry>

	<entry>
		<id>https://www.alandfaraway.info/Wiki/index.php?title=Updating_Azure_Client_Libraries&amp;diff=2848</id>
		<title>Updating Azure Client Libraries</title>
		<link rel="alternate" type="text/html" href="https://www.alandfaraway.info/Wiki/index.php?title=Updating_Azure_Client_Libraries&amp;diff=2848"/>
				<updated>2015-04-19T20:13:01Z</updated>
		
		<summary type="html">&lt;p&gt;Basilica: Overview of how to update Azure Storage client libraries to latest version.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Technical Manuals]]&lt;br /&gt;
From time to time, it may be desirable to update to the latest version of the Azure client libraries.  Old libraries are typically supported for many years, but eventually the current libraries must be incorporated.  In addition, new libraries may contain important bugfixes.&lt;br /&gt;
&lt;br /&gt;
New libraries are available with NuGet.  Standard NuGet update mechanisms are supported using alfa2_acr.hak\ALFA.Shared\packages.config.  This guide assumes the use of Visual Studio to update NuGet packages.&lt;br /&gt;
&lt;br /&gt;
== NuGet Packages Used ==&lt;br /&gt;
Currently, the following packages are referenced from NuGet:&lt;br /&gt;
* Microsoft.Data.Edm.5.6.4&lt;br /&gt;
* Microsoft.Data.OData.5.6.4&lt;br /&gt;
* Microsoft.Data.Services.Client.5.6.4&lt;br /&gt;
* Microsoft.WindowsAzure.ConfigurationManager.3.1.0&lt;br /&gt;
* Newtonsoft.Json.6.0.8&lt;br /&gt;
* System.Spatial.5.6.4&lt;br /&gt;
* WindowsAzure.Storage.4.3.0&lt;br /&gt;
&lt;br /&gt;
We directly use [https://www.nuget.org/packages/WindowsAzure.Storage WindowsAzure.Storage], the other packages are dependencies of the Azure Storage client library and have to be included so that the Azure Storage client library works.  ACR_AssemblyLoader is responsible for pre-loading all dependencies, so if a brand new dependency were to be added, it would have to both be added as a reference to ALFA.Shared and added to the resources in ACR_AssemblyLoader, with AssemblyLoader.cs changed to preload the new assembly.&lt;br /&gt;
&lt;br /&gt;
== Package Update Procedure ==&lt;br /&gt;
To update to a new Azure client library set:&lt;br /&gt;
# Open ACR_ManagedScripts.sln in Visual Studio&lt;br /&gt;
# Go to the Tools menu, NuGet Package Manager, Manage NuGet Packages for Solution...&lt;br /&gt;
# Click on Updates on the left-hand tree.&lt;br /&gt;
# Click on All under Updates.  Updates will be checked to see if any are available.&lt;br /&gt;
# Click Update All to retrieve new packages.  This removes the old packages from CLRScript\packages and installs new packages to that location.&lt;br /&gt;
# Open ACR_AssemblyLoader\Properties\Resources.resx and update the relative paths for each package under CLRScript\packages, to point to the new paths.  Usually this is just a matter of changing the version number to match.  You want the net40 packages for .NET 4.0 which we use (technically we could upgrade to 4.5 or 4.6 as these are compatible and all servers are on Windows 7 or higher but we have not done so yet).&lt;br /&gt;
# Update the dependency references in ALFA.Shared to point to the new file locations.  It's usually easiest to remove the references to each of the packages above, then re-add them (right-click References, Add Reference..., Browse, Browse... button, navigate to each of the directories in packages and add the appropriate package (typically net40) .dll.&lt;br /&gt;
# Clean up extraneous app.config files by removing them from projects.  Sometimes, the NuGet update might create extraneous app.config files.  These are used to map old versions of referenced dependency assemblies to new versions (for example, Microsoft.Data.Edm.5.6.0 to Microsoft.Data.Edm.5.6.3).  These aren't needed except for CLR script projects.  ALFA.Shared.dll and VaultTransferTool should keep these, however.&lt;br /&gt;
# Test to make sure that everything works, vault and updater operations.&lt;br /&gt;
# Remove old directories from packages from git (in CLRScript\packages, git rm -r &amp;lt;packagedir&amp;gt;, for each superseded package).&lt;br /&gt;
# Add new directories from packages to git (in CLRScript\packages, git add &amp;lt;packagedir&amp;gt;, for each superseded package).&lt;br /&gt;
# Add &amp;amp; commit changes to git.  Make sure to check that there aren't unexpected, untracked changes.&lt;/div&gt;</summary>
		<author><name>Basilica</name></author>	</entry>

	<entry>
		<id>https://www.alandfaraway.info/Wiki/index.php?title=Technical_Manual&amp;diff=2847</id>
		<title>Technical Manual</title>
		<link rel="alternate" type="text/html" href="https://www.alandfaraway.info/Wiki/index.php?title=Technical_Manual&amp;diff=2847"/>
				<updated>2015-04-19T17:28:38Z</updated>
		
		<summary type="html">&lt;p&gt;Basilica: Add link to Updating Azure Client Libraries page&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Manuals]]&lt;br /&gt;
This section is intended to help those interested in building, or just wanting to know how things like the core scripts work. Most of this information is NWN2-specific, though we will have some NWN1 technical documents listed here as well in the days to come. In the meantime, much of this information is outdated or at least in need of organization and qualification.&lt;br /&gt;
&lt;br /&gt;
== For Everyone ==&lt;br /&gt;
* [[Reporting Bugs]]&lt;br /&gt;
* [[Crafting Guide]]&lt;br /&gt;
* [[Introduction to Git]] (How to use [https://github.com/ GitHub])&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Hosts and HDMs ==&lt;br /&gt;
* [[Virtual Machine Setup]]&lt;br /&gt;
* [[Basic Host Requirements]] - NWNx4 and nwn2server, basic requirements to host a module.&lt;br /&gt;
* [[Setting Up MySQL Workbench]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Builders ==&lt;br /&gt;
* [[ALFA Build Module]]&lt;br /&gt;
* Guide to [[Writing ACR Quests]], as well as an [[Quest Creation Example]].&lt;br /&gt;
* [[ALFA Base Resources]] (ABR) Basics&lt;br /&gt;
* [[Toolset Guide]]&lt;br /&gt;
* [[Using Local Variables]]&lt;br /&gt;
* [[Building Areas]]&lt;br /&gt;
** [[Creating Terrain with L3DT and YATT]]&lt;br /&gt;
* [[Building Doors]]&lt;br /&gt;
* [[Building Items]]&lt;br /&gt;
* [[Building Placeables]]&lt;br /&gt;
* [[Building Creatures]]&lt;br /&gt;
* [[Building Triggers]]&lt;br /&gt;
* [[Building Portals]]&lt;br /&gt;
* [[Writing Conversations &amp;amp; Quests]]&lt;br /&gt;
* [[ACR Spawn]] System: The complete manual&lt;br /&gt;
* [[ACR Encounter]] System&lt;br /&gt;
* [[ACR Rest]]ing &amp;amp; Healing Bonuses&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Scripters ==&lt;br /&gt;
* [[ALFA Core Rules]] (ACR) Basics&lt;br /&gt;
* [[Data Persistence]]&lt;br /&gt;
* [[Rewarding Experience]]&lt;br /&gt;
* [[Spell Scripting]]&lt;br /&gt;
* [[Scripting Items]]&lt;br /&gt;
* [[Scripting Feats]]&lt;br /&gt;
* [[Script Library]] (General)&lt;br /&gt;
* [[Developing for ALFA]]&lt;br /&gt;
* [[Creating CLR Programs]]&lt;br /&gt;
* [[Creating Instanced Areas]]&lt;br /&gt;
* [[Running Scripts Remotely]]&lt;br /&gt;
&lt;br /&gt;
Reference Documents:&lt;br /&gt;
* [[GetEffectInteger]] return values&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Technical Documentation ==&lt;br /&gt;
* [[Core Content Release Process]]&lt;br /&gt;
* [[ACR and Core Content Addition Policies]]&lt;br /&gt;
* [[TLK]] Information&lt;br /&gt;
* [[2DA]] Information&lt;br /&gt;
* [[GUI]] Information&lt;br /&gt;
* [[ACR Configuration Settings]]&lt;br /&gt;
* [[Creating a Content Patch]]&lt;br /&gt;
* [[Updating Azure Client Libraries]]&lt;br /&gt;
* [[Release Notes]]&lt;br /&gt;
* [[Server Vault]]&lt;/div&gt;</summary>
		<author><name>Basilica</name></author>	</entry>

	<entry>
		<id>https://www.alandfaraway.info/Wiki/index.php?title=Virtual_Machine_Setup&amp;diff=2681</id>
		<title>Virtual Machine Setup</title>
		<link rel="alternate" type="text/html" href="https://www.alandfaraway.info/Wiki/index.php?title=Virtual_Machine_Setup&amp;diff=2681"/>
				<updated>2014-08-30T17:05:24Z</updated>
		
		<summary type="html">&lt;p&gt;Basilica: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Technical Manuals]]&lt;br /&gt;
This document describes in rough detail the recommended checklist for setting up a new game server host VM in the standard configuration.  This configuration is suitable for running nwn2server.exe as a limited user account.&lt;br /&gt;
&lt;br /&gt;
== Prerequisites ==&lt;br /&gt;
* [http://www.microsoft.com/en-us/download/details.aspx?id=35 DirectX End-User Runtime]  (required only if the toolset will be used to stage content on the game server)&lt;br /&gt;
* [http://www.microsoft.com/en-us/download/details.aspx?id=17851 Microsoft .NET Framework 4]&lt;br /&gt;
* [http://www.microsoft.com/en-us/download/details.aspx?id=26347 Microsoft Visual C++ 2005 Service Pack 1 Redistributable Package MFC Security Update]&lt;br /&gt;
* [http://www.microsoft.com/en-us/download/details.aspx?id=26999 Microsoft Visual C++ 2010 Service Pack 1 Redistributable Package MFC Security Update]&lt;br /&gt;
&lt;br /&gt;
== Process ==&lt;br /&gt;
# Install Windows Server&lt;br /&gt;
# Copy standard tools over&lt;br /&gt;
# Create SG &amp;quot;NWN2 Servers&amp;quot;&lt;br /&gt;
# Create SG &amp;quot;NWN2 Admins&amp;quot;&lt;br /&gt;
# Create user &amp;quot;NWN2Server&amp;quot;&lt;br /&gt;
## Add to &amp;quot;NWN2 Servers&amp;quot; SG&lt;br /&gt;
# Create C:\NWN2, xcopy NWN2 install over&lt;br /&gt;
## Grant &amp;quot;NWN2 Servers&amp;quot; create files, create folders to &amp;quot;This folder only&amp;quot;&lt;br /&gt;
## Grant &amp;quot;NWN2 Admins&amp;quot; modify to folder, subfolders, and files&lt;br /&gt;
## Import NWN2.reg&lt;br /&gt;
# Create C:\NWN2User&lt;br /&gt;
## Grant full control to &amp;quot;NWN2 Servers&amp;quot;&lt;br /&gt;
## Grant modify/execute/list/read/write to &amp;quot;NWN2 Admins&amp;quot;&lt;br /&gt;
# Runas /profile /user:NWN2Server cmd.exe&lt;br /&gt;
## cd /d &amp;quot;%userprofile%\Documents&amp;quot;&lt;br /&gt;
## mklink /j &amp;quot;Neverwinter Nights 2&amp;quot; C:\NWN2User&lt;br /&gt;
## putty -ssh alfa@sql.alandfaraway.org&lt;br /&gt;
### Confirm and accept central server public key for vault tunnel to work&lt;br /&gt;
# Create C:\NWNX4, xcopy NWNX4 installation over&lt;br /&gt;
## Grant modify/execute/list/read/write to &amp;quot;NWN2 Admins&amp;quot;&lt;br /&gt;
## Grant modify/execute/list/read/write to &amp;quot;NWN2 Servers&amp;quot; for:&lt;br /&gt;
### AuroraServerNWScript.log&lt;br /&gt;
### AuroraServerVault.log&lt;br /&gt;
### nwnx.txt&lt;br /&gt;
### nwnx_controller.txt&lt;br /&gt;
### StandardQueryLog.txt&lt;br /&gt;
### xp_mysql.txt&lt;br /&gt;
### xp_bugfix.txt&lt;br /&gt;
### xp_objectattributes.txt&lt;br /&gt;
### xp_srvadmin.txt&lt;br /&gt;
### xp_system.txt&lt;br /&gt;
### xp_time.txt&lt;br /&gt;
# Create C:\Users\Public\Desktop\Credentials.txt&lt;br /&gt;
# Copy standard links to C:\Users\Public\Desktop&lt;br /&gt;
# Copy standard links to C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Tools&lt;br /&gt;
# Copy standard scripts to C:\Scripts&lt;br /&gt;
# Copy standard NWN2 tools to C:\Tools&lt;br /&gt;
# Copy NWNServerConsole to C:\NWN2\Console&lt;br /&gt;
# Fix PowerShell signing&lt;br /&gt;
## Set-ExecutionPolicy -Scope LocalMachine -ExecutionPolicy Unrestricted -Force&lt;br /&gt;
# Install [http://git-scm.com/ Git]&lt;br /&gt;
# Install [https://filezilla-project.org/ FileZilla]&lt;br /&gt;
# Install [http://msdn.microsoft.com/en-us/windows/apps/br229516 Win8 Performance Toolkit]&lt;br /&gt;
# Install [http://www.7-zip.org/ 7-zip]&lt;br /&gt;
# Install [http://gvim.en.softonic.com/ gvim]&lt;br /&gt;
# Install WinDbg for [http://www.microsoft.com/en-us/download/details.aspx?id=8279 Windows 7] or [http://msdn.microsoft.com/en-US/windows/desktop/bg162891 Windows 8.1].&lt;br /&gt;
# Set &amp;lt;code&amp;gt;_NT_SYMBOL_PATH&amp;lt;/code&amp;gt; to &amp;lt;code&amp;gt;SRV*C:\Symbols*http://msdl.microsoft.com/download/symbols&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== NWNX4 Installation ==&lt;br /&gt;
# nwnx4_controller.exe -installservice&lt;br /&gt;
# Get SID for NWN2Server user with PowerShell:&lt;br /&gt;
::: &amp;lt;code&amp;gt;([wmi]&amp;quot;win32_Group.Domain='$env:ComputerName',Name='NWN2 Admins'&amp;quot;).sid&amp;lt;/code&amp;gt;&lt;br /&gt;
# Set SD on nwnx4-1 service to allow NWN2 Admins to start/stop:&lt;br /&gt;
::: &amp;lt;code&amp;gt;sc sdset nwnx4-1 D:(A;;CCLCSWRPWPDTLOCRRC;;;SY)(A;;CCDCLCSWRPWPDTLOCRSDRCWDWO;;;BA)(A;;CCLCSWLOCRRC;;;IU)(A;;CCLCSWLOCRRC;;;SU)(A;;RPWP;;;&amp;lt;NWN2 Admins SID from above command&amp;gt;)S:(AU;FA;CCDCLCSWRPWPDTLOCRSDRCWDWO;;;WD)&amp;lt;/code&amp;gt;&lt;br /&gt;
# Install SSH private key to C:\NWNX4\sshfs.ppk&lt;br /&gt;
# Add SSH public key to alfa@sql.alandfaraway.org:~/.ssh/authorized_keys&lt;br /&gt;
# Set configuration in C:\NWNX4\nwnx.ini&lt;br /&gt;
# Set configuration in C:\NWNX4\AuroraServerNWScript.ini&lt;br /&gt;
# Set configuration in C:\NWNX4\xp_mysql.ini&lt;br /&gt;
# Set configuration in C:\NWNX4\DatabaseConnector.ini&lt;br /&gt;
# Set configuration in C:\NWNX4\AuroraServerVault.ini&lt;/div&gt;</summary>
		<author><name>Basilica</name></author>	</entry>

	<entry>
		<id>https://www.alandfaraway.info/Wiki/index.php?title=Virtual_Machine_Setup&amp;diff=2680</id>
		<title>Virtual Machine Setup</title>
		<link rel="alternate" type="text/html" href="https://www.alandfaraway.info/Wiki/index.php?title=Virtual_Machine_Setup&amp;diff=2680"/>
				<updated>2014-08-30T17:02:25Z</updated>
		
		<summary type="html">&lt;p&gt;Basilica: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Technical Manuals]]&lt;br /&gt;
This document describes in rough detail the recommended checklist for setting up a new game server host VM in the standard configuration.  This configuration is suitable for running nwn2server.exe as a limited user account.&lt;br /&gt;
&lt;br /&gt;
== Prerequisites ==&lt;br /&gt;
* [http://www.microsoft.com/en-us/download/details.aspx?id=35 DirectX End-User Runtime]  (required only if the toolset will be used to stage content on the game server)&lt;br /&gt;
* [http://www.microsoft.com/en-us/download/details.aspx?id=17851 Microsoft .NET Framework 4]&lt;br /&gt;
* [http://www.microsoft.com/en-us/download/details.aspx?id=26347 Microsoft Visual C++ 2005 Service Pack 1 Redistributable Package MFC Security Update]&lt;br /&gt;
* [http://www.microsoft.com/en-us/download/details.aspx?id=26999 Microsoft Visual C++ 2010 Service Pack 1 Redistributable Package MFC Security Update]&lt;br /&gt;
&lt;br /&gt;
== Process ==&lt;br /&gt;
# Install Windows Server&lt;br /&gt;
# Copy standard tools over&lt;br /&gt;
# Create SG &amp;quot;NWN2 Servers&amp;quot;&lt;br /&gt;
# Create SG &amp;quot;NWN2 Admins&amp;quot;&lt;br /&gt;
# Create user &amp;quot;NWN2Server&amp;quot;&lt;br /&gt;
## Add to &amp;quot;NWN2 Servers&amp;quot; SG&lt;br /&gt;
# Create C:\NWN2, xcopy NWN2 install over&lt;br /&gt;
## Grant &amp;quot;NWN2 Servers&amp;quot; create files, create folders to &amp;quot;This folder only&amp;quot;&lt;br /&gt;
## Grant &amp;quot;NWN2 Admins&amp;quot; modify to folder, subfolders, and files&lt;br /&gt;
## Import NWN2.reg&lt;br /&gt;
# Create C:\NWN2User&lt;br /&gt;
## Grant full control to &amp;quot;NWN2 Servers&amp;quot;&lt;br /&gt;
## Grant modify/execute/list/read/write to &amp;quot;NWN2 Admins&amp;quot;&lt;br /&gt;
# Runas /profile /user:NWN2Server cmd.exe&lt;br /&gt;
## cd /d &amp;quot;%userprofile%\Documents&amp;quot;&lt;br /&gt;
## mklink /j &amp;quot;Neverwinter Nights 2&amp;quot; C:\NWN2User&lt;br /&gt;
## putty -ssh alfa@sql.alandfaraway.org&lt;br /&gt;
### Confirm and accept central server public key for vault tunnel to work&lt;br /&gt;
# Create C:\NWNX4, xcopy NWNX4 installation over&lt;br /&gt;
## Grant modify/execute/list/read/write to &amp;quot;NWN2 Admins&amp;quot;&lt;br /&gt;
## Grant modify/execute/list/read/write to &amp;quot;NWN2 Servers&amp;quot; for:&lt;br /&gt;
### AuroraServerNWScript.log&lt;br /&gt;
### AuroraServerVault.log&lt;br /&gt;
### nwnx.txt&lt;br /&gt;
### nwnx_controller.txt&lt;br /&gt;
### StandardQueryLog.txt&lt;br /&gt;
### xp_mysql.txt&lt;br /&gt;
### xp_bugfix.txt&lt;br /&gt;
### xp_objectattributes.txt&lt;br /&gt;
### xp_srvadmin.txt&lt;br /&gt;
### xp_system.txt&lt;br /&gt;
### xp_time.txt&lt;br /&gt;
# Create C:\Users\Public\Desktop\Credentials.txt&lt;br /&gt;
# Copy standard links to C:\Users\Public\Desktop&lt;br /&gt;
# Copy standard links to C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Tools&lt;br /&gt;
# Copy standard scripts to C:\Scripts&lt;br /&gt;
# Copy standard NWN2 tools to C:\Tools&lt;br /&gt;
# Copy NWNServerConsole to C:\NWN2\Console&lt;br /&gt;
# Fix PowerShell signing&lt;br /&gt;
## Set-ExecutionPolicy -Scope LocalMachine -ExecutionPolicy Unrestricted -Force&lt;br /&gt;
# Install [http://git-scm.com/ Git]&lt;br /&gt;
# Install [https://filezilla-project.org/ FileZilla]&lt;br /&gt;
# Install [http://msdn.microsoft.com/en-us/windows/apps/br229516 Win8 Performance Toolkit]&lt;br /&gt;
# Install [http://www.7-zip.org/ 7-zip]&lt;br /&gt;
# Install [http://gvim.en.softonic.com/ gvim]&lt;br /&gt;
# Install WinDbg for [http://www.microsoft.com/en-us/download/details.aspx?id=8279 Windows 7] or [http://msdn.microsoft.com/en-US/windows/desktop/bg162891 Windows 8.1].&lt;br /&gt;
# Set &amp;lt;code&amp;gt;_NT_SYMBOL_PATH&amp;lt;/code&amp;gt; to &amp;lt;code&amp;gt;SRV*C:\Symbols*http://msdl.microsoft.com/download/symbols&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== NWNX4 Installation ==&lt;br /&gt;
# nwnx4_controller.exe -installservice&lt;br /&gt;
# Get SID for NWN2Server user with PowerShell:&lt;br /&gt;
::: &amp;lt;code&amp;gt;([wmi]&amp;quot;win32_Group.Domain='$env:ComputerName',Name='NWN2 Admins'&amp;quot;).sid&amp;lt;/code&amp;gt;&lt;br /&gt;
# Set SD on nwnx4-1 service to allow NWN2 Admins to start/stop:&lt;br /&gt;
::: &amp;lt;code&amp;gt;sc sdset nwnx4-1 D:(A;;CCLCSWRPWPDTLOCRRC;;;SY)(A;;CCDCLCSWRPWPDTLOCRSDRCWDWO;;;BA)(A;;CCLCSWLOCRRC;;;IU)(A;;CCLCSWLOCRRC;;;SU)(A;;RPWP;;;&amp;lt;&amp;gt;)S:(AU;FA;CCDCLCSWRPWPDTLOCRSDRCWDWO;;;WD)&amp;lt;/code&amp;gt;&lt;br /&gt;
# Install SSH private key to C:\NWNX4\sshfs.ppk&lt;br /&gt;
# Add SSH public key to alfa@sql.alandfaraway.org:~/.ssh/authorized_keys&lt;br /&gt;
# Set configuration in C:\NWNX4\nwnx.ini&lt;br /&gt;
# Set configuration in C:\NWNX4\AuroraServerNWScript.ini&lt;br /&gt;
# Set configuration in C:\NWNX4\xp_mysql.ini&lt;br /&gt;
# Set configuration in C:\NWNX4\DatabaseConnector.ini&lt;br /&gt;
# Set configuration in C:\NWNX4\AuroraServerVault.ini&lt;/div&gt;</summary>
		<author><name>Basilica</name></author>	</entry>

	<entry>
		<id>https://www.alandfaraway.info/Wiki/index.php?title=Virtual_Machine_Setup&amp;diff=2679</id>
		<title>Virtual Machine Setup</title>
		<link rel="alternate" type="text/html" href="https://www.alandfaraway.info/Wiki/index.php?title=Virtual_Machine_Setup&amp;diff=2679"/>
				<updated>2014-08-30T17:01:49Z</updated>
		
		<summary type="html">&lt;p&gt;Basilica: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Technical Manuals]]&lt;br /&gt;
This document describes in rough detail the recommended checklist for setting up a new game server host VM in the standard configuration.  This configuration is suitable for running nwn2server.exe as a limited user account.&lt;br /&gt;
&lt;br /&gt;
== Prerequisites ==&lt;br /&gt;
* [http://www.microsoft.com/en-us/download/details.aspx?id=35 DirectX End-User Runtime]&lt;br /&gt;
* [http://www.microsoft.com/en-us/download/details.aspx?id=17851 Microsoft .NET Framework 4]&lt;br /&gt;
* [http://www.microsoft.com/en-us/download/details.aspx?id=26347 Microsoft Visual C++ 2005 Service Pack 1 Redistributable Package MFC Security Update]&lt;br /&gt;
* [http://www.microsoft.com/en-us/download/details.aspx?id=26999 Microsoft Visual C++ 2010 Service Pack 1 Redistributable Package MFC Security Update]&lt;br /&gt;
&lt;br /&gt;
== Process ==&lt;br /&gt;
# Install Windows Server&lt;br /&gt;
# Copy standard tools over&lt;br /&gt;
# Create SG &amp;quot;NWN2 Servers&amp;quot;&lt;br /&gt;
# Create SG &amp;quot;NWN2 Admins&amp;quot;&lt;br /&gt;
# Create user &amp;quot;NWN2Server&amp;quot;&lt;br /&gt;
## Add to &amp;quot;NWN2 Servers&amp;quot; SG&lt;br /&gt;
# Create C:\NWN2, xcopy NWN2 install over&lt;br /&gt;
## Grant &amp;quot;NWN2 Servers&amp;quot; create files, create folders to &amp;quot;This folder only&amp;quot;&lt;br /&gt;
## Grant &amp;quot;NWN2 Admins&amp;quot; modify to folder, subfolders, and files&lt;br /&gt;
## Import NWN2.reg&lt;br /&gt;
# Create C:\NWN2User&lt;br /&gt;
## Grant full control to &amp;quot;NWN2 Servers&amp;quot;&lt;br /&gt;
## Grant modify/execute/list/read/write to &amp;quot;NWN2 Admins&amp;quot;&lt;br /&gt;
# Runas /profile /user:NWN2Server cmd.exe&lt;br /&gt;
## cd /d &amp;quot;%userprofile%\Documents&amp;quot;&lt;br /&gt;
## mklink /j &amp;quot;Neverwinter Nights 2&amp;quot; C:\NWN2User&lt;br /&gt;
## putty -ssh alfa@sql.alandfaraway.org&lt;br /&gt;
### Confirm and accept central server public key for vault tunnel to work&lt;br /&gt;
# Create C:\NWNX4, xcopy NWNX4 installation over&lt;br /&gt;
## Grant modify/execute/list/read/write to &amp;quot;NWN2 Admins&amp;quot;&lt;br /&gt;
## Grant modify/execute/list/read/write to &amp;quot;NWN2 Servers&amp;quot; for:&lt;br /&gt;
### AuroraServerNWScript.log&lt;br /&gt;
### AuroraServerVault.log&lt;br /&gt;
### nwnx.txt&lt;br /&gt;
### nwnx_controller.txt&lt;br /&gt;
### StandardQueryLog.txt&lt;br /&gt;
### xp_mysql.txt&lt;br /&gt;
### xp_bugfix.txt&lt;br /&gt;
### xp_objectattributes.txt&lt;br /&gt;
### xp_srvadmin.txt&lt;br /&gt;
### xp_system.txt&lt;br /&gt;
### xp_time.txt&lt;br /&gt;
# Create C:\Users\Public\Desktop\Credentials.txt&lt;br /&gt;
# Copy standard links to C:\Users\Public\Desktop&lt;br /&gt;
# Copy standard links to C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Tools&lt;br /&gt;
# Copy standard scripts to C:\Scripts&lt;br /&gt;
# Copy standard NWN2 tools to C:\Tools&lt;br /&gt;
# Copy NWNServerConsole to C:\NWN2\Console&lt;br /&gt;
# Fix PowerShell signing&lt;br /&gt;
## Set-ExecutionPolicy -Scope LocalMachine -ExecutionPolicy Unrestricted -Force&lt;br /&gt;
# Install [http://git-scm.com/ Git]&lt;br /&gt;
# Install [https://filezilla-project.org/ FileZilla]&lt;br /&gt;
# Install [http://msdn.microsoft.com/en-us/windows/apps/br229516 Win8 Performance Toolkit]&lt;br /&gt;
# Install [http://www.7-zip.org/ 7-zip]&lt;br /&gt;
# Install [http://gvim.en.softonic.com/ gvim]&lt;br /&gt;
# Install WinDbg for [http://www.microsoft.com/en-us/download/details.aspx?id=8279 Windows 7] or [http://msdn.microsoft.com/en-US/windows/desktop/bg162891 Windows 8.1].&lt;br /&gt;
# Set &amp;lt;code&amp;gt;_NT_SYMBOL_PATH&amp;lt;/code&amp;gt; to &amp;lt;code&amp;gt;SRV*C:\Symbols*http://msdl.microsoft.com/download/symbols&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== NWNX4 Installation ==&lt;br /&gt;
# nwnx4_controller.exe -installservice&lt;br /&gt;
# Get SID for NWN2Server user with PowerShell:&lt;br /&gt;
::: &amp;lt;code&amp;gt;([wmi]&amp;quot;win32_Group.Domain='$env:ComputerName',Name='NWN2 Admins'&amp;quot;).sid&amp;lt;/code&amp;gt;&lt;br /&gt;
# Set SD on nwnx4-1 service to allow NWN2 Admins to start/stop:&lt;br /&gt;
::: &amp;lt;code&amp;gt;sc sdset nwnx4-1 D:(A;;CCLCSWRPWPDTLOCRRC;;;SY)(A;;CCDCLCSWRPWPDTLOCRSDRCWDWO;;;BA)(A;;CCLCSWLOCRRC;;;IU)(A;;CCLCSWLOCRRC;;;SU)(A;;RPWP;;;&amp;lt;&amp;gt;)S:(AU;FA;CCDCLCSWRPWPDTLOCRSDRCWDWO;;;WD)&amp;lt;/code&amp;gt;&lt;br /&gt;
# Install SSH private key to C:\NWNX4\sshfs.ppk&lt;br /&gt;
# Add SSH public key to alfa@sql.alandfaraway.org:~/.ssh/authorized_keys&lt;br /&gt;
# Set configuration in C:\NWNX4\nwnx.ini&lt;br /&gt;
# Set configuration in C:\NWNX4\AuroraServerNWScript.ini&lt;br /&gt;
# Set configuration in C:\NWNX4\xp_mysql.ini&lt;br /&gt;
# Set configuration in C:\NWNX4\DatabaseConnector.ini&lt;br /&gt;
# Set configuration in C:\NWNX4\AuroraServerVault.ini&lt;/div&gt;</summary>
		<author><name>Basilica</name></author>	</entry>

	<entry>
		<id>https://www.alandfaraway.info/Wiki/index.php?title=Virtual_Machine_Setup&amp;diff=2678</id>
		<title>Virtual Machine Setup</title>
		<link rel="alternate" type="text/html" href="https://www.alandfaraway.info/Wiki/index.php?title=Virtual_Machine_Setup&amp;diff=2678"/>
				<updated>2014-08-30T17:00:20Z</updated>
		
		<summary type="html">&lt;p&gt;Basilica: Document need to set ACL on StandardQueryLog for standard service-based limited user account server setup&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Technical Manuals]]&lt;br /&gt;
This document describes in rough detail the recommended checklist for setting up a new game server host VM in the standard configuration.&lt;br /&gt;
&lt;br /&gt;
== Prerequisites ==&lt;br /&gt;
* [http://www.microsoft.com/en-us/download/details.aspx?id=35 DirectX End-User Runtime]&lt;br /&gt;
* [http://www.microsoft.com/en-us/download/details.aspx?id=17851 Microsoft .NET Framework 4]&lt;br /&gt;
* [http://www.microsoft.com/en-us/download/details.aspx?id=26347 Microsoft Visual C++ 2005 Service Pack 1 Redistributable Package MFC Security Update]&lt;br /&gt;
* [http://www.microsoft.com/en-us/download/details.aspx?id=26999 Microsoft Visual C++ 2010 Service Pack 1 Redistributable Package MFC Security Update]&lt;br /&gt;
&lt;br /&gt;
== Process ==&lt;br /&gt;
# Install Windows Server&lt;br /&gt;
# Copy standard tools over&lt;br /&gt;
# Create SG &amp;quot;NWN2 Servers&amp;quot;&lt;br /&gt;
# Create SG &amp;quot;NWN2 Admins&amp;quot;&lt;br /&gt;
# Create user &amp;quot;NWN2Server&amp;quot;&lt;br /&gt;
## Add to &amp;quot;NWN2 Servers&amp;quot; SG&lt;br /&gt;
# Create C:\NWN2, xcopy NWN2 install over&lt;br /&gt;
## Grant &amp;quot;NWN2 Servers&amp;quot; create files, create folders to &amp;quot;This folder only&amp;quot;&lt;br /&gt;
## Grant &amp;quot;NWN2 Admins&amp;quot; modify to folder, subfolders, and files&lt;br /&gt;
## Import NWN2.reg&lt;br /&gt;
# Create C:\NWN2User&lt;br /&gt;
## Grant full control to &amp;quot;NWN2 Servers&amp;quot;&lt;br /&gt;
## Grant modify/execute/list/read/write to &amp;quot;NWN2 Admins&amp;quot;&lt;br /&gt;
# Runas /profile /user:NWN2Server cmd.exe&lt;br /&gt;
## cd /d &amp;quot;%userprofile%\Documents&amp;quot;&lt;br /&gt;
## mklink /j &amp;quot;Neverwinter Nights 2&amp;quot; C:\NWN2User&lt;br /&gt;
## putty -ssh alfa@sql.alandfaraway.org&lt;br /&gt;
### Confirm and accept central server public key for vault tunnel to work&lt;br /&gt;
# Create C:\NWNX4, xcopy NWNX4 installation over&lt;br /&gt;
## Grant modify/execute/list/read/write to &amp;quot;NWN2 Admins&amp;quot;&lt;br /&gt;
## Grant modify/execute/list/read/write to &amp;quot;NWN2 Servers&amp;quot; for:&lt;br /&gt;
### AuroraServerNWScript.log&lt;br /&gt;
### AuroraServerVault.log&lt;br /&gt;
### nwnx.txt&lt;br /&gt;
### nwnx_controller.txt&lt;br /&gt;
### StandardQueryLog.txt&lt;br /&gt;
### xp_mysql.txt&lt;br /&gt;
### xp_bugfix.txt&lt;br /&gt;
### xp_objectattributes.txt&lt;br /&gt;
### xp_srvadmin.txt&lt;br /&gt;
### xp_system.txt&lt;br /&gt;
### xp_time.txt&lt;br /&gt;
# Create C:\Users\Public\Desktop\Credentials.txt&lt;br /&gt;
# Copy standard links to C:\Users\Public\Desktop&lt;br /&gt;
# Copy standard links to C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Tools&lt;br /&gt;
# Copy standard scripts to C:\Scripts&lt;br /&gt;
# Copy standard NWN2 tools to C:\Tools&lt;br /&gt;
# Copy NWNServerConsole to C:\NWN2\Console&lt;br /&gt;
# Fix PowerShell signing&lt;br /&gt;
## Set-ExecutionPolicy -Scope LocalMachine -ExecutionPolicy Unrestricted -Force&lt;br /&gt;
# Install [http://git-scm.com/ Git]&lt;br /&gt;
# Install [https://filezilla-project.org/ FileZilla]&lt;br /&gt;
# Install [http://msdn.microsoft.com/en-us/windows/apps/br229516 Win8 Performance Toolkit]&lt;br /&gt;
# Install [http://www.7-zip.org/ 7-zip]&lt;br /&gt;
# Install [http://gvim.en.softonic.com/ gvim]&lt;br /&gt;
# Install WinDbg for [http://www.microsoft.com/en-us/download/details.aspx?id=8279 Windows 7] or [http://msdn.microsoft.com/en-US/windows/desktop/bg162891 Windows 8.1].&lt;br /&gt;
# Set &amp;lt;code&amp;gt;_NT_SYMBOL_PATH&amp;lt;/code&amp;gt; to &amp;lt;code&amp;gt;SRV*C:\Symbols*http://msdl.microsoft.com/download/symbols&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== NWNX4 Installation ==&lt;br /&gt;
# nwnx4_controller.exe -installservice&lt;br /&gt;
# Get SID for NWN2Server user with PowerShell:&lt;br /&gt;
::: &amp;lt;code&amp;gt;([wmi]&amp;quot;win32_Group.Domain='$env:ComputerName',Name='NWN2 Admins'&amp;quot;).sid&amp;lt;/code&amp;gt;&lt;br /&gt;
# Set SD on nwnx4-1 service to allow NWN2 Admins to start/stop:&lt;br /&gt;
::: &amp;lt;code&amp;gt;sc sdset nwnx4-1 D:(A;;CCLCSWRPWPDTLOCRRC;;;SY)(A;;CCDCLCSWRPWPDTLOCRSDRCWDWO;;;BA)(A;;CCLCSWLOCRRC;;;IU)(A;;CCLCSWLOCRRC;;;SU)(A;;RPWP;;;&amp;lt;&amp;gt;)S:(AU;FA;CCDCLCSWRPWPDTLOCRSDRCWDWO;;;WD)&amp;lt;/code&amp;gt;&lt;br /&gt;
# Install SSH private key to C:\NWNX4\sshfs.ppk&lt;br /&gt;
# Add SSH public key to alfa@sql.alandfaraway.org:~/.ssh/authorized_keys&lt;br /&gt;
# Set configuration in C:\NWNX4\nwnx.ini&lt;br /&gt;
# Set configuration in C:\NWNX4\AuroraServerNWScript.ini&lt;br /&gt;
# Set configuration in C:\NWNX4\xp_mysql.ini&lt;br /&gt;
# Set configuration in C:\NWNX4\DatabaseConnector.ini&lt;br /&gt;
# Set configuration in C:\NWNX4\AuroraServerVault.ini&lt;/div&gt;</summary>
		<author><name>Basilica</name></author>	</entry>

	<entry>
		<id>https://www.alandfaraway.info/Wiki/index.php?title=Basic_Host_Requirements&amp;diff=2670</id>
		<title>Basic Host Requirements</title>
		<link rel="alternate" type="text/html" href="https://www.alandfaraway.info/Wiki/index.php?title=Basic_Host_Requirements&amp;diff=2670"/>
				<updated>2014-08-16T23:04:50Z</updated>
		
		<summary type="html">&lt;p&gt;Basilica: More precisely specify recommended host OS&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Technical Manuals]]&lt;br /&gt;
== System Requirements ==&lt;br /&gt;
ALFA strongly recommends that all game servers run a 64-bit OS for the operating system that runs nwn2server. A 32-bit OS does not provide enough address space for many modules to function reliably when hosted by nwn2server.&lt;br /&gt;
&lt;br /&gt;
If nwn2server is hosted in a virtual machine, ALFA recommends that either [http://www.vmware.com/ VMware] or [http://www.microsoft.com/hyper-v/‎ Hyper-V] be used for the virtualization infrastructure. Both of these products have both been validated and are functional in production use for live servers.&lt;br /&gt;
&lt;br /&gt;
Specifically noted, VirtualBox should not be used or the game will not function properly, on account of bugs in VirtualBox's timer handling (often manifests as perception not working over time or other time-based systems in the game malfunctioning).&lt;br /&gt;
&lt;br /&gt;
It is preferred that the Windows version (Windows 8.1 or Windows Server 2012 R2 or higher are recommended) used to host the game server be a version that supports acting as a Remote Desktop Protocol (RDP) host, typically Professional (or higher) editions. Server editions also include Remote Desktop Protocol host functionality. RDP provides a superior remote administration experience as compared to VNC.&lt;br /&gt;
&lt;br /&gt;
The recommended memory size to allocate to a game server instance is 4GB. This may be adjusted based on the actual memory consumption of a module, but 2GB provides plenty of headroom for most of our servers.&lt;br /&gt;
&lt;br /&gt;
== Prerequisites ==&lt;br /&gt;
* [http://www.microsoft.com/en-us/download/details.aspx?id=26347 Microsoft Visual C++ 2005 Service Pack 1 Redistributable Package MFC Security Update]&lt;br /&gt;
* [http://www.microsoft.com/en-us/download/details.aspx?id=8328 Microsoft Visual C++ 2010 SP1 Redistributable Package (x86)]&lt;br /&gt;
* [http://support.microsoft.com/kb/968929/en-us Windows Management Framework Core] -- For operating systems older than Windows 7. Only need Windows PowerShell 2.0.&lt;br /&gt;
&lt;br /&gt;
= NWNx4 =&lt;br /&gt;
ALFA uses [http://www.nwnx.org/index.php?id=nwnx4 NWNx4] to host all of its live servers.&lt;br /&gt;
&lt;br /&gt;
While this document cannot replace the documentation provided with NWNx4, a brief explanation can be offered: NWNx4 is an application which runs alongside the nwn2server application, communicating with, running processes for, and altering the data within to achieve functionality which cannot be created without such means.&lt;br /&gt;
&lt;br /&gt;
The NWNx4 application works with a number of community-generated plugins-- libraries of functions and hooks, which are either called from the NWN scripting language or which intercept standard functions or functionality to correct bugs-- which are required for the proper function of [[ALFA Core Rules | ALFA's core ruleset]].&lt;br /&gt;
&lt;br /&gt;
Download the files from ACR.&lt;br /&gt;
* [https://github.com/ALandFarAway/ALFA-Base-Resources/tree/master/Server_Files/nwn2server%20directory nwn2server directory] -- These files go in the same folder as nwn2server.exe.&lt;br /&gt;
* [https://github.com/ALandFarAway/ALFA-Base-Resources/tree/master/Server_Files/nwnx4%20directory nwnx4 directory] -- These files go into your NWNx4 folder.&lt;br /&gt;
&lt;br /&gt;
NWNx4 is configured through the nwnx.ini file, which is plain text and contains help text to describe the function of each setting, which is installed to the NWNx4 install directory. Once configured, a server is run through NWNx4 by running one of the NWNx4 executables. The started application will also start nwn2server.&lt;br /&gt;
&lt;br /&gt;
== Currently Used Plugins ==&lt;br /&gt;
=== Server Folder Files ===&lt;br /&gt;
* '''NWNScriptJIT.dll''' -- NWScript JIT support, C# script support&lt;br /&gt;
* '''NWNScriptJITIntrinsics.dll''' -- NWScript JIT support, C# script support&lt;br /&gt;
* '''AuroraServerNetLayer.dll''' -- bug fixes&lt;br /&gt;
* '''NWNScriptCompiler.exe''' -- The script compiler should be somewhere in %PATH%, but it can be placed in the server install directory too.  Needed for the content patcher to automatically recompile modules on updates (required, or else the module could break after a content patch).&lt;br /&gt;
&lt;br /&gt;
=== NWNx4 Folder Files ===&lt;br /&gt;
* '''NWNx4_Hook.dll''' -- Allows script hooking in the first place.&lt;br /&gt;
* '''NWNScriptCompiler.exe -- Required to allow the content patcher to recompile a module. Take from AdvancedScriptCompiler\NWNScriptCompiler.exe on the ACR repository.&lt;br /&gt;
* '''xp_AuroraServerNWScript.dll''' -- Script improvements, C# support, allows workarounds of engine limitations.&lt;br /&gt;
* '''xp_bugfix.dll''' -- Bug fixes&lt;br /&gt;
* '''xp_craft.dll''' -- Customization of items during live play&lt;br /&gt;
* '''xp_mysql.dll''' -- Allows communication with SQL databases&lt;br /&gt;
* '''xp_objectattributes.dll''' -- Allows the modification of creatures during live play&lt;br /&gt;
* '''xp_ServerVault.dll''' -- Allows vault reads / writes to occur without stopping the main server process&lt;br /&gt;
* '''xp_srvadmin.dll''' -- Allows scripts to carry out server administration actions.&lt;br /&gt;
* '''xp_system.dll''' -- &lt;br /&gt;
* '''xp_time.dll''' --  &lt;br /&gt;
* '''MySql.Data.dll''' -- MySQL client library for CLR scripts.&lt;br /&gt;
&lt;br /&gt;
=== Configuration ===&lt;br /&gt;
* AuroraServerNWScript.ini&lt;br /&gt;
*: &amp;lt;code&amp;gt;AllowManagedScripts=1&amp;lt;/code&amp;gt;&lt;br /&gt;
* xp_craft.ini&lt;br /&gt;
** Set the database directory to proper location of the Campaign Database on the machine&lt;br /&gt;
* AuroraServerVault.ini&lt;br /&gt;
** The text within the configuration file explains how to configure the plugin. If this configuration fails, players will be unable to see their vaults.&lt;br /&gt;
** Typical configuration is to set LocalServerVaultPath=C:\NWN2User\servervault , RemoteServerVaultPath=C:\NWN2User\remotevault , SpoolPath=C:\NWN2User\servervaultspool. All three of these can be anywhere, so long as it is clear to anyone doing maintenance what they are (&amp;quot;remote vault&amp;quot; is where bics will be downloaded to for verification, &amp;quot;spool&amp;quot; is where saved bics will be staged for upload, and &amp;quot;local server vault&amp;quot; is the directory from which characters will be played).&lt;br /&gt;
** The text within the configuration file explains how to configure the plugin. If this configuration fails, the server will default to inappropriate settings (such as PvP, download server, or custom GUIs) or requiring the module to be started manually after nwn2server.exe stops.&lt;br /&gt;
** Remember to ensure that the directories specified in the config file exist!  They have to be created manually (except for the LocalServerVaultPath which is automatically created by nwn2server.exe, though it can be manually created safely).  If the directories don't all exist, the vault won't work correctly and players will not be able to log in.&lt;br /&gt;
* nwnx.ini&lt;br /&gt;
** The ACR requires a temporary directory to run. It can be anywhere that the user who runs the NWNx4 process can write to. It is set in nwn2temp&lt;br /&gt;
* DatabaseConnector.ini&lt;br /&gt;
** DatabaseConnector has only one setting in it, which should look something like:&lt;br /&gt;
*** CommandLine=-batch -L 3306:127.0.0.1:3306 -x -a -T -2 -noagent -N -i C:\NWNX4\ssh.ppk alfa@sql.alandfaraway.org&lt;br /&gt;
*** C:\NWNX4\ssh.ppk is the private key that you're specified for this server.&lt;br /&gt;
**** To create a key pair, use [http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html PuttyGen] to create a new key with all of the default settings.&lt;br /&gt;
**** Save the private key to your NWNx4 directory, and specify that location in the command line&lt;br /&gt;
**** Use [http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html PuTTy] to connect to alfa@sql.alandfaraway.org (as an HDM, you should have credentials for this) and edit (pico is the Linux command) .\alfa\.ssh\authorized_keys to add the public key to the bottom. Then, run (Windows+R) &amp;quot;&amp;lt;file location of putty&amp;gt; alfa@sql.alandfaraway.org -i &amp;lt;file location of your public key&amp;gt;&amp;quot; -- you will be prompted asking if you want to cache the public key from the server you're connecting to. Pick &amp;quot;yes&amp;quot; and close the connection.&lt;br /&gt;
* xp_mysql.ini&lt;br /&gt;
** Set the database credentials up as per standard for the central server.  TA, IA, or tech team can help provide credentials.  Use StandardQueryLog.txt (formerly xp_mysql.txt) to troubleshoot database connectivity or query problems.&lt;br /&gt;
** Set server = localhost to use the DatabaseConnector managed tunnel (all servers should generally use this).  If a Linux sshfs VM is in use instead, set server = linuxhost where linuxhost is the address of the Linux VM (this method is deprecated).&lt;br /&gt;
&lt;br /&gt;
= Installation checklist =&lt;br /&gt;
See [[Virtual Machine Setup]] for an end to end checklist for configuring a game server from scratch, using this guide for reference.&lt;/div&gt;</summary>
		<author><name>Basilica</name></author>	</entry>

	<entry>
		<id>https://www.alandfaraway.info/Wiki/index.php?title=Basic_Host_Requirements&amp;diff=2669</id>
		<title>Basic Host Requirements</title>
		<link rel="alternate" type="text/html" href="https://www.alandfaraway.info/Wiki/index.php?title=Basic_Host_Requirements&amp;diff=2669"/>
				<updated>2014-08-16T23:04:13Z</updated>
		
		<summary type="html">&lt;p&gt;Basilica: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Technical Manuals]]&lt;br /&gt;
== System Requirements ==&lt;br /&gt;
ALFA strongly recommends that all game servers run a 64-bit OS for the operating system that runs nwn2server. A 32-bit OS does not provide enough address space for many modules to function reliably when hosted by nwn2server.&lt;br /&gt;
&lt;br /&gt;
If nwn2server is hosted in a virtual machine, ALFA recommends that either [http://www.vmware.com/ VMware] or [http://www.microsoft.com/hyper-v/‎ Hyper-V] be used for the virtualization infrastructure. Both of these products have both been validated and are functional in production use for live servers.&lt;br /&gt;
&lt;br /&gt;
Specifically noted, VirtualBox should not be used or the game will not function properly, on account of bugs in VirtualBox's timer handling (often manifests as perception not working over time or other time-based systems in the game malfunctioning).&lt;br /&gt;
&lt;br /&gt;
It is preferred that the Windows version (Windows 8.1 or Windows Server 2012 or higher are recommended) used to host the game server be a version that supports acting as a Remote Desktop Protocol (RDP) host, typically Professional (or higher) editions. Server editions also include Remote Desktop Protocol host functionality. RDP provides a superior remote administration experience as compared to VNC.&lt;br /&gt;
&lt;br /&gt;
The recommended memory size to allocate to a game server instance is 4GB. This may be adjusted based on the actual memory consumption of a module, but 2GB provides plenty of headroom for most of our servers.&lt;br /&gt;
&lt;br /&gt;
== Prerequisites ==&lt;br /&gt;
* [http://www.microsoft.com/en-us/download/details.aspx?id=26347 Microsoft Visual C++ 2005 Service Pack 1 Redistributable Package MFC Security Update]&lt;br /&gt;
* [http://www.microsoft.com/en-us/download/details.aspx?id=8328 Microsoft Visual C++ 2010 SP1 Redistributable Package (x86)]&lt;br /&gt;
* [http://support.microsoft.com/kb/968929/en-us Windows Management Framework Core] -- For operating systems older than Windows 7. Only need Windows PowerShell 2.0.&lt;br /&gt;
&lt;br /&gt;
= NWNx4 =&lt;br /&gt;
ALFA uses [http://www.nwnx.org/index.php?id=nwnx4 NWNx4] to host all of its live servers.&lt;br /&gt;
&lt;br /&gt;
While this document cannot replace the documentation provided with NWNx4, a brief explanation can be offered: NWNx4 is an application which runs alongside the nwn2server application, communicating with, running processes for, and altering the data within to achieve functionality which cannot be created without such means.&lt;br /&gt;
&lt;br /&gt;
The NWNx4 application works with a number of community-generated plugins-- libraries of functions and hooks, which are either called from the NWN scripting language or which intercept standard functions or functionality to correct bugs-- which are required for the proper function of [[ALFA Core Rules | ALFA's core ruleset]].&lt;br /&gt;
&lt;br /&gt;
Download the files from ACR.&lt;br /&gt;
* [https://github.com/ALandFarAway/ALFA-Base-Resources/tree/master/Server_Files/nwn2server%20directory nwn2server directory] -- These files go in the same folder as nwn2server.exe.&lt;br /&gt;
* [https://github.com/ALandFarAway/ALFA-Base-Resources/tree/master/Server_Files/nwnx4%20directory nwnx4 directory] -- These files go into your NWNx4 folder.&lt;br /&gt;
&lt;br /&gt;
NWNx4 is configured through the nwnx.ini file, which is plain text and contains help text to describe the function of each setting, which is installed to the NWNx4 install directory. Once configured, a server is run through NWNx4 by running one of the NWNx4 executables. The started application will also start nwn2server.&lt;br /&gt;
&lt;br /&gt;
== Currently Used Plugins ==&lt;br /&gt;
=== Server Folder Files ===&lt;br /&gt;
* '''NWNScriptJIT.dll''' -- NWScript JIT support, C# script support&lt;br /&gt;
* '''NWNScriptJITIntrinsics.dll''' -- NWScript JIT support, C# script support&lt;br /&gt;
* '''AuroraServerNetLayer.dll''' -- bug fixes&lt;br /&gt;
* '''NWNScriptCompiler.exe''' -- The script compiler should be somewhere in %PATH%, but it can be placed in the server install directory too.  Needed for the content patcher to automatically recompile modules on updates (required, or else the module could break after a content patch).&lt;br /&gt;
&lt;br /&gt;
=== NWNx4 Folder Files ===&lt;br /&gt;
* '''NWNx4_Hook.dll''' -- Allows script hooking in the first place.&lt;br /&gt;
* '''NWNScriptCompiler.exe -- Required to allow the content patcher to recompile a module. Take from AdvancedScriptCompiler\NWNScriptCompiler.exe on the ACR repository.&lt;br /&gt;
* '''xp_AuroraServerNWScript.dll''' -- Script improvements, C# support, allows workarounds of engine limitations.&lt;br /&gt;
* '''xp_bugfix.dll''' -- Bug fixes&lt;br /&gt;
* '''xp_craft.dll''' -- Customization of items during live play&lt;br /&gt;
* '''xp_mysql.dll''' -- Allows communication with SQL databases&lt;br /&gt;
* '''xp_objectattributes.dll''' -- Allows the modification of creatures during live play&lt;br /&gt;
* '''xp_ServerVault.dll''' -- Allows vault reads / writes to occur without stopping the main server process&lt;br /&gt;
* '''xp_srvadmin.dll''' -- Allows scripts to carry out server administration actions.&lt;br /&gt;
* '''xp_system.dll''' -- &lt;br /&gt;
* '''xp_time.dll''' --  &lt;br /&gt;
* '''MySql.Data.dll''' -- MySQL client library for CLR scripts.&lt;br /&gt;
&lt;br /&gt;
=== Configuration ===&lt;br /&gt;
* AuroraServerNWScript.ini&lt;br /&gt;
*: &amp;lt;code&amp;gt;AllowManagedScripts=1&amp;lt;/code&amp;gt;&lt;br /&gt;
* xp_craft.ini&lt;br /&gt;
** Set the database directory to proper location of the Campaign Database on the machine&lt;br /&gt;
* AuroraServerVault.ini&lt;br /&gt;
** The text within the configuration file explains how to configure the plugin. If this configuration fails, players will be unable to see their vaults.&lt;br /&gt;
** Typical configuration is to set LocalServerVaultPath=C:\NWN2User\servervault , RemoteServerVaultPath=C:\NWN2User\remotevault , SpoolPath=C:\NWN2User\servervaultspool. All three of these can be anywhere, so long as it is clear to anyone doing maintenance what they are (&amp;quot;remote vault&amp;quot; is where bics will be downloaded to for verification, &amp;quot;spool&amp;quot; is where saved bics will be staged for upload, and &amp;quot;local server vault&amp;quot; is the directory from which characters will be played).&lt;br /&gt;
** The text within the configuration file explains how to configure the plugin. If this configuration fails, the server will default to inappropriate settings (such as PvP, download server, or custom GUIs) or requiring the module to be started manually after nwn2server.exe stops.&lt;br /&gt;
** Remember to ensure that the directories specified in the config file exist!  They have to be created manually (except for the LocalServerVaultPath which is automatically created by nwn2server.exe, though it can be manually created safely).  If the directories don't all exist, the vault won't work correctly and players will not be able to log in.&lt;br /&gt;
* nwnx.ini&lt;br /&gt;
** The ACR requires a temporary directory to run. It can be anywhere that the user who runs the NWNx4 process can write to. It is set in nwn2temp&lt;br /&gt;
* DatabaseConnector.ini&lt;br /&gt;
** DatabaseConnector has only one setting in it, which should look something like:&lt;br /&gt;
*** CommandLine=-batch -L 3306:127.0.0.1:3306 -x -a -T -2 -noagent -N -i C:\NWNX4\ssh.ppk alfa@sql.alandfaraway.org&lt;br /&gt;
*** C:\NWNX4\ssh.ppk is the private key that you're specified for this server.&lt;br /&gt;
**** To create a key pair, use [http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html PuttyGen] to create a new key with all of the default settings.&lt;br /&gt;
**** Save the private key to your NWNx4 directory, and specify that location in the command line&lt;br /&gt;
**** Use [http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html PuTTy] to connect to alfa@sql.alandfaraway.org (as an HDM, you should have credentials for this) and edit (pico is the Linux command) .\alfa\.ssh\authorized_keys to add the public key to the bottom. Then, run (Windows+R) &amp;quot;&amp;lt;file location of putty&amp;gt; alfa@sql.alandfaraway.org -i &amp;lt;file location of your public key&amp;gt;&amp;quot; -- you will be prompted asking if you want to cache the public key from the server you're connecting to. Pick &amp;quot;yes&amp;quot; and close the connection.&lt;br /&gt;
* xp_mysql.ini&lt;br /&gt;
** Set the database credentials up as per standard for the central server.  TA, IA, or tech team can help provide credentials.  Use StandardQueryLog.txt (formerly xp_mysql.txt) to troubleshoot database connectivity or query problems.&lt;br /&gt;
** Set server = localhost to use the DatabaseConnector managed tunnel (all servers should generally use this).  If a Linux sshfs VM is in use instead, set server = linuxhost where linuxhost is the address of the Linux VM (this method is deprecated).&lt;br /&gt;
&lt;br /&gt;
= Installation checklist =&lt;br /&gt;
See [[Virtual Machine Setup]] for an end to end checklist for configuring a game server from scratch, using this guide for reference.&lt;/div&gt;</summary>
		<author><name>Basilica</name></author>	</entry>

	<entry>
		<id>https://www.alandfaraway.info/Wiki/index.php?title=Connecting_to_the_MySQL_Database&amp;diff=2668</id>
		<title>Connecting to the MySQL Database</title>
		<link rel="alternate" type="text/html" href="https://www.alandfaraway.info/Wiki/index.php?title=Connecting_to_the_MySQL_Database&amp;diff=2668"/>
				<updated>2014-08-16T23:03:38Z</updated>
		
		<summary type="html">&lt;p&gt;Basilica: Document new SQL log file.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Technical Manuals]]&lt;br /&gt;
'''Note!  This page is deprecated.  See [[Basic Host Requirements]] for game server database setup.  This page is only kept for historical referenced.'''&lt;br /&gt;
&lt;br /&gt;
See [[Basic Host Requirements#Configuration|Basic Host Requirements: Configuration]] for details on how to set up DatabaseConnector.ini to manage the SSH tunnel used to connect to MySQL.&lt;br /&gt;
&lt;br /&gt;
-----&lt;br /&gt;
&lt;br /&gt;
Follow these instructions:&lt;br /&gt;
# Download and extract the following NWNX4 files from the link below to a dedicated folder on your host machine (eg. C:\NWNX4):&lt;br /&gt;
#* NWNX4_Controller.exe&lt;br /&gt;
#* NWNX4_GUI.exe&lt;br /&gt;
#* madCHook.dll&lt;br /&gt;
#* NWNX4_Hook.dll&lt;br /&gt;
#* xp_mysql.dll&lt;br /&gt;
#* xp_time.dll&lt;br /&gt;
#* nwnx.ini&lt;br /&gt;
#* xp_mysql.ini&lt;br /&gt;
# Copy the madCHook.dll file to your Neverwinter Nights 2 game folder (where the game installed itself). &lt;br /&gt;
# You will need to configure nwnx.ini with your module and game information. The most important line is the parameters entry:&lt;br /&gt;
#: &amp;lt;code&amp;gt;parameters = -module &amp;quot;'''&amp;lt;My Module&amp;gt;'''&amp;quot; -servervault 1 -publicserver 1&amp;lt;/code&amp;gt;&lt;br /&gt;
#: If you prefer to launch your module in directory mode, use the -moduledir paramater in place of -module.&lt;br /&gt;
# You will need to configure xp_mysql.ini with the correct connection details for the remote database server. Please contact the IA, TA, or DMA for that information. &lt;br /&gt;
# Once you have the file configured, you can launch your server using the NWNX4_GUI.exe program (NOT nwn2server.exe as you normally would). It will automatically launch nwn2server for you.&lt;br /&gt;
#: Alternatively, you can install NWNX4 as a service on your host machine by issuing the following commands in your NWNX4 folder (only recommended for advanced users):&lt;br /&gt;
#:: &amp;lt;code&amp;gt;NWNX4_Controller.exe -installservice&amp;lt;/code&amp;gt;&lt;br /&gt;
#:: &amp;lt;code&amp;gt;NWNX4_Controller.exe -startservice&amp;lt;/code&amp;gt;&lt;br /&gt;
#: NWNX4 will show up as a Windows service, which can be started and stopped like any other service on your machine (via Services in Administrative Tools). You can enable the nwn2server dialog window by navigating to the NWNX4 service, clicking on its properties, selecting the &amp;quot;Log On&amp;quot; tab, and checking the &amp;quot;Desktop Interaction&amp;quot; box.&lt;br /&gt;
#: Other service commands you can issue using NWNX4_Controller.exe:&lt;br /&gt;
#:: &amp;lt;code&amp;gt;-serviceno&amp;lt;/code&amp;gt; -- Specify service instance number&lt;br /&gt;
#:: &amp;lt;code&amp;gt;-stopservice&amp;lt;/code&amp;gt; -- Stop the NWNX service&lt;br /&gt;
#:: &amp;lt;code&amp;gt;-uninstallservice&amp;lt;/code&amp;gt; -- Uninstall the NWNX service&lt;br /&gt;
#:: &amp;lt;code&amp;gt;-interactive&amp;lt;/code&amp;gt; -- Start in interactive mode&lt;br /&gt;
&lt;br /&gt;
Note: NWNX logs are recorded in the nwnx.txt file, and MySQL logs are recorded in the StandardQueryLog.txt (formerly xp_mysql.txt) file in the install folder. These will help you identify any configuration or run time sql problems (like bad queries).&lt;/div&gt;</summary>
		<author><name>Basilica</name></author>	</entry>

	<entry>
		<id>https://www.alandfaraway.info/Wiki/index.php?title=ACR_Configuration_Settings&amp;diff=2667</id>
		<title>ACR Configuration Settings</title>
		<link rel="alternate" type="text/html" href="https://www.alandfaraway.info/Wiki/index.php?title=ACR_Configuration_Settings&amp;diff=2667"/>
				<updated>2014-08-16T23:01:01Z</updated>
		
		<summary type="html">&lt;p&gt;Basilica: Fix typo&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Technical Manuals]]&lt;br /&gt;
There are several configuration settings that alter the behavior of the ACR on a global or per-module basis.&lt;br /&gt;
&lt;br /&gt;
Global settings are stored in the &amp;quot;config&amp;quot; table in the database, whereas per-module settings are stored as module local variables that are intended to be configured in the toolset.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Module local variable configuration settings ==&lt;br /&gt;
These settings are stored as local variables on the module.  They can be set by the toolset.&lt;br /&gt;
&lt;br /&gt;
; int ACR_PLAYER_LOCATIONS : If set to 1, the PC Tools button that allows a player to see what areas their party members are in is enabled.  '''This feature is defunct and doesn't do anything right now.'''&lt;br /&gt;
&lt;br /&gt;
; int ACR_DISABLE_STATISTICS : If set to 1, then the ACR doesn't update the stat_counters table in the database.  This feature is primarily in place to allow statistics to be disabled if they proved to be a performance problem.  This setting can be globally configured via the database config table.&lt;br /&gt;
&lt;br /&gt;
; int ACR_HEALTHMONITOR_GAMEOBJUPDATE_BACKOFF : If set to 1, then the server will detect when responsiveness is poor due to excessive server load.  If the server appears to be overloaded, then the ACR (ACR_HealthMonitor) will increase the time between game world updates sent to game clients.  This frees up a significant amount of CPU time for other tasks on the server, preserving responsiveness (but players will see course corrections or other movement changes less frequently).  If the server is performing well, the game world update timer is reduced to its default value.  This setting can be globally configured via the database config table.&lt;br /&gt;
&lt;br /&gt;
; int ACR_SERVER_IPC_DISABLE_LATENCY_CHECK : If set to 1, then the server won't periodically, about every 30 seconds, refresh the player to server ping times of connected players (players can check their ping with #ping if this feature isn't enabled).&lt;br /&gt;
&lt;br /&gt;
; int ACR_MODULERESOURCEFILES : If set to 1, then the server will record each resource file present within the module proper in the server_resource_files table.  This setting can be globally configured via the database config table.&lt;br /&gt;
&lt;br /&gt;
=== Recommended Module Default Settings ===&lt;br /&gt;
: int ACR_PLAYER_LOCATIONS = 1&lt;br /&gt;
: int ACR_HEALTHMONITOR_GAMEOBJUPDATE_BACKOFF = 1&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Global (database config table) Configuration Settings ==&lt;br /&gt;
These settings are stored in the &amp;quot;config&amp;quot; table in the database, which is a key/value pair mapping.  They change the behavior of all modules connected to the database.&lt;br /&gt;
&lt;br /&gt;
; PlayerPassword : This setting contains the player password that is used when portaling a player between servers.  It '''must''' match the configured player password value on all servers.  Changing this setting doesn't actually change the player password required to connect to a server (which has to be done separately), just what password is used for outbound portals.  This setting is updated every 5 minutes while a server is running.&lt;br /&gt;
&lt;br /&gt;
; ACR_DISABLE_STATISTICS : If set to 1, this setting turns off stat_counters table updates on all servers by setting the ACR_DISABLE_STATISTICS module local variable to 1 during server startup.  This setting is only updated at module startup time.&lt;br /&gt;
&lt;br /&gt;
; GameObjUpdateBackoff : If set to 1, this setting enables game world update timer management by setting the ACR_HEALTHMONITOR_GAMEOBJUPDATE_BACKOFF module local variable to 1 during server startup.  This setting is only updated at module startup time.&lt;br /&gt;
&lt;br /&gt;
; RestartWatchdogTimeout : The number of second after which a remote server restart request, from the Restart Server tool, forcibly terminates the server if a clean shutdown hasn't happened yet.  This setting is designed to allow a server that is deadlocked or hung to be forcibly restarted remotely (as the remote restart mechanism uses a dedicated thread that is more likely to be responsive even if the main server thread is stuck).  If not set or set to zero, then the restart watchdog feature isn't used on remote restart requests.  This setting is updated every 5 minutes while a server is running.&lt;br /&gt;
&lt;br /&gt;
; AccountAssociationSecret : The shared secret string used to generate the URL to send the user to for linking their in-game community account with their ALFA forum account.  The value can be any string (hopefully a relatively random one). The forum system uses the shared secret to validate that URLs containing account linking information were only generated by an authorized source, like a live server.  More details on the account association system can be found [http://www.alandfaraway.org/forums/viewtopic.php?f=95&amp;amp;amp;t=47302 here]. This setting is updated every 5 minutes while a server is running.&lt;br /&gt;
&lt;br /&gt;
; ModuleResourceFiles : If set to 1, this setting enables module resource file logging by setting the ACR_MODULERESOURCEFILES module local variable to 1 during server startup.  This setting is only updated at module startup time.&lt;br /&gt;
&lt;br /&gt;
; AccountAssociationUrl : The base URL of the ALFA account association web service.  This setting is updated every 5 minutes while a server is running.&lt;br /&gt;
&lt;br /&gt;
; GetHostnameUrl : The base URL of the ALFA get hostname web service.  This setting is updated every 5 minutes while a server is running.&lt;br /&gt;
&lt;br /&gt;
; ContentPatchPath : The path relative to the Azure updater root container (formerly the sshfs mount point) to use as the base location for content patch files.  Content patch files are stored under &amp;lt;Azure updater root container&amp;gt;/ContentPatchPath/&amp;lt;HakVersion&amp;gt;/.  Any \ characters in this path are automatically converted into / characters for the Azure updater.  This value should generally be set to ACR_ContentPatches\Global.  This setting is only updated at module startup time.&lt;br /&gt;
&lt;br /&gt;
; DefaultIrcGatewayId : The default IRC gateway to use for server-to-IRC messages.  Typically, this should be zero, which is the IRC gateway ID customarily used by the production ALFA IRC bot.  The setting is paired with an ALFA IRC Bot instance's IRCGateway config.xml entry.  This setting is updated every 5 minutes while a server is running.&lt;br /&gt;
&lt;br /&gt;
; DefaultIrcRecipient : The default IRC recipient (i.e. channel) to use for server-to-IRC messages.  Typically, this should be #alfa-players.  This setting is updated every 5 minutes while a server is running.&lt;br /&gt;
&lt;br /&gt;
; WerDisabled : If set to 1, Windows Error Reporting is disabled for nwn2server.exe.  This setting is only updated at module startup time.&lt;br /&gt;
&lt;br /&gt;
; DisableSaveInQuarantine : If set to 1, character files are not saved by a player in quarantine (preventing a pending save from an offline server from accidentally being overwritten by logging in to the wrong server).  This is updated every 5 minutes while a server is running.&lt;br /&gt;
&lt;br /&gt;
; CompilerOptions : Compiler options that the content patcher system uses when a module recompile is required by a content hotfix.  This is usually set to &amp;quot;-e -o -v1.70 -y&amp;quot;, to match the option set used by the ACR build system (in NWScript.mk) and to continue past scripts that fail to compile, as some modules have non-compileable scripts checked in.&lt;br /&gt;
&lt;br /&gt;
; NotifyServiceCid : The character ID of the dummy character that is used to send notification messages from infrastructure to the IRC gateway.  Typically, this should be the dedicated NotifyService character (CID 3905).  This is used, for example, by the content patcher, so as to send notifications as to server restarts due to the content patch system.  If set to zero, messages are not sent to the IRC gateway.  Infrastructure messages are sent to the default IRC recipient as configured by the DefaultIrcRecipient config table variable.&lt;br /&gt;
&lt;br /&gt;
; ErrorNotifyIrcRecipient : The default IRC recipient (i.e. channel) to use for diagnostic and error reports sent via server-to-IRC messages.  Typically, this should be #alfa-tech.  This setting is updated every 5 minutes while a server is running.&lt;br /&gt;
&lt;br /&gt;
; GameDifficultyLevel : The game difficulty level that all servers will be configured to. This is an integer value that should match the value of one of the GAME_DIFFICULTY_* nwscript.nss constants, and should generally be set to 3 (meaning GAME_DIFFICULTY_CORE_RULES). If a server has an incorrect difficulty level, the ACR system will automatically adjust it to the target, global difficulty level specified with this variable.&lt;br /&gt;
&lt;br /&gt;
; ProtectionLevel : The anti-abuse protection level that all servers adhere to (an integer).  Each protection level represents an incremental anti-abuse defense over the previous level.  Protection levels can be applied in the case of an abuse event, but generally the system should run at ProtectionLevel 0 (the default, no special restrictions).  Valid values correspond to the following table (the value should be set to the integer on the left, the symbolic constant in script source code is supplied in parenthesis):&lt;br /&gt;
# (MEMBER_PROTECTION_LEVEL_OPEN):  The default, no special anti-abuse provisions for non-member accounts.&lt;br /&gt;
# (MEMBER_PROTECTION_LEVEL_QUARANTINE):  Non-member accounts are immediately quarantined on login.&lt;br /&gt;
# (MEMBER_PROTECTION_LEVEL_QUARANTINE_DM_ONLY_TELLS):  Non-member accounts are immediately quarantined on login and the only function permitted in-game is to send a tell to a DM (no cross-server tells, no IRC gateway use, no (non-DM) player tells, etc.).&lt;br /&gt;
# (MEMBER_PROTECTION_LEVEL_BOOT_5S_DELAY):  Non-member accounts are quarantined, can't use tells (even to a DM), and are booted after 5 seconds.  A short message explaining that the player should fill out the application form at [http://www.alandfaraway.org http://www.alandfaraway.org] is displayed before the player is booted.&lt;br /&gt;
# (MEMBER_PROTECTION_LEVEL_BOOT_IMMEDIATELY): Non-member accounts are immediately booted on log in and can't perform any function in-game whatsoever.  No appreciable delay even to send an explanation as to what happened is allowed for, for use in extreme abuse events only.&lt;br /&gt;
: This setting is updated every 5 minutes while a server is running.&lt;br /&gt;
&lt;br /&gt;
; VaultConnectionString : The Azure Storage connection string for the server vault. This setting is updated every 5 minutes while a server is running.&lt;br /&gt;
&lt;br /&gt;
; UpdateConnectionString : The Azure Storage connection string for the ACR updater. This setting is updated every 5 minutes while a server is running.&lt;br /&gt;
&lt;br /&gt;
; VerboseVaultLogging : If set to 1, detailed log messages about the Azure ServerVaultConnector are logged to the main server log file.  This setting is normally left as 0.  This is updated every 5 minutes while a server is running.&lt;/div&gt;</summary>
		<author><name>Basilica</name></author>	</entry>

	<entry>
		<id>https://www.alandfaraway.info/Wiki/index.php?title=ACR_Configuration_Settings&amp;diff=2666</id>
		<title>ACR Configuration Settings</title>
		<link rel="alternate" type="text/html" href="https://www.alandfaraway.info/Wiki/index.php?title=ACR_Configuration_Settings&amp;diff=2666"/>
				<updated>2014-08-16T23:00:10Z</updated>
		
		<summary type="html">&lt;p&gt;Basilica: Document default value for ContentPatchPath.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Technical Manuals]]&lt;br /&gt;
There are several configuration settings that alter the behavior of the ACR on a global or per-module basis.&lt;br /&gt;
&lt;br /&gt;
Global settings are stored in the &amp;quot;config&amp;quot; table in the database, whereas per-module settings are stored as module local variables that are intended to be configured in the toolset.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Module local variable configuration settings ==&lt;br /&gt;
These settings are stored as local variables on the module.  They can be set by the toolset.&lt;br /&gt;
&lt;br /&gt;
; int ACR_PLAYER_LOCATIONS : If set to 1, the PC Tools button that allows a player to see what areas their party members are in is enabled.  '''This feature is defunct and doesn't do anything right now.'''&lt;br /&gt;
&lt;br /&gt;
; int ACR_DISABLE_STATISTICS : If set to 1, then the ACR doesn't update the stat_counters table in the database.  This feature is primarily in place to allow statistics to be disabled if they proved to be a performance problem.  This setting can be globally configured via the database config table.&lt;br /&gt;
&lt;br /&gt;
; int ACR_HEALTHMONITOR_GAMEOBJUPDATE_BACKOFF : If set to 1, then the server will detect when responsiveness is poor due to excessive server load.  If the server appears to be overloaded, then the ACR (ACR_HealthMonitor) will increase the time between game world updates sent to game clients.  This frees up a significant amount of CPU time for other tasks on the server, preserving responsiveness (but players will see course corrections or other movement changes less frequently).  If the server is performing well, the game world update timer is reduced to its default value.  This setting can be globally configured via the database config table.&lt;br /&gt;
&lt;br /&gt;
; int ACR_SERVER_IPC_DISABLE_LATENCY_CHECK : If set to 1, then the server won't periodically, about every 30 seconds, refresh the player to server ping times of connected players (players can check their ping with #ping if this feature isn't enabled).&lt;br /&gt;
&lt;br /&gt;
; int ACR_MODULERESOURCEFILES : If set to 1, then the server will record each resource file present within the module proper in the server_resource_files table.  This setting can be globally configured via the database config table.&lt;br /&gt;
&lt;br /&gt;
=== Recommended Module Default Settings ===&lt;br /&gt;
: int ACR_PLAYER_LOCATIONS = 1&lt;br /&gt;
: int ACR_HEALTHMONITOR_GAMEOBJUPDATE_BACKOFF = 1&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Global (database config table) Configuration Settings ==&lt;br /&gt;
These settings are stored in the &amp;quot;config&amp;quot; table in the database, which is a key/value pair mapping.  They change the behavior of all modules connected to the database.&lt;br /&gt;
&lt;br /&gt;
; PlayerPassword : This setting contains the player password that is used when portaling a player between servers.  It '''must''' match the configured player password value on all servers.  Changing this setting doesn't actually change the player password required to connect to a server (which has to be done separately), just what password is used for outbound portals.  This setting is updated every 5 minutes while a server is running.&lt;br /&gt;
&lt;br /&gt;
; ACR_DISABLE_STATISTICS : If set to 1, this setting turns off stat_counters table updates on all servers by setting the ACR_DISABLE_STATISTICS module local variable to 1 during server startup.  This setting is only updated at module startup time.&lt;br /&gt;
&lt;br /&gt;
; GameObjUpdateBackoff : If set to 1, this setting enables game world update timer management by setting the ACR_HEALTHMONITOR_GAMEOBJUPDATE_BACKOFF module local variable to 1 during server startup.  This setting is only updated at module startup time.&lt;br /&gt;
&lt;br /&gt;
; RestartWatchdogTimeout : The number of second after which a remote server restart request, from the Restart Server tool, forcibly terminates the server if a clean shutdown hasn't happened yet.  This setting is designed to allow a server that is deadlocked or hung to be forcibly restarted remotely (as the remote restart mechanism uses a dedicated thread that is more likely to be responsive even if the main server thread is stuck).  If not set or set to zero, then the restart watchdog feature isn't used on remote restart requests.  This setting is updated every 5 minutes while a server is running.&lt;br /&gt;
&lt;br /&gt;
; AccountAssociationSecret : The shared secret string used to generate the URL to send the user to for linking their in-game community account with their ALFA forum account.  The value can be any string (hopefully a relatively random one). The forum system uses the shared secret to validate that URLs containing account linking information were only generated by an authorized source, like a live server.  More details on the account association system can be found [http://www.alandfaraway.org/forums/viewtopic.php?f=95&amp;amp;amp;t=47302 here]. This setting is updated every 5 minutes while a server is running.&lt;br /&gt;
&lt;br /&gt;
; ModuleResourceFiles : If set to 1, this setting enables module resource file logging by setting the ACR_MODULERESOURCEFILES module local variable to 1 during server startup.  This setting is only updated at module startup time.&lt;br /&gt;
&lt;br /&gt;
; AccountAssociationUrl : The base URL of the ALFA account association web service.  This setting is updated every 5 minutes while a server is running.&lt;br /&gt;
&lt;br /&gt;
; GetHostnameUrl : The base URL of the ALFA get hostname web service.  This setting is updated every 5 minutes while a server is running.&lt;br /&gt;
&lt;br /&gt;
; ContentPatchPath : The path relative to the Azure updater root container (formerly the sshfs mount point) to use as the base location for content patch files.  Content patch files are stored under &amp;lt;Azure updater roto container&amp;gt;/ContentPatchPath/&amp;lt;HakVersion&amp;gt;/.  Any \ characters in this path are automatically converted into / characters for the Azure updater.  This value should generally be set to ACR_ContentPatches\Global.  This setting is only updated at module startup time.&lt;br /&gt;
&lt;br /&gt;
; DefaultIrcGatewayId : The default IRC gateway to use for server-to-IRC messages.  Typically, this should be zero, which is the IRC gateway ID customarily used by the production ALFA IRC bot.  The setting is paired with an ALFA IRC Bot instance's IRCGateway config.xml entry.  This setting is updated every 5 minutes while a server is running.&lt;br /&gt;
&lt;br /&gt;
; DefaultIrcRecipient : The default IRC recipient (i.e. channel) to use for server-to-IRC messages.  Typically, this should be #alfa-players.  This setting is updated every 5 minutes while a server is running.&lt;br /&gt;
&lt;br /&gt;
; WerDisabled : If set to 1, Windows Error Reporting is disabled for nwn2server.exe.  This setting is only updated at module startup time.&lt;br /&gt;
&lt;br /&gt;
; DisableSaveInQuarantine : If set to 1, character files are not saved by a player in quarantine (preventing a pending save from an offline server from accidentally being overwritten by logging in to the wrong server).  This is updated every 5 minutes while a server is running.&lt;br /&gt;
&lt;br /&gt;
; CompilerOptions : Compiler options that the content patcher system uses when a module recompile is required by a content hotfix.  This is usually set to &amp;quot;-e -o -v1.70 -y&amp;quot;, to match the option set used by the ACR build system (in NWScript.mk) and to continue past scripts that fail to compile, as some modules have non-compileable scripts checked in.&lt;br /&gt;
&lt;br /&gt;
; NotifyServiceCid : The character ID of the dummy character that is used to send notification messages from infrastructure to the IRC gateway.  Typically, this should be the dedicated NotifyService character (CID 3905).  This is used, for example, by the content patcher, so as to send notifications as to server restarts due to the content patch system.  If set to zero, messages are not sent to the IRC gateway.  Infrastructure messages are sent to the default IRC recipient as configured by the DefaultIrcRecipient config table variable.&lt;br /&gt;
&lt;br /&gt;
; ErrorNotifyIrcRecipient : The default IRC recipient (i.e. channel) to use for diagnostic and error reports sent via server-to-IRC messages.  Typically, this should be #alfa-tech.  This setting is updated every 5 minutes while a server is running.&lt;br /&gt;
&lt;br /&gt;
; GameDifficultyLevel : The game difficulty level that all servers will be configured to. This is an integer value that should match the value of one of the GAME_DIFFICULTY_* nwscript.nss constants, and should generally be set to 3 (meaning GAME_DIFFICULTY_CORE_RULES). If a server has an incorrect difficulty level, the ACR system will automatically adjust it to the target, global difficulty level specified with this variable.&lt;br /&gt;
&lt;br /&gt;
; ProtectionLevel : The anti-abuse protection level that all servers adhere to (an integer).  Each protection level represents an incremental anti-abuse defense over the previous level.  Protection levels can be applied in the case of an abuse event, but generally the system should run at ProtectionLevel 0 (the default, no special restrictions).  Valid values correspond to the following table (the value should be set to the integer on the left, the symbolic constant in script source code is supplied in parenthesis):&lt;br /&gt;
# (MEMBER_PROTECTION_LEVEL_OPEN):  The default, no special anti-abuse provisions for non-member accounts.&lt;br /&gt;
# (MEMBER_PROTECTION_LEVEL_QUARANTINE):  Non-member accounts are immediately quarantined on login.&lt;br /&gt;
# (MEMBER_PROTECTION_LEVEL_QUARANTINE_DM_ONLY_TELLS):  Non-member accounts are immediately quarantined on login and the only function permitted in-game is to send a tell to a DM (no cross-server tells, no IRC gateway use, no (non-DM) player tells, etc.).&lt;br /&gt;
# (MEMBER_PROTECTION_LEVEL_BOOT_5S_DELAY):  Non-member accounts are quarantined, can't use tells (even to a DM), and are booted after 5 seconds.  A short message explaining that the player should fill out the application form at [http://www.alandfaraway.org http://www.alandfaraway.org] is displayed before the player is booted.&lt;br /&gt;
# (MEMBER_PROTECTION_LEVEL_BOOT_IMMEDIATELY): Non-member accounts are immediately booted on log in and can't perform any function in-game whatsoever.  No appreciable delay even to send an explanation as to what happened is allowed for, for use in extreme abuse events only.&lt;br /&gt;
: This setting is updated every 5 minutes while a server is running.&lt;br /&gt;
&lt;br /&gt;
; VaultConnectionString : The Azure Storage connection string for the server vault. This setting is updated every 5 minutes while a server is running.&lt;br /&gt;
&lt;br /&gt;
; UpdateConnectionString : The Azure Storage connection string for the ACR updater. This setting is updated every 5 minutes while a server is running.&lt;br /&gt;
&lt;br /&gt;
; VerboseVaultLogging : If set to 1, detailed log messages about the Azure ServerVaultConnector are logged to the main server log file.  This setting is normally left as 0.  This is updated every 5 minutes while a server is running.&lt;/div&gt;</summary>
		<author><name>Basilica</name></author>	</entry>

	<entry>
		<id>https://www.alandfaraway.info/Wiki/index.php?title=ACR_Configuration_Settings&amp;diff=2640</id>
		<title>ACR Configuration Settings</title>
		<link rel="alternate" type="text/html" href="https://www.alandfaraway.info/Wiki/index.php?title=ACR_Configuration_Settings&amp;diff=2640"/>
				<updated>2014-08-10T20:11:07Z</updated>
		
		<summary type="html">&lt;p&gt;Basilica: /* Global (database config table) Configuration Settings */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Technical Manuals]]&lt;br /&gt;
There are several configuration settings that alter the behavior of the ACR on a global or per-module basis.&lt;br /&gt;
&lt;br /&gt;
Global settings are stored in the &amp;quot;config&amp;quot; table in the database, whereas per-module settings are stored as module local variables that are intended to be configured in the toolset.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Module local variable configuration settings ==&lt;br /&gt;
These settings are stored as local variables on the module.  They can be set by the toolset.&lt;br /&gt;
&lt;br /&gt;
; int ACR_PLAYER_LOCATIONS : If set to 1, the PC Tools button that allows a player to see what areas their party members are in is enabled.  '''This feature is defunct and doesn't do anything right now.'''&lt;br /&gt;
&lt;br /&gt;
; int ACR_DISABLE_STATISTICS : If set to 1, then the ACR doesn't update the stat_counters table in the database.  This feature is primarily in place to allow statistics to be disabled if they proved to be a performance problem.  This setting can be globally configured via the database config table.&lt;br /&gt;
&lt;br /&gt;
; int ACR_HEALTHMONITOR_GAMEOBJUPDATE_BACKOFF : If set to 1, then the server will detect when responsiveness is poor due to excessive server load.  If the server appears to be overloaded, then the ACR (ACR_HealthMonitor) will increase the time between game world updates sent to game clients.  This frees up a significant amount of CPU time for other tasks on the server, preserving responsiveness (but players will see course corrections or other movement changes less frequently).  If the server is performing well, the game world update timer is reduced to its default value.  This setting can be globally configured via the database config table.&lt;br /&gt;
&lt;br /&gt;
; int ACR_SERVER_IPC_DISABLE_LATENCY_CHECK : If set to 1, then the server won't periodically, about every 30 seconds, refresh the player to server ping times of connected players (players can check their ping with #ping if this feature isn't enabled).&lt;br /&gt;
&lt;br /&gt;
; int ACR_MODULERESOURCEFILES : If set to 1, then the server will record each resource file present within the module proper in the server_resource_files table.  This setting can be globally configured via the database config table.&lt;br /&gt;
&lt;br /&gt;
=== Recommended Module Default Settings ===&lt;br /&gt;
: int ACR_PLAYER_LOCATIONS = 1&lt;br /&gt;
: int ACR_HEALTHMONITOR_GAMEOBJUPDATE_BACKOFF = 1&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Global (database config table) Configuration Settings ==&lt;br /&gt;
These settings are stored in the &amp;quot;config&amp;quot; table in the database, which is a key/value pair mapping.  They change the behavior of all modules connected to the database.&lt;br /&gt;
&lt;br /&gt;
; PlayerPassword : This setting contains the player password that is used when portaling a player between servers.  It '''must''' match the configured player password value on all servers.  Changing this setting doesn't actually change the player password required to connect to a server (which has to be done separately), just what password is used for outbound portals.  This setting is updated every 5 minutes while a server is running.&lt;br /&gt;
&lt;br /&gt;
; ACR_DISABLE_STATISTICS : If set to 1, this setting turns off stat_counters table updates on all servers by setting the ACR_DISABLE_STATISTICS module local variable to 1 during server startup.  This setting is only updated at module startup time.&lt;br /&gt;
&lt;br /&gt;
; GameObjUpdateBackoff : If set to 1, this setting enables game world update timer management by setting the ACR_HEALTHMONITOR_GAMEOBJUPDATE_BACKOFF module local variable to 1 during server startup.  This setting is only updated at module startup time.&lt;br /&gt;
&lt;br /&gt;
; RestartWatchdogTimeout : The number of second after which a remote server restart request, from the Restart Server tool, forcibly terminates the server if a clean shutdown hasn't happened yet.  This setting is designed to allow a server that is deadlocked or hung to be forcibly restarted remotely (as the remote restart mechanism uses a dedicated thread that is more likely to be responsive even if the main server thread is stuck).  If not set or set to zero, then the restart watchdog feature isn't used on remote restart requests.  This setting is updated every 5 minutes while a server is running.&lt;br /&gt;
&lt;br /&gt;
; AccountAssociationSecret : The shared secret string used to generate the URL to send the user to for linking their in-game community account with their ALFA forum account.  The value can be any string (hopefully a relatively random one). The forum system uses the shared secret to validate that URLs containing account linking information were only generated by an authorized source, like a live server.  More details on the account association system can be found [http://www.alandfaraway.org/forums/viewtopic.php?f=95&amp;amp;amp;t=47302 here]. This setting is updated every 5 minutes while a server is running.&lt;br /&gt;
&lt;br /&gt;
; ModuleResourceFiles : If set to 1, this setting enables module resource file logging by setting the ACR_MODULERESOURCEFILES module local variable to 1 during server startup.  This setting is only updated at module startup time.&lt;br /&gt;
&lt;br /&gt;
; AccountAssociationUrl : The base URL of the ALFA account association web service.  This setting is updated every 5 minutes while a server is running.&lt;br /&gt;
&lt;br /&gt;
; GetHostnameUrl : The base URL of the ALFA get hostname web service.  This setting is updated every 5 minutes while a server is running.&lt;br /&gt;
&lt;br /&gt;
; ContentPatchPath : The path relative to the Azure updater root container (formerly the sshfs mount point) to use as the base location for content patch files.  Content patch files are stored under &amp;lt;Azure updater roto container&amp;gt;/ContentPatchPath/&amp;lt;HakVersion&amp;gt;/.  Any \ characters in this path are automatically converted into / characters for the Azure updater.  This setting is only updated at module startup time.&lt;br /&gt;
&lt;br /&gt;
; DefaultIrcGatewayId : The default IRC gateway to use for server-to-IRC messages.  Typically, this should be zero, which is the IRC gateway ID customarily used by the production ALFA IRC bot.  The setting is paired with an ALFA IRC Bot instance's IRCGateway config.xml entry.  This setting is updated every 5 minutes while a server is running.&lt;br /&gt;
&lt;br /&gt;
; DefaultIrcRecipient : The default IRC recipient (i.e. channel) to use for server-to-IRC messages.  Typically, this should be #alfa-players.  This setting is updated every 5 minutes while a server is running.&lt;br /&gt;
&lt;br /&gt;
; WerDisabled : If set to 1, Windows Error Reporting is disabled for nwn2server.exe.  This setting is only updated at module startup time.&lt;br /&gt;
&lt;br /&gt;
; DisableSaveInQuarantine : If set to 1, character files are not saved by a player in quarantine (preventing a pending save from an offline server from accidentally being overwritten by logging in to the wrong server).  This is updated every 5 minutes while a server is running.&lt;br /&gt;
&lt;br /&gt;
; CompilerOptions : Compiler options that the content patcher system uses when a module recompile is required by a content hotfix.  This is usually set to &amp;quot;-e -o -v1.70 -y&amp;quot;, to match the option set used by the ACR build system (in NWScript.mk) and to continue past scripts that fail to compile, as some modules have non-compileable scripts checked in.&lt;br /&gt;
&lt;br /&gt;
; NotifyServiceCid : The character ID of the dummy character that is used to send notification messages from infrastructure to the IRC gateway.  Typically, this should be the dedicated NotifyService character (CID 3905).  This is used, for example, by the content patcher, so as to send notifications as to server restarts due to the content patch system.  If set to zero, messages are not sent to the IRC gateway.  Infrastructure messages are sent to the default IRC recipient as configured by the DefaultIrcRecipient config table variable.&lt;br /&gt;
&lt;br /&gt;
; ErrorNotifyIrcRecipient : The default IRC recipient (i.e. channel) to use for diagnostic and error reports sent via server-to-IRC messages.  Typically, this should be #alfa-tech.  This setting is updated every 5 minutes while a server is running.&lt;br /&gt;
&lt;br /&gt;
; GameDifficultyLevel : The game difficulty level that all servers will be configured to. This is an integer value that should match the value of one of the GAME_DIFFICULTY_* nwscript.nss constants, and should generally be set to 3 (meaning GAME_DIFFICULTY_CORE_RULES). If a server has an incorrect difficulty level, the ACR system will automatically adjust it to the target, global difficulty level specified with this variable.&lt;br /&gt;
&lt;br /&gt;
; ProtectionLevel : The anti-abuse protection level that all servers adhere to (an integer).  Each protection level represents an incremental anti-abuse defense over the previous level.  Protection levels can be applied in the case of an abuse event, but generally the system should run at ProtectionLevel 0 (the default, no special restrictions).  Valid values correspond to the following table (the value should be set to the integer on the left, the symbolic constant in script source code is supplied in parenthesis):&lt;br /&gt;
# (MEMBER_PROTECTION_LEVEL_OPEN):  The default, no special anti-abuse provisions for non-member accounts.&lt;br /&gt;
# (MEMBER_PROTECTION_LEVEL_QUARANTINE):  Non-member accounts are immediately quarantined on login.&lt;br /&gt;
# (MEMBER_PROTECTION_LEVEL_QUARANTINE_DM_ONLY_TELLS):  Non-member accounts are immediately quarantined on login and the only function permitted in-game is to send a tell to a DM (no cross-server tells, no IRC gateway use, no (non-DM) player tells, etc.).&lt;br /&gt;
# (MEMBER_PROTECTION_LEVEL_BOOT_5S_DELAY):  Non-member accounts are quarantined, can't use tells (even to a DM), and are booted after 5 seconds.  A short message explaining that the player should fill out the application form at [http://www.alandfaraway.org http://www.alandfaraway.org] is displayed before the player is booted.&lt;br /&gt;
# (MEMBER_PROTECTION_LEVEL_BOOT_IMMEDIATELY): Non-member accounts are immediately booted on log in and can't perform any function in-game whatsoever.  No appreciable delay even to send an explanation as to what happened is allowed for, for use in extreme abuse events only.&lt;br /&gt;
: This setting is updated every 5 minutes while a server is running.&lt;br /&gt;
&lt;br /&gt;
; VaultConnectionString : The Azure Storage connection string for the server vault. This setting is updated every 5 minutes while a server is running.&lt;br /&gt;
&lt;br /&gt;
; UpdateConnectionString : The Azure Storage connection string for the ACR updater. This setting is updated every 5 minutes while a server is running.&lt;br /&gt;
&lt;br /&gt;
; VerboseVaultLogging : If set to 1, detailed log messages about the Azure ServerVaultConnector are logged to the main server log file.  This setting is normally left as 0.  This is updated every 5 minutes while a server is running.&lt;/div&gt;</summary>
		<author><name>Basilica</name></author>	</entry>

	<entry>
		<id>https://www.alandfaraway.info/Wiki/index.php?title=ACR_Configuration_Settings&amp;diff=2639</id>
		<title>ACR Configuration Settings</title>
		<link rel="alternate" type="text/html" href="https://www.alandfaraway.info/Wiki/index.php?title=ACR_Configuration_Settings&amp;diff=2639"/>
				<updated>2014-08-10T18:22:16Z</updated>
		
		<summary type="html">&lt;p&gt;Basilica: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Technical Manuals]]&lt;br /&gt;
There are several configuration settings that alter the behavior of the ACR on a global or per-module basis.&lt;br /&gt;
&lt;br /&gt;
Global settings are stored in the &amp;quot;config&amp;quot; table in the database, whereas per-module settings are stored as module local variables that are intended to be configured in the toolset.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Module local variable configuration settings ==&lt;br /&gt;
These settings are stored as local variables on the module.  They can be set by the toolset.&lt;br /&gt;
&lt;br /&gt;
; int ACR_PLAYER_LOCATIONS : If set to 1, the PC Tools button that allows a player to see what areas their party members are in is enabled.  '''This feature is defunct and doesn't do anything right now.'''&lt;br /&gt;
&lt;br /&gt;
; int ACR_DISABLE_STATISTICS : If set to 1, then the ACR doesn't update the stat_counters table in the database.  This feature is primarily in place to allow statistics to be disabled if they proved to be a performance problem.  This setting can be globally configured via the database config table.&lt;br /&gt;
&lt;br /&gt;
; int ACR_HEALTHMONITOR_GAMEOBJUPDATE_BACKOFF : If set to 1, then the server will detect when responsiveness is poor due to excessive server load.  If the server appears to be overloaded, then the ACR (ACR_HealthMonitor) will increase the time between game world updates sent to game clients.  This frees up a significant amount of CPU time for other tasks on the server, preserving responsiveness (but players will see course corrections or other movement changes less frequently).  If the server is performing well, the game world update timer is reduced to its default value.  This setting can be globally configured via the database config table.&lt;br /&gt;
&lt;br /&gt;
; int ACR_SERVER_IPC_DISABLE_LATENCY_CHECK : If set to 1, then the server won't periodically, about every 30 seconds, refresh the player to server ping times of connected players (players can check their ping with #ping if this feature isn't enabled).&lt;br /&gt;
&lt;br /&gt;
; int ACR_MODULERESOURCEFILES : If set to 1, then the server will record each resource file present within the module proper in the server_resource_files table.  This setting can be globally configured via the database config table.&lt;br /&gt;
&lt;br /&gt;
=== Recommended Module Default Settings ===&lt;br /&gt;
: int ACR_PLAYER_LOCATIONS = 1&lt;br /&gt;
: int ACR_HEALTHMONITOR_GAMEOBJUPDATE_BACKOFF = 1&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Global (database config table) Configuration Settings ==&lt;br /&gt;
These settings are stored in the &amp;quot;config&amp;quot; table in the database, which is a key/value pair mapping.  They change the behavior of all modules connected to the database.&lt;br /&gt;
&lt;br /&gt;
; PlayerPassword : This setting contains the player password that is used when portaling a player between servers.  It '''must''' match the configured player password value on all servers.  Changing this setting doesn't actually change the player password required to connect to a server (which has to be done separately), just what password is used for outbound portals.  This setting is updated every 5 minutes while a server is running.&lt;br /&gt;
&lt;br /&gt;
; ACR_DISABLE_STATISTICS : If set to 1, this setting turns off stat_counters table updates on all servers by setting the ACR_DISABLE_STATISTICS module local variable to 1 during server startup.  This setting is only updated at module startup time.&lt;br /&gt;
&lt;br /&gt;
; GameObjUpdateBackoff : If set to 1, this setting enables game world update timer management by setting the ACR_HEALTHMONITOR_GAMEOBJUPDATE_BACKOFF module local variable to 1 during server startup.  This setting is only updated at module startup time.&lt;br /&gt;
&lt;br /&gt;
; RestartWatchdogTimeout : The number of second after which a remote server restart request, from the Restart Server tool, forcibly terminates the server if a clean shutdown hasn't happened yet.  This setting is designed to allow a server that is deadlocked or hung to be forcibly restarted remotely (as the remote restart mechanism uses a dedicated thread that is more likely to be responsive even if the main server thread is stuck).  If not set or set to zero, then the restart watchdog feature isn't used on remote restart requests.  This setting is updated every 5 minutes while a server is running.&lt;br /&gt;
&lt;br /&gt;
; AccountAssociationSecret : The shared secret string used to generate the URL to send the user to for linking their in-game community account with their ALFA forum account.  The value can be any string (hopefully a relatively random one). The forum system uses the shared secret to validate that URLs containing account linking information were only generated by an authorized source, like a live server.  More details on the account association system can be found [http://www.alandfaraway.org/forums/viewtopic.php?f=95&amp;amp;amp;t=47302 here]. This setting is updated every 5 minutes while a server is running.&lt;br /&gt;
&lt;br /&gt;
; ModuleResourceFiles : If set to 1, this setting enables module resource file logging by setting the ACR_MODULERESOURCEFILES module local variable to 1 during server startup.  This setting is only updated at module startup time.&lt;br /&gt;
&lt;br /&gt;
; AccountAssociationUrl : The base URL of the ALFA account association web service.  This setting is updated every 5 minutes while a server is running.&lt;br /&gt;
&lt;br /&gt;
; GetHostnameUrl : The base URL of the ALFA get hostname web service.  This setting is updated every 5 minutes while a server is running.&lt;br /&gt;
&lt;br /&gt;
; ContentPatchPath : The path relative to the sshfs mount point to use as the base location for content patch files.  Content patch files are stored under &amp;lt;sshfs_mount&amp;gt;\ContentPatchPath\&amp;lt;HakVersion&amp;gt;\.  This setting is only updated at module startup time.&lt;br /&gt;
&lt;br /&gt;
; DefaultIrcGatewayId : The default IRC gateway to use for server-to-IRC messages.  Typically, this should be zero, which is the IRC gateway ID customarily used by the production ALFA IRC bot.  The setting is paired with an ALFA IRC Bot instance's IRCGateway config.xml entry.  This setting is updated every 5 minutes while a server is running.&lt;br /&gt;
&lt;br /&gt;
; DefaultIrcRecipient : The default IRC recipient (i.e. channel) to use for server-to-IRC messages.  Typically, this should be #alfa-players.  This setting is updated every 5 minutes while a server is running.&lt;br /&gt;
&lt;br /&gt;
; WerDisabled : If set to 1, Windows Error Reporting is disabled for nwn2server.exe.  This setting is only updated at module startup time.&lt;br /&gt;
&lt;br /&gt;
; DisableSaveInQuarantine : If set to 1, character files are not saved by a player in quarantine (preventing a pending save from an offline server from accidentally being overwritten by logging in to the wrong server).  This is updated every 5 minutes while a server is running.&lt;br /&gt;
&lt;br /&gt;
; CompilerOptions : Compiler options that the content patcher system uses when a module recompile is required by a content hotfix.  This is usually set to &amp;quot;-e -o -v1.70 -y&amp;quot;, to match the option set used by the ACR build system (in NWScript.mk) and to continue past scripts that fail to compile, as some modules have non-compileable scripts checked in.&lt;br /&gt;
&lt;br /&gt;
; NotifyServiceCid : The character ID of the dummy character that is used to send notification messages from infrastructure to the IRC gateway.  Typically, this should be the dedicated NotifyService character (CID 3905).  This is used, for example, by the content patcher, so as to send notifications as to server restarts due to the content patch system.  If set to zero, messages are not sent to the IRC gateway.  Infrastructure messages are sent to the default IRC recipient as configured by the DefaultIrcRecipient config table variable.&lt;br /&gt;
&lt;br /&gt;
; ErrorNotifyIrcRecipient : The default IRC recipient (i.e. channel) to use for diagnostic and error reports sent via server-to-IRC messages.  Typically, this should be #alfa-tech.  This setting is updated every 5 minutes while a server is running.&lt;br /&gt;
&lt;br /&gt;
; GameDifficultyLevel : The game difficulty level that all servers will be configured to. This is an integer value that should match the value of one of the GAME_DIFFICULTY_* nwscript.nss constants, and should generally be set to 3 (meaning GAME_DIFFICULTY_CORE_RULES). If a server has an incorrect difficulty level, the ACR system will automatically adjust it to the target, global difficulty level specified with this variable.&lt;br /&gt;
&lt;br /&gt;
; ProtectionLevel : The anti-abuse protection level that all servers adhere to (an integer).  Each protection level represents an incremental anti-abuse defense over the previous level.  Protection levels can be applied in the case of an abuse event, but generally the system should run at ProtectionLevel 0 (the default, no special restrictions).  Valid values correspond to the following table (the value should be set to the integer on the left, the symbolic constant in script source code is supplied in parenthesis):&lt;br /&gt;
# (MEMBER_PROTECTION_LEVEL_OPEN):  The default, no special anti-abuse provisions for non-member accounts.&lt;br /&gt;
# (MEMBER_PROTECTION_LEVEL_QUARANTINE):  Non-member accounts are immediately quarantined on login.&lt;br /&gt;
# (MEMBER_PROTECTION_LEVEL_QUARANTINE_DM_ONLY_TELLS):  Non-member accounts are immediately quarantined on login and the only function permitted in-game is to send a tell to a DM (no cross-server tells, no IRC gateway use, no (non-DM) player tells, etc.).&lt;br /&gt;
# (MEMBER_PROTECTION_LEVEL_BOOT_5S_DELAY):  Non-member accounts are quarantined, can't use tells (even to a DM), and are booted after 5 seconds.  A short message explaining that the player should fill out the application form at [http://www.alandfaraway.org http://www.alandfaraway.org] is displayed before the player is booted.&lt;br /&gt;
# (MEMBER_PROTECTION_LEVEL_BOOT_IMMEDIATELY): Non-member accounts are immediately booted on log in and can't perform any function in-game whatsoever.  No appreciable delay even to send an explanation as to what happened is allowed for, for use in extreme abuse events only.&lt;br /&gt;
: This setting is updated every 5 minutes while a server is running.&lt;br /&gt;
&lt;br /&gt;
; VaultConnectionString : The Azure Storage connection string for the server vault. This setting is updated every 5 minutes while a server is running.&lt;br /&gt;
&lt;br /&gt;
; UpdateConnectionString : The Azure Storage connection string for the ACR updater. This setting is updated every 5 minutes while a server is running.&lt;br /&gt;
&lt;br /&gt;
; VerboseVaultLogging : If set to 1, detailed log messages about the Azure ServerVaultConnector are logged to the main server log file.  This setting is normally left as 0.  This is updated every 5 minutes while a server is running.&lt;/div&gt;</summary>
		<author><name>Basilica</name></author>	</entry>

	<entry>
		<id>https://www.alandfaraway.info/Wiki/index.php?title=Creating_a_Content_Patch&amp;diff=2638</id>
		<title>Creating a Content Patch</title>
		<link rel="alternate" type="text/html" href="https://www.alandfaraway.info/Wiki/index.php?title=Creating_a_Content_Patch&amp;diff=2638"/>
				<updated>2014-08-10T06:11:33Z</updated>
		
		<summary type="html">&lt;p&gt;Basilica: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Technical Manuals]]&lt;br /&gt;
ACR 1.87 supports the creation and deployment of '''content patches''', which are server-side hotfixes that are automatically deployed to live servers on startup.  The content patch system is intended to make it easier to deploy important bugfixes to an already released ACR version.&lt;br /&gt;
&lt;br /&gt;
Content patches can be used to perform the following tasks:&lt;br /&gt;
* Place a file in the Override directory for the server.  Note that module and hak resources supersede &amp;quot;Override&amp;quot; resources (but Override supersedes in-box .zip files and can be used to deploy a new script that could be called by a hak, etc.).  Override-targetted content patch files go in &amp;quot;override\ACR_ContentPatches&amp;quot; on each live server.&lt;br /&gt;
* Place an updated hak in the Hak directory for the server (for example, alfa2_acr.hak).&lt;br /&gt;
* Recompile module scripts.&lt;br /&gt;
* Patch moduledownloaderresources.xml with new hak file download information for game clients (module specific downloader resources are left as-is).&lt;br /&gt;
&lt;br /&gt;
Content patches '''cannot''' be used to make client-side content changes (those must go through the standard release process).  As of ACR 1.90, the content patch system can recompile all module scripts (if the RecompileModule database column is set for a content_patch_files row that required updating), if necessary.  This facility can be used to update includes in the ACR hak and recompile scripts in a module that reference the include.&lt;br /&gt;
&lt;br /&gt;
Content patches automatically update the downloader XML for a server.  Server admins should be careful to not restage haks that have been hotfixed by the content patch system (typically, alfa2_acr.hak), but if any of the downloader XML descriptors for noticed files were incorrect, the server will correct these on next startup (incurring an additional server process restart).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Content Patch Components ==&lt;br /&gt;
A content patch contains several distinct components which must be assembled:&lt;br /&gt;
* The content files to patch (e.g. alfa2_acr.hak, or a free-standing file to place in the Override directory).  Any number of files can theoretically be content patched, but you're encouraged to keep the set of file small.  The content files must be placed on the central server vault, in a special directory, for them to be downloadable by the content patch system.&lt;br /&gt;
* A set of database entries in the '''content_patch_files''' table that describe what ACR hak version the patch applies to (e.g. 1.87), and what file is associated with the patch.  You need a database record for each file that is contained within the content patch.&lt;br /&gt;
* An optional initialization script, called &amp;quot;acr_patch_initialize&amp;quot;.  If present, this script is run during module startup, to provide opportunity for a content patch to hook script callbacks or set things up.  The script is never located in the ACR hak or the module, but should only be distributed as a content_patch_files record.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Creating a Content Patch ==&lt;br /&gt;
The following is a checklist of the steps necessary to build and deploy a content patch.  Once deployed, it will be automatically picked up by live servers on their next restart.  (If necessary, you can remotely restart a server using the Restart Server tool.)&lt;br /&gt;
&lt;br /&gt;
# First, create the content files to patch.  For example, the fixed script or the patched ACR hak.  Typically this would be done by checking out the ACR branch for the released ACR version to be patched, making the necessary changes and checking them in to the repository, and then rebuilding the hak from that branch.&lt;br /&gt;
# Next, copy the patched content files to the Azure updater using the UpdaterConnectionString (formerly, the files were placed on the central vault).  They should go under ACR_ContentPatches/Global/&amp;lt;ACR_Version&amp;gt; on the updater Azure storage (for example ACR_ContentPatches/Global/1.87 for an ACR 1.87 patch).  [http://aka.ms/AzCopy AzCopy] can be used to upload content patch files.  Optionally, and recommended, content patch file hosted on Azure storage can be gzip compressed (append .gzip to the filename uploaded to Azure, e.g. alfa2_acr.hak.gzip after compressing with gzip.exe).  Compression was not supported for updates distributed by the central vault, though that method is deprecated.  Remember that Azure storage is case sensitive, so path cases must match exactly.&lt;br /&gt;
# Generate a md5 checksum of each of the patched content files.  The md5sum utility (included with msysgit - [http://code.google.com/p/msysgit/ http://code.google.com/p/msysgit/] - or cygwin, can do this).  You'll need these checksums to insert into the database in the next step.  If compressed files were stored on Azure storage, the checksum must be that of the uncompressed file.&lt;br /&gt;
# Create a database record in content_patch_files for each file present in the content patch.&lt;br /&gt;
## Set the '''FileName''' column to the name of the file to patch (with extension, no spaces, for example &amp;quot;alfa2_acr.hak&amp;quot;).  This should not include the .gzip appended for compressed content patches, rather it should reflect the final on disk filename of the content to update.&lt;br /&gt;
## Set the '''HakVersion''' column based on the ACR version that is matched when deciding whether the content patch is applicable (for example, &amp;quot;1.87&amp;quot;).&lt;br /&gt;
## Set the '''Location''' column to either &amp;quot;override&amp;quot; or &amp;quot;hak&amp;quot;, depending on where the content file should be stored on live servers.&lt;br /&gt;
## Set the '''Checksum''' column to the md5sum value (32 hex characters) for the file that is being patched.&lt;br /&gt;
## Set the '''RecompileModule''' column to true if the module needs to have all scripts recompiled, else false if a recompile is not required.  A recompile is generally only necessary if an include in the ACR HAK has been changed and the include is referenced by a script distributed with the module.  This option is only supported in ACR 1.90 or higher (otherwise the module is never recompiled).&lt;br /&gt;
# Connect a test server to the database and central server vault, and restart it.  Check the log to make sure that the content patch applied successfully; the server should restart a second time after applying the patches.  There will be server log entries containing &amp;quot;ModuleContentPatcher&amp;quot; updating you with the status of content patches as they're applied.&lt;br /&gt;
&lt;br /&gt;
It is highly recommended that you test the content patch on a test server before copying the patch data to the live server.  You should still verify that the patch applied correctly to a live server, however, once the patch has been deployed to production.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Content Patches and the Standard Release Process ==&lt;br /&gt;
The content patch system ensures that patches are tagged with a specific ACR version that they apply to.  When a server upgrades to a new ACR version, using the standard release process, previous content patches will no longer be applicable and won't be applied anymore.&lt;br /&gt;
&lt;br /&gt;
For content patch files located in the &amp;quot;hak&amp;quot; directory, no action is taken.  It's expected that if the administrator did an ACR upgrade, that they have manually upgraded the haks anyway.  (No new haks can be added with the content patch system, only hotfixes to existing haks.)&lt;br /&gt;
&lt;br /&gt;
For content patch files located in the &amp;quot;override&amp;quot; directory, the content patch system automatically removes any patch files not applicable to the ACR version the server starts up with at startup time.  Thus it's not necessary to manually clean the content patch override directory out.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Content Patch Server Log Messages ==&lt;br /&gt;
Messages in the NWN2 server log file track the progress of the content patch system. When a content patch has been successfully applied, a log message of the form '''&amp;quot;ModuleContentPatcher.ProcessContentPatches: Successfully updated content patch file &amp;lt;filename&amp;gt;.&amp;quot;''' will be written to the server log. Log messages related to the content patcher can be easily identified by searching for '''ModuleContentPatcher''' in the log file. To verify that a content patch was deployed successfully, examine the server log after a server restart. Be sure to check the log message timestamp; it is usually best to start searching from the end of the server log file.&lt;br /&gt;
&lt;br /&gt;
If a content patch requests a module script recompile, then the console output of the script compiler is printed to the server log file.  An error message prefixed with the standard '''ModuleContentPatcher''' prefix is printed to the server log if any scripts failed to compile.&lt;/div&gt;</summary>
		<author><name>Basilica</name></author>	</entry>

	<entry>
		<id>https://www.alandfaraway.info/Wiki/index.php?title=Creating_a_Content_Patch&amp;diff=2637</id>
		<title>Creating a Content Patch</title>
		<link rel="alternate" type="text/html" href="https://www.alandfaraway.info/Wiki/index.php?title=Creating_a_Content_Patch&amp;diff=2637"/>
				<updated>2014-08-10T06:09:45Z</updated>
		
		<summary type="html">&lt;p&gt;Basilica: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Technical Manuals]]&lt;br /&gt;
ACR 1.87 supports the creation and deployment of '''content patches''', which are server-side hotfixes that are automatically deployed to live servers on startup.  The content patch system is intended to make it easier to deploy important bugfixes to an already released ACR version.&lt;br /&gt;
&lt;br /&gt;
Content patches can be used to perform the following tasks:&lt;br /&gt;
* Place a file in the Override directory for the server.  Note that module and hak resources supersede &amp;quot;Override&amp;quot; resources (but Override supersedes in-box .zip files and can be used to deploy a new script that could be called by a hak, etc.).  Override-targetted content patch files go in &amp;quot;override\ACR_ContentPatches&amp;quot; on each live server.&lt;br /&gt;
* Place an updated hak in the Hak directory for the server (for example, alfa2_acr.hak).&lt;br /&gt;
* Recompile module scripts.&lt;br /&gt;
* Patch moduledownloaderresources.xml with new hak file download information for game clients (module specific downloader resources are left as-is).&lt;br /&gt;
&lt;br /&gt;
Content patches '''cannot''' be used to make client-side content changes (those must go through the standard release process).  As of ACR 1.90, the content patch system can recompile all module scripts (if the RecompileModule database column is set for a content_patch_files row that required updating), if necessary.  This facility can be used to update includes in the ACR hak and recompile scripts in a module that reference the include.&lt;br /&gt;
&lt;br /&gt;
Content patches automatically update the downloader XML for a server.  Server admins should be careful to not restage haks that have been hotfixed by the content patch system (typically, alfa2_acr.hak), but if any of the downloader XML descriptors for noticed files were incorrect, the server will correct these on next startup (incurring an additional server process restart).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Content Patch Components ==&lt;br /&gt;
A content patch contains several distinct components which must be assembled:&lt;br /&gt;
* The content files to patch (e.g. alfa2_acr.hak, or a free-standing file to place in the Override directory).  Any number of files can theoretically be content patched, but you're encouraged to keep the set of file small.  The content files must be placed on the central server vault, in a special directory, for them to be downloadable by the content patch system.&lt;br /&gt;
* A set of database entries in the '''content_patch_files''' table that describe what ACR hak version the patch applies to (e.g. 1.87), and what file is associated with the patch.  You need a database record for each file that is contained within the content patch.&lt;br /&gt;
* An optional initialization script, called &amp;quot;acr_patch_initialize&amp;quot;.  If present, this script is run during module startup, to provide opportunity for a content patch to hook script callbacks or set things up.  The script is never located in the ACR hak or the module, but should only be distributed as a content_patch_files record.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Creating a Content Patch ==&lt;br /&gt;
The following is a checklist of the steps necessary to build and deploy a content patch.  Once deployed, it will be automatically picked up by live servers on their next restart.  (If necessary, you can remotely restart a server using the Restart Server tool.)&lt;br /&gt;
&lt;br /&gt;
# First, create the content files to patch.  For example, the fixed script or the patched ACR hak.  Typically this would be done by checking out the ACR branch for the released ACR version to be patched, making the necessary changes and checking them in to the repository, and then rebuilding the hak from that branch.&lt;br /&gt;
# Next, copy the patched content files to the Azure updater using the UpdaterConnectionString (formerly, the files were placed on the central vault).  They should go under ACR_ContentPatches/Global/&amp;lt;ACR_Version&amp;gt; on the updater Azure storage (for example ACR_ContentPatches/Global/1.87 for an ACR 1.87 patch).  [http://aka.ms/AzCopy AzCopy] can be used to upload content patch files.  Optionally, though recommended, content patch file hosted on Azure storage can be gzip compressed (append .gzip to the filename, e.g. alfa2_acr.hak.gzip after compressing with gxip.exe).  Compression was not supported for updates distributed by the central vault, though that method is deprecated.  Remember that Azure storage is case sensitive, so path cases must match exactly.&lt;br /&gt;
# Generate a md5 checksum of each of the patched content files.  The md5sum utility (included with msysgit - [http://code.google.com/p/msysgit/ http://code.google.com/p/msysgit/] - or cygwin, can do this).  You'll need these checksums to insert into the database in the next step.  If compressed files were stored on Azure storage, the checkup must be that of the uncompressed file.&lt;br /&gt;
# Create a database record in content_patch_files for each file present in the content patch.&lt;br /&gt;
## Set the '''FileName''' column to the name of the file to patch (with extension, no spaces, for example &amp;quot;alfa2_acr.hak&amp;quot;).  This should not include the .gzip appended for compressed content patches, rather it should reflect the final on disk filename of the content to update.&lt;br /&gt;
## Set the '''HakVersion''' column based on the ACR version that is matched when deciding whether the content patch is applicable (for example, &amp;quot;1.87&amp;quot;).&lt;br /&gt;
## Set the '''Location''' column to either &amp;quot;override&amp;quot; or &amp;quot;hak&amp;quot;, depending on where the content file should be stored on live servers.&lt;br /&gt;
## Set the '''Checksum''' column to the md5sum value (32 hex characters) for the file that is being patched.&lt;br /&gt;
## Set the '''RecompileModule''' column to true if the module needs to have all scripts recompiled, else false if a recompile is not required.  A recompile is generally only necessary if an include in the ACR HAK has been changed and the include is referenced by a script distributed with the module.  This option is only supported in ACR 1.90 or higher (otherwise the module is never recompiled).&lt;br /&gt;
# Connect a test server to the database and central server vault, and restart it.  Check the log to make sure that the content patch applied successfully; the server should restart a second time after applying the patches.  There will be server log entries containing &amp;quot;ModuleContentPatcher&amp;quot; updating you with the status of content patches as they're applied.&lt;br /&gt;
&lt;br /&gt;
It is highly recommended that you test the content patch on a test server before copying the patch data to the live server.  You should still verify that the patch applied correctly to a live server, however, once the patch has been deployed to production.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Content Patches and the Standard Release Process ==&lt;br /&gt;
The content patch system ensures that patches are tagged with a specific ACR version that they apply to.  When a server upgrades to a new ACR version, using the standard release process, previous content patches will no longer be applicable and won't be applied anymore.&lt;br /&gt;
&lt;br /&gt;
For content patch files located in the &amp;quot;hak&amp;quot; directory, no action is taken.  It's expected that if the administrator did an ACR upgrade, that they have manually upgraded the haks anyway.  (No new haks can be added with the content patch system, only hotfixes to existing haks.)&lt;br /&gt;
&lt;br /&gt;
For content patch files located in the &amp;quot;override&amp;quot; directory, the content patch system automatically removes any patch files not applicable to the ACR version the server starts up with at startup time.  Thus it's not necessary to manually clean the content patch override directory out.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Content Patch Server Log Messages ==&lt;br /&gt;
Messages in the NWN2 server log file track the progress of the content patch system. When a content patch has been successfully applied, a log message of the form '''&amp;quot;ModuleContentPatcher.ProcessContentPatches: Successfully updated content patch file &amp;lt;filename&amp;gt;.&amp;quot;''' will be written to the server log. Log messages related to the content patcher can be easily identified by searching for '''ModuleContentPatcher''' in the log file. To verify that a content patch was deployed successfully, examine the server log after a server restart. Be sure to check the log message timestamp; it is usually best to start searching from the end of the server log file.&lt;br /&gt;
&lt;br /&gt;
If a content patch requests a module script recompile, then the console output of the script compiler is printed to the server log file.  An error message prefixed with the standard '''ModuleContentPatcher''' prefix is printed to the server log if any scripts failed to compile.&lt;/div&gt;</summary>
		<author><name>Basilica</name></author>	</entry>

	<entry>
		<id>https://www.alandfaraway.info/Wiki/index.php?title=Creating_a_Content_Patch&amp;diff=2636</id>
		<title>Creating a Content Patch</title>
		<link rel="alternate" type="text/html" href="https://www.alandfaraway.info/Wiki/index.php?title=Creating_a_Content_Patch&amp;diff=2636"/>
				<updated>2014-08-10T06:01:28Z</updated>
		
		<summary type="html">&lt;p&gt;Basilica: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Technical Manuals]]&lt;br /&gt;
ACR 1.87 supports the creation and deployment of '''content patches''', which are server-side hotfixes that are automatically deployed to live servers on startup.  The content patch system is intended to make it easier to deploy important bugfixes to an already released ACR version.&lt;br /&gt;
&lt;br /&gt;
Content patches can be used to perform the following tasks:&lt;br /&gt;
* Place a file in the Override directory for the server.  Note that module and hak resources supersede &amp;quot;Override&amp;quot; resources (but Override supersedes in-box .zip files and can be used to deploy a new script that could be called by a hak, etc.).  Override-targetted content patch files go in &amp;quot;override\ACR_ContentPatches&amp;quot; on each live server.&lt;br /&gt;
* Place an updated hak in the Hak directory for the server (for example, alfa2_acr.hak).&lt;br /&gt;
* Recompile module scripts.&lt;br /&gt;
* Patch moduledownloaderresources.xml with new hak file download information for game clients (module specific downloader resources are left as-is).&lt;br /&gt;
&lt;br /&gt;
Content patches '''cannot''' be used to make client-side content changes (those must go through the standard release process).  As of ACR 1.90, the content patch system can recompile all module scripts (if the RecompileModule database column is set for a content_patch_files row that required updating), if necessary.  This facility can be used to update includes in the ACR hak and recompile scripts in a module that reference the include.&lt;br /&gt;
&lt;br /&gt;
Content patches automatically update the downloader XML for a server.  Server admins should be careful to not restage haks that have been hotfixed by the content patch system (typically, alfa2_acr.hak), but if any of the downloader XML descriptors for noticed files were incorrect, the server will correct these on next startup (incurring an additional server process restart).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Content Patch Components ==&lt;br /&gt;
A content patch contains several distinct components which must be assembled:&lt;br /&gt;
* The content files to patch (e.g. alfa2_acr.hak, or a free-standing file to place in the Override directory).  Any number of files can theoretically be content patched, but you're encouraged to keep the set of file small.  The content files must be placed on the central server vault, in a special directory, for them to be downloadable by the content patch system.&lt;br /&gt;
* A set of database entries in the '''content_patch_files''' table that describe what ACR hak version the patch applies to (e.g. 1.87), and what file is associated with the patch.  You need a database record for each file that is contained within the content patch.&lt;br /&gt;
* An optional initialization script, called &amp;quot;acr_patch_initialize&amp;quot;.  If present, this script is run during module startup, to provide opportunity for a content patch to hook script callbacks or set things up.  The script is never located in the ACR hak or the module, but should only be distributed as a content_patch_files record.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Creating a Content Patch ==&lt;br /&gt;
The following is a checklist of the steps necessary to build and deploy a content patch.  Once deployed, it will be automatically picked up by live servers on their next restart.  (If necessary, you can remotely restart a server using the Restart Server tool.)&lt;br /&gt;
&lt;br /&gt;
# First, create the content files to patch.  For example, the fixed script or the patched ACR hak.  Typically this would be done by checking out the ACR branch for the released ACR version to be patched, making the necessary changes and checking them in to the repository, and then rebuilding the hak from that branch.&lt;br /&gt;
# Next, copy the patched content files to the central vault.  They should go under ACR_ContentPatches\Global\&amp;lt;ACR_Version&amp;gt; on the central vault (for example ACR_ContentPatches\Global\1.87 for an ACR 1.87 patch).&lt;br /&gt;
# Generate a md5 checksum of each of the patched content files.  The md5sum utility (included with msysgit - [http://code.google.com/p/msysgit/ http://code.google.com/p/msysgit/] - or cygwin, can do this).  You'll need these checksums to insert into the database in the next step.&lt;br /&gt;
# Create a database record in content_patch_files for each file present in the content patch.&lt;br /&gt;
## Set the '''FileName''' column to the name of the file to patch (with extension, no spaces, for example &amp;quot;alfa2_acr.hak&amp;quot;).&lt;br /&gt;
## Set the '''HakVersion''' column based on the ACR version that is matched when deciding whether the content patch is applicable (for example, &amp;quot;1.87&amp;quot;).&lt;br /&gt;
## Set the '''Location''' column to either &amp;quot;override&amp;quot; or &amp;quot;hak&amp;quot;, depending on where the content file should be stored on live servers.&lt;br /&gt;
## Set the '''Checksum''' column to the md5sum value (32 hex characters) for the file that is being patched.&lt;br /&gt;
## Set the '''RecompileModule''' column to true if the module needs to have all scripts recompiled, else false if a recompile is not required.  A recompile is generally only necessary if an include in the ACR HAK has been changed and the include is referenced by a script distributed with the module.  This option is only supported in ACR 1.90 or higher (otherwise the module is never recompiled).&lt;br /&gt;
# Connect a test server to the database and central server vault, and restart it.  Check the log to make sure that the content patch applied successfully; the server should restart a second time after applying the patches.  There will be server log entries containing &amp;quot;ModuleContentPatcher&amp;quot; updating you with the status of content patches as they're applied.&lt;br /&gt;
&lt;br /&gt;
It is highly recommended that you test the content patch on a test server before copying the patch data to the live server.  You should still verify that the patch applied correctly to a live server, however, once the patch has been deployed to production.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Content Patches and the Standard Release Process ==&lt;br /&gt;
The content patch system ensures that patches are tagged with a specific ACR version that they apply to.  When a server upgrades to a new ACR version, using the standard release process, previous content patches will no longer be applicable and won't be applied anymore.&lt;br /&gt;
&lt;br /&gt;
For content patch files located in the &amp;quot;hak&amp;quot; directory, no action is taken.  It's expected that if the administrator did an ACR upgrade, that they have manually upgraded the haks anyway.  (No new haks can be added with the content patch system, only hotfixes to existing haks.)&lt;br /&gt;
&lt;br /&gt;
For content patch files located in the &amp;quot;override&amp;quot; directory, the content patch system automatically removes any patch files not applicable to the ACR version the server starts up with at startup time.  Thus it's not necessary to manually clean the content patch override directory out.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Content Patch Server Log Messages ==&lt;br /&gt;
Messages in the NWN2 server log file track the progress of the content patch system. When a content patch has been successfully applied, a log message of the form '''&amp;quot;ModuleContentPatcher.ProcessContentPatches: Successfully updated content patch file &amp;lt;filename&amp;gt;.&amp;quot;''' will be written to the server log. Log messages related to the content patcher can be easily identified by searching for '''ModuleContentPatcher''' in the log file. To verify that a content patch was deployed successfully, examine the server log after a server restart. Be sure to check the log message timestamp; it is usually best to start searching from the end of the server log file.&lt;br /&gt;
&lt;br /&gt;
If a content patch requests a module script recompile, then the console output of the script compiler is printed to the server log file.  An error message prefixed with the standard '''ModuleContentPatcher''' prefix is printed to the server log if any scripts failed to compile.&lt;/div&gt;</summary>
		<author><name>Basilica</name></author>	</entry>

	<entry>
		<id>https://www.alandfaraway.info/Wiki/index.php?title=Basic_Host_Requirements&amp;diff=2635</id>
		<title>Basic Host Requirements</title>
		<link rel="alternate" type="text/html" href="https://www.alandfaraway.info/Wiki/index.php?title=Basic_Host_Requirements&amp;diff=2635"/>
				<updated>2014-08-10T05:54:48Z</updated>
		
		<summary type="html">&lt;p&gt;Basilica: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Technical Manuals]]&lt;br /&gt;
== System Requirements ==&lt;br /&gt;
ALFA strongly recommends that all game servers run a 64-bit OS for the operating system that runs nwn2server. A 32-bit OS does not provide enough address space for many modules to function reliably when hosted by nwn2server.&lt;br /&gt;
&lt;br /&gt;
If nwn2server is hosted in a virtual machine, ALFA recommends that either [http://www.vmware.com/ VMware] or [http://www.microsoft.com/hyper-v/‎ Hyper-V] be used for the virtualization infrastructure. Both of these products have both been validated and are functional in production use for live servers.&lt;br /&gt;
&lt;br /&gt;
Specifically noted, VirtualBox should not be used or the game will not function properly, on account of bugs in VirtualBox's timer handling (often manifests as perception not working over time or other time-based systems in the game malfunctioning).&lt;br /&gt;
&lt;br /&gt;
It is preferred that the Windows version (Windows 8.1 or Windows Server 2012 or higher are recommended) used to host the game server be a version that supports acting as a Remote Desktop Protocol (RDP) host, typically Professional (or higher) editions. Server editions also include Remote Desktop Protocol host functionality. RDP provides a superior remote administration experience as compared to VNC.&lt;br /&gt;
&lt;br /&gt;
The recommended memory size to allocate to a game server instance is 4GB. This may be adjusted based on the actual memory consumption of a module, but 2GB provides plenty of headroom for most of our servers.&lt;br /&gt;
&lt;br /&gt;
== Prerequisites ==&lt;br /&gt;
* [http://www.microsoft.com/en-us/download/details.aspx?id=26347 Microsoft Visual C++ 2005 Service Pack 1 Redistributable Package MFC Security Update]&lt;br /&gt;
* [http://www.microsoft.com/en-us/download/details.aspx?id=8328 Microsoft Visual C++ 2010 SP1 Redistributable Package (x86)]&lt;br /&gt;
* [http://support.microsoft.com/kb/968929/en-us Windows Management Framework Core] -- For operating systems older than Windows 7. Only need Windows PowerShell 2.0.&lt;br /&gt;
&lt;br /&gt;
= NWNx4 =&lt;br /&gt;
ALFA uses [http://www.nwnx.org/index.php?id=nwnx4 NWNx4] to host all of its live servers.&lt;br /&gt;
&lt;br /&gt;
While this document cannot replace the documentation provided with NWNx4, a brief explanation can be offered: NWNx4 is an application which runs alongside the nwn2server application, communicating with, running processes for, and altering the data within to achieve functionality which cannot be created without such means.&lt;br /&gt;
&lt;br /&gt;
The NWNx4 application works with a number of community-generated plugins-- libraries of functions and hooks, which are either called from the NWN scripting language or which intercept standard functions or functionality to correct bugs-- which are required for the proper function of [[ALFA Core Rules | ALFA's core ruleset]].&lt;br /&gt;
&lt;br /&gt;
Download the files from ACR.&lt;br /&gt;
* [https://github.com/ALandFarAway/ALFA-Base-Resources/tree/master/Server_Files/nwn2server%20directory nwn2server directory] -- These files go in the same folder as nwn2server.exe.&lt;br /&gt;
* [https://github.com/ALandFarAway/ALFA-Base-Resources/tree/master/Server_Files/nwnx4%20directory nwnx4 directory] -- These files go into your NWNx4 folder.&lt;br /&gt;
&lt;br /&gt;
NWNx4 is configured through the nwnx.ini file, which is plain text and contains help text to describe the function of each setting, which is installed to the NWNx4 install directory. Once configured, a server is run through NWNx4 by running one of the NWNx4 executables. The started application will also start nwn2server.&lt;br /&gt;
&lt;br /&gt;
== Currently Used Plugins ==&lt;br /&gt;
=== Server Folder Files ===&lt;br /&gt;
* '''NWNScriptJIT.dll''' -- NWScript JIT support, C# script support&lt;br /&gt;
* '''NWNScriptJITIntrinsics.dll''' -- NWScript JIT support, C# script support&lt;br /&gt;
* '''AuroraServerNetLayer.dll''' -- bug fixes&lt;br /&gt;
* '''NWNScriptCompiler.exe''' -- The script compiler should be somewhere in %PATH%, but it can be placed in the server install directory too.  Needed for the content patcher to automatically recompile modules on updates (required, or else the module could break after a content patch).&lt;br /&gt;
&lt;br /&gt;
=== NWNx4 Folder Files ===&lt;br /&gt;
* '''NWNx4_Hook.dll''' -- Allows script hooking in the first place.&lt;br /&gt;
* '''NWNScriptCompiler.exe -- Required to allow the content patcher to recompile a module. Take from AdvancedScriptCompiler\NWNScriptCompiler.exe on the ACR repository.&lt;br /&gt;
* '''xp_AuroraServerNWScript.dll''' -- Script improvements, C# support, allows workarounds of engine limitations.&lt;br /&gt;
* '''xp_bugfix.dll''' -- Bug fixes&lt;br /&gt;
* '''xp_craft.dll''' -- Customization of items during live play&lt;br /&gt;
* '''xp_mysql.dll''' -- Allows communication with SQL databases&lt;br /&gt;
* '''xp_objectattributes.dll''' -- Allows the modification of creatures during live play&lt;br /&gt;
* '''xp_ServerVault.dll''' -- Allows vault reads / writes to occur without stopping the main server process&lt;br /&gt;
* '''xp_srvadmin.dll''' -- Allows scripts to carry out server administration actions.&lt;br /&gt;
* '''xp_system.dll''' -- &lt;br /&gt;
* '''xp_time.dll''' --  &lt;br /&gt;
* '''MySql.Data.dll''' -- MySQL client library for CLR scripts.&lt;br /&gt;
&lt;br /&gt;
=== Configuration ===&lt;br /&gt;
* AuroraServerNWScript.ini&lt;br /&gt;
*: &amp;lt;code&amp;gt;AllowManagedScripts=1&amp;lt;/code&amp;gt;&lt;br /&gt;
* xp_craft.ini&lt;br /&gt;
** Set the database directory to proper location of the Campaign Database on the machine&lt;br /&gt;
* AuroraServerVault.ini&lt;br /&gt;
** The text within the configuration file explains how to configure the plugin. If this configuration fails, players will be unable to see their vaults.&lt;br /&gt;
** Typical configuration is to set LocalServerVaultPath=C:\NWN2User\servervault , RemoteServerVaultPath=C:\NWN2User\remotevault , SpoolPath=C:\NWN2User\servervaultspool. All three of these can be anywhere, so long as it is clear to anyone doing maintenance what they are (&amp;quot;remote vault&amp;quot; is where bics will be downloaded to for verification, &amp;quot;spool&amp;quot; is where saved bics will be staged for upload, and &amp;quot;local server vault&amp;quot; is the directory from which characters will be played).&lt;br /&gt;
** The text within the configuration file explains how to configure the plugin. If this configuration fails, the server will default to inappropriate settings (such as PvP, download server, or custom GUIs) or requiring the module to be started manually after nwn2server.exe stops.&lt;br /&gt;
** Remember to ensure that the directories specified in the config file exist!  They have to be created manually (except for the LocalServerVaultPath which is automatically created by nwn2server.exe, though it can be manually created safely).  If the directories don't all exist, the vault won't work correctly and players will not be able to log in.&lt;br /&gt;
* nwnx.ini&lt;br /&gt;
** The ACR requires a temporary directory to run. It can be anywhere that the user who runs the NWNx4 process can write to. It is set in nwn2temp&lt;br /&gt;
* DatabaseConnector.ini&lt;br /&gt;
** DatabaseConnector has only one setting in it, which should look something like:&lt;br /&gt;
*** CommandLine=-batch -L 3306:127.0.0.1:3306 -x -a -T -2 -noagent -N -i C:\NWNX4\ssh.ppk alfa@sql.alandfaraway.org&lt;br /&gt;
*** C:\NWNX4\ssh.ppk is the private key that you're specified for this server.&lt;br /&gt;
**** To create a key pair, use [http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html PuttyGen] to create a new key with all of the default settings.&lt;br /&gt;
**** Save the private key to your NWNx4 directory, and specify that location in the command line&lt;br /&gt;
**** Use [http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html PuTTy] to connect to alfa@sql.alandfaraway.org (as an HDM, you should have credentials for this) and edit (pico is the Linux command) .\alfa\.ssh\authorized_keys to add the public key to the bottom. Then, run (Windows+R) &amp;quot;&amp;lt;file location of putty&amp;gt; alfa@sql.alandfaraway.org -i &amp;lt;file location of your public key&amp;gt;&amp;quot; -- you will be prompted asking if you want to cache the public key from the server you're connecting to. Pick &amp;quot;yes&amp;quot; and close the connection.&lt;br /&gt;
* xp_mysql.ini&lt;br /&gt;
** Set the database credentials up as per standard for the central server.  TA, IA, or tech team can help provide credentials.  Use xp_mysql.txt to troubleshoot database connectivity or query problems.&lt;br /&gt;
** Set server = localhost to use the DatabaseConnector managed tunnel (all servers should generally use this).  If a Linux sshfs VM is in use instead, set server = linuxhost where linuxhost is the address of the Linux VM (this method is deprecated).&lt;br /&gt;
&lt;br /&gt;
= Installation checklist =&lt;br /&gt;
See [[Virtual Machine Setup]] for an end to end checklist for configuring a game server from scratch, using this guide for reference.&lt;/div&gt;</summary>
		<author><name>Basilica</name></author>	</entry>

	<entry>
		<id>https://www.alandfaraway.info/Wiki/index.php?title=Basic_Host_Requirements&amp;diff=2634</id>
		<title>Basic Host Requirements</title>
		<link rel="alternate" type="text/html" href="https://www.alandfaraway.info/Wiki/index.php?title=Basic_Host_Requirements&amp;diff=2634"/>
				<updated>2014-08-10T05:54:10Z</updated>
		
		<summary type="html">&lt;p&gt;Basilica: Link setup checklist.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Technical Manuals]]&lt;br /&gt;
== System Requirements ==&lt;br /&gt;
ALFA strongly recommends that all game servers run a 64-bit OS for the operating system that runs nwn2server. A 32-bit OS does not provide enough address space for many modules to function reliably when hosted by nwn2server.&lt;br /&gt;
&lt;br /&gt;
If nwn2server is hosted in a virtual machine, ALFA recommends that either [http://www.vmware.com/ VMware] or [http://www.microsoft.com/hyper-v/‎ Hyper-V] be used for the virtualization infrastructure. Both of these products have both been validated and are functional in production use for live servers.&lt;br /&gt;
&lt;br /&gt;
Specifically noted, VirtualBox should not be used or the game will not function properly, on account of bugs in VirtualBox's timer handling (often manifests as perception not working over time or other time-based systems in the game malfunctioning).&lt;br /&gt;
&lt;br /&gt;
It is preferred that the Windows version (Windows 8.1 or Windows Server 2012 or higher are recommended) used to host the game server be a version that supports acting as a Remote Desktop Protocol (RDP) host, typically Professional (or higher) editions. Server editions also include Remote Desktop Protocol host functionality. RDP provides a superior remote administration experience as compared to VNC.&lt;br /&gt;
&lt;br /&gt;
The recommended memory size to allocate to a game server instance is 4GB. This may be adjusted based on the actual memory consumption of a module, but 2GB provides plenty of headroom for most of our servers.&lt;br /&gt;
&lt;br /&gt;
== Prerequisites ==&lt;br /&gt;
* [http://www.microsoft.com/en-us/download/details.aspx?id=26347 Microsoft Visual C++ 2005 Service Pack 1 Redistributable Package MFC Security Update]&lt;br /&gt;
* [http://www.microsoft.com/en-us/download/details.aspx?id=8328 Microsoft Visual C++ 2010 SP1 Redistributable Package (x86)]&lt;br /&gt;
* [http://support.microsoft.com/kb/968929/en-us Windows Management Framework Core] -- For operating systems older than Windows 7. Only need Windows PowerShell 2.0.&lt;br /&gt;
&lt;br /&gt;
= NWNx4 =&lt;br /&gt;
ALFA uses [http://www.nwnx.org/index.php?id=nwnx4 NWNx4] to host all of its live servers.&lt;br /&gt;
&lt;br /&gt;
While this document cannot replace the documentation provided with NWNx4, a brief explanation can be offered: NWNx4 is an application which runs alongside the nwn2server application, communicating with, running processes for, and altering the data within to achieve functionality which cannot be created without such means.&lt;br /&gt;
&lt;br /&gt;
The NWNx4 application works with a number of community-generated plugins-- libraries of functions and hooks, which are either called from the NWN scripting language or which intercept standard functions or functionality to correct bugs-- which are required for the proper function of [[ALFA Core Rules | ALFA's core ruleset]].&lt;br /&gt;
&lt;br /&gt;
Download the files from ACR.&lt;br /&gt;
* [https://github.com/ALandFarAway/ALFA-Base-Resources/tree/master/Server_Files/nwn2server%20directory nwn2server directory] -- These files go in the same folder as nwn2server.exe.&lt;br /&gt;
* [https://github.com/ALandFarAway/ALFA-Base-Resources/tree/master/Server_Files/nwnx4%20directory nwnx4 directory] -- These files go into your NWNx4 folder.&lt;br /&gt;
&lt;br /&gt;
NWNx4 is configured through the nwnx.ini file, which is plain text and contains help text to describe the function of each setting, which is installed to the NWNx4 install directory. Once configured, a server is run through NWNx4 by running one of the NWNx4 executables. The started application will also start nwn2server.&lt;br /&gt;
&lt;br /&gt;
== Currently Used Plugins ==&lt;br /&gt;
=== Server Folder Files ===&lt;br /&gt;
* '''NWNScriptJIT.dll''' -- NWScript JIT support, C# script support&lt;br /&gt;
* '''NWNScriptJITIntrinsics.dll''' -- NWScript JIT support, C# script support&lt;br /&gt;
* '''AuroraServerNetLayer.dll''' -- bug fixes&lt;br /&gt;
* '''NWNScriptCompiler.exe''' -- The script compiler should be somewhere in %PATH%, but it can be placed in the server install directory too.  Needed for the content patcher to automatically recompile modules on updates (required, or else the module could break after a content patch).&lt;br /&gt;
&lt;br /&gt;
=== NWNx4 Folder Files ===&lt;br /&gt;
* '''NWNx4_Hook.dll''' -- Allows script hooking in the first place.&lt;br /&gt;
* '''NWNScriptCompiler.exe -- Required to allow the content patcher to recompile a module. Take from AdvancedScriptCompiler\NWNScriptCompiler.exe on the ACR repository.&lt;br /&gt;
* '''xp_AuroraServerNWScript.dll''' -- Script improvements, C# support, allows workarounds of engine limitations.&lt;br /&gt;
* '''xp_bugfix.dll''' -- Bug fixes&lt;br /&gt;
* '''xp_craft.dll''' -- Customization of items during live play&lt;br /&gt;
* '''xp_mysql.dll''' -- Allows communication with SQL databases&lt;br /&gt;
* '''xp_objectattributes.dll''' -- Allows the modification of creatures during live play&lt;br /&gt;
* '''xp_ServerVault.dll''' -- Allows vault reads / writes to occur without stopping the main server process&lt;br /&gt;
* '''xp_srvadmin.dll''' -- Allows scripts to carry out server administration actions.&lt;br /&gt;
* '''xp_system.dll''' -- &lt;br /&gt;
* '''xp_time.dll''' --  &lt;br /&gt;
* '''MySql.Data.dll''' -- MySQL client library for CLR scripts.&lt;br /&gt;
&lt;br /&gt;
=== Configuration ===&lt;br /&gt;
* AuroraServerNWScript.ini&lt;br /&gt;
*: &amp;lt;code&amp;gt;AllowManagedScripts=1&amp;lt;/code&amp;gt;&lt;br /&gt;
* xp_craft.ini&lt;br /&gt;
** Set the database directory to proper location of the Campaign Database on the machine&lt;br /&gt;
* AuroraServerVault.ini&lt;br /&gt;
** The text within the configuration file explains how to configure the plugin. If this configuration fails, players will be unable to see their vaults.&lt;br /&gt;
** Typical configuration is to set LocalServerVaultPath=C:\NWN2User\servervault , RemoteServerVaultPath=C:\NWN2User\remotevault , SpoolPath=C:\NWN2User\servervaultspool. All three of these can be anywhere, so long as it is clear to anyone doing maintenance what they are (&amp;quot;remote vault&amp;quot; is where bics will be downloaded to for verification, &amp;quot;spool&amp;quot; is where saved bics will be staged for upload, and &amp;quot;local server vault&amp;quot; is the directory from which characters will be played).&lt;br /&gt;
** The text within the configuration file explains how to configure the plugin. If this configuration fails, the server will default to inappropriate settings (such as PvP, download server, or custom GUIs) or requiring the module to be started manually after nwn2server.exe stops.&lt;br /&gt;
** Remember to ensure that the directories specified in the config file exist!  They have to be created manually (except for the LocalServerVaultPath which is automatically created by nwn2server.exe, though it can be manually created safely).  If the directories don't all exist, the vault won't work correctly and players will not be able to log in.&lt;br /&gt;
* nwnx.ini&lt;br /&gt;
** The ACR requires a temporary directory to run. It can be anywhere that the user who runs the NWNx4 process can write to. It is set in nwn2temp&lt;br /&gt;
* DatabaseConnector.ini&lt;br /&gt;
** DatabaseConnector has only one setting in it, which should look something like:&lt;br /&gt;
*** CommandLine=-batch -L 3306:127.0.0.1:3306 -x -a -T -2 -noagent -N -i C:\NWNX4\ssh.ppk alfa@sql.alandfaraway.org&lt;br /&gt;
*** C:\NWNX4\ssh.ppk is the private key that you're specified for this server.&lt;br /&gt;
**** To create a key pair, use [http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html PuttyGen] to create a new key with all of the default settings.&lt;br /&gt;
**** Save the private key to your NWNx4 directory, and specify that location in the command line&lt;br /&gt;
**** Use [http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html PuTTy] to connect to alfa@sql.alandfaraway.org (as an HDM, you should have credentials for this) and edit (pico is the Linux command) .\alfa\.ssh\authorized_keys to add the public key to the bottom. Then, run (Windows+R) &amp;quot;&amp;lt;file location of putty&amp;gt; alfa@sql.alandfaraway.org -i &amp;lt;file location of your public key&amp;gt;&amp;quot; -- you will be prompted asking if you want to cache the public key from the server you're connecting to. Pick &amp;quot;yes&amp;quot; and close the connection.&lt;br /&gt;
* xp_mysql.ini&lt;br /&gt;
** Set the database credentials up as per standard for the central server.  TA, IA, or tech team can help provide credentials.  Use xp_mysql.txt to troubleshoot database connectivity or query problems.&lt;br /&gt;
** Set server = localhost to use the DatabaseConnector managed tunnel (all servers should generally use this).  If a Linux sshfs VM is in use instead, set server = linuxhost where linuxhost is the address of the Linux VM (this method is deprecated).&lt;br /&gt;
&lt;br /&gt;
== Installation checklist ==&lt;br /&gt;
See [[Virtual Machine Setup]] for an end to end checklist for configuring a game server from scratch, using this guide for reference.&lt;/div&gt;</summary>
		<author><name>Basilica</name></author>	</entry>

	<entry>
		<id>https://www.alandfaraway.info/Wiki/index.php?title=Virtual_Machine_Setup&amp;diff=2633</id>
		<title>Virtual Machine Setup</title>
		<link rel="alternate" type="text/html" href="https://www.alandfaraway.info/Wiki/index.php?title=Virtual_Machine_Setup&amp;diff=2633"/>
				<updated>2014-08-10T05:51:25Z</updated>
		
		<summary type="html">&lt;p&gt;Basilica: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Technical Manuals]]&lt;br /&gt;
This document describes in rough detail the recommended checklist for setting up a new game server host VM in the standard configuration.&lt;br /&gt;
&lt;br /&gt;
== Prerequisites ==&lt;br /&gt;
* [http://www.microsoft.com/en-us/download/details.aspx?id=35 DirectX End-User Runtime]&lt;br /&gt;
* [http://www.microsoft.com/en-us/download/details.aspx?id=17851 Microsoft .NET Framework 4]&lt;br /&gt;
* [http://www.microsoft.com/en-us/download/details.aspx?id=26347 Microsoft Visual C++ 2005 Service Pack 1 Redistributable Package MFC Security Update]&lt;br /&gt;
* [http://www.microsoft.com/en-us/download/details.aspx?id=26999 Microsoft Visual C++ 2010 Service Pack 1 Redistributable Package MFC Security Update]&lt;br /&gt;
&lt;br /&gt;
== Process ==&lt;br /&gt;
# Install Windows Server&lt;br /&gt;
# Copy standard tools over&lt;br /&gt;
# Create SG &amp;quot;NWN2 Servers&amp;quot;&lt;br /&gt;
# Create SG &amp;quot;NWN2 Admins&amp;quot;&lt;br /&gt;
# Create user &amp;quot;NWN2Server&amp;quot;&lt;br /&gt;
## Add to &amp;quot;NWN2 Servers&amp;quot; SG&lt;br /&gt;
# Create C:\NWN2, xcopy NWN2 install over&lt;br /&gt;
## Grant &amp;quot;NWN2 Servers&amp;quot; create files, create folders to &amp;quot;This folder only&amp;quot;&lt;br /&gt;
## Grant &amp;quot;NWN2 Admins&amp;quot; modify to folder, subfolders, and files&lt;br /&gt;
## Import NWN2.reg&lt;br /&gt;
# Create C:\NWN2User&lt;br /&gt;
## Grant full control to &amp;quot;NWN2 Servers&amp;quot;&lt;br /&gt;
## Grant modify/execute/list/read/write to &amp;quot;NWN2 Admins&amp;quot;&lt;br /&gt;
# Runas /profile /user:NWN2Server cmd.exe&lt;br /&gt;
## cd /d &amp;quot;%userprofile%\Documents&amp;quot;&lt;br /&gt;
## mklink /j &amp;quot;Neverwinter Nights 2&amp;quot; C:\NWN2User&lt;br /&gt;
## putty -ssh alfa@sql.alandfaraway.org&lt;br /&gt;
### Confirm and accept central server public key for vault tunnel to work&lt;br /&gt;
# Create C:\NWNX4, xcopy NWNX4 installation over&lt;br /&gt;
## Grant modify/execute/list/read/write to &amp;quot;NWN2 Admins&amp;quot;&lt;br /&gt;
## Grant modify/execute/list/read/write to &amp;quot;NWN2 Servers&amp;quot; for:&lt;br /&gt;
### AuroraServerNWScript.log&lt;br /&gt;
### AuroraServerVault.log&lt;br /&gt;
### nwnx.txt&lt;br /&gt;
### nwnx_controller.txt&lt;br /&gt;
### xp_mysql.txt&lt;br /&gt;
### xp_bugfix.txt&lt;br /&gt;
### xp_objectattributes.txt&lt;br /&gt;
### xp_srvadmin.txt&lt;br /&gt;
### xp_system.txt&lt;br /&gt;
### xp_time.txt&lt;br /&gt;
# Create C:\Users\Public\Desktop\Credentials.txt&lt;br /&gt;
# Copy standard links to C:\Users\Public\Desktop&lt;br /&gt;
# Copy standard links to C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Tools&lt;br /&gt;
# Copy standard scripts to C:\Scripts&lt;br /&gt;
# Copy standard NWN2 tools to C:\Tools&lt;br /&gt;
# Copy NWNServerConsole to C:\NWN2\Console&lt;br /&gt;
# Fix PowerShell signing&lt;br /&gt;
## Set-ExecutionPolicy -Scope LocalMachine -ExecutionPolicy Unrestricted -Force&lt;br /&gt;
# Install [http://git-scm.com/ Git]&lt;br /&gt;
# Install [https://filezilla-project.org/ FileZilla]&lt;br /&gt;
# Install [http://msdn.microsoft.com/en-us/windows/apps/br229516 Win8 Performance Toolkit]&lt;br /&gt;
# Install [http://www.7-zip.org/ 7-zip]&lt;br /&gt;
# Install [http://gvim.en.softonic.com/ gvim]&lt;br /&gt;
# Install WinDbg for [http://www.microsoft.com/en-us/download/details.aspx?id=8279 Windows 7] or [http://msdn.microsoft.com/en-US/windows/desktop/bg162891 Windows 8.1].&lt;br /&gt;
# Set &amp;lt;code&amp;gt;_NT_SYMBOL_PATH&amp;lt;/code&amp;gt; to &amp;lt;code&amp;gt;SRV*C:\Symbols*http://msdl.microsoft.com/download/symbols&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== NWNX4 Installation ==&lt;br /&gt;
# nwnx4_controller.exe -installservice&lt;br /&gt;
# Get SID for NWN2Server user with PowerShell:&lt;br /&gt;
::: &amp;lt;code&amp;gt;([wmi]&amp;quot;win32_Group.Domain='$env:ComputerName',Name='NWN2 Admins'&amp;quot;).sid&amp;lt;/code&amp;gt;&lt;br /&gt;
# Set SD on nwnx4-1 service to allow NWN2 Admins to start/stop:&lt;br /&gt;
::: &amp;lt;code&amp;gt;sc sdset nwnx4-1 D:(A;;CCLCSWRPWPDTLOCRRC;;;SY)(A;;CCDCLCSWRPWPDTLOCRSDRCWDWO;;;BA)(A;;CCLCSWLOCRRC;;;IU)(A;;CCLCSWLOCRRC;;;SU)(A;;RPWP;;;&amp;lt;&amp;gt;)S:(AU;FA;CCDCLCSWRPWPDTLOCRSDRCWDWO;;;WD)&amp;lt;/code&amp;gt;&lt;br /&gt;
# Install SSH private key to C:\NWNX4\sshfs.ppk&lt;br /&gt;
# Add SSH public key to alfa@sql.alandfaraway.org:~/.ssh/authorized_keys&lt;br /&gt;
# Set configuration in C:\NWNX4\nwnx.ini&lt;br /&gt;
# Set configuration in C:\NWNX4\AuroraServerNWScript.ini&lt;br /&gt;
# Set configuration in C:\NWNX4\xp_mysql.ini&lt;br /&gt;
# Set configuration in C:\NWNX4\DatabaseConnector.ini&lt;br /&gt;
# Set configuration in C:\NWNX4\AuroraServerVault.ini&lt;/div&gt;</summary>
		<author><name>Basilica</name></author>	</entry>

	<entry>
		<id>https://www.alandfaraway.info/Wiki/index.php?title=Virtual_Machine_Setup&amp;diff=2632</id>
		<title>Virtual Machine Setup</title>
		<link rel="alternate" type="text/html" href="https://www.alandfaraway.info/Wiki/index.php?title=Virtual_Machine_Setup&amp;diff=2632"/>
				<updated>2014-08-10T05:48:50Z</updated>
		
		<summary type="html">&lt;p&gt;Basilica: /* NWNX4 Installation */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Technical Manuals]]&lt;br /&gt;
This document describes in rough detail the recommended checklist for setting up a new game server host VM in the standard configuration.&lt;br /&gt;
&lt;br /&gt;
== Prerequisites ==&lt;br /&gt;
* [http://www.microsoft.com/en-us/download/details.aspx?id=35 DirectX End-User Runtime]&lt;br /&gt;
* [http://www.microsoft.com/en-us/download/details.aspx?id=17851 Microsoft .NET Framework 4]&lt;br /&gt;
* [http://www.microsoft.com/en-us/download/details.aspx?id=26347 Microsoft Visual C++ 2005 Service Pack 1 Redistributable Package MFC Security Update]&lt;br /&gt;
* [http://www.microsoft.com/en-us/download/details.aspx?id=26999 Microsoft Visual C++ 2010 Service Pack 1 Redistributable Package MFC Security Update]&lt;br /&gt;
&lt;br /&gt;
== Process ==&lt;br /&gt;
# Install Windows Server&lt;br /&gt;
# Copy standard tools over&lt;br /&gt;
# Create SG &amp;quot;NWN2 Servers&amp;quot;&lt;br /&gt;
# Create SG &amp;quot;NWN2 Admins&amp;quot;&lt;br /&gt;
# Create user &amp;quot;NWN2Server&amp;quot;&lt;br /&gt;
## Add to &amp;quot;NWN2 Servers&amp;quot; SG&lt;br /&gt;
# Create C:\NWN2, xcopy NWN2 install over&lt;br /&gt;
## Grant &amp;quot;NWN2 Servers&amp;quot; create files, create folders to &amp;quot;This folder only&amp;quot;&lt;br /&gt;
## Grant &amp;quot;NWn2 Admins&amp;quot; modify to folder, subfolders, and files&lt;br /&gt;
## Import NWN2.reg&lt;br /&gt;
# Create C:\NWN2User&lt;br /&gt;
## Grant full control to &amp;quot;NWN2 Servers&amp;quot;&lt;br /&gt;
## Grant modify/execute/list/read/write to &amp;quot;NWN2 Admins&amp;quot;&lt;br /&gt;
# Runas /profile /user:NWN2Server cmd.exe&lt;br /&gt;
## cd /d &amp;quot;%userprofile%\Documents&amp;quot;&lt;br /&gt;
## mklink /j &amp;quot;Neverwinter Nights 2&amp;quot; C:\NWN2User&lt;br /&gt;
# Create C:\NWNX4, xcopy NWNX4 installation over&lt;br /&gt;
## Grant modify/execute/list/read/write to &amp;quot;NWN2 Admins&amp;quot;&lt;br /&gt;
## Grant modify/execute/list/read/write to &amp;quot;NWN2 Servers&amp;quot; for:&lt;br /&gt;
### AuroraServerNWScript.log&lt;br /&gt;
### AuroraServerVault.log&lt;br /&gt;
### nwnx.txt&lt;br /&gt;
### nwnx_controller.txt&lt;br /&gt;
### xp_mysql.txt&lt;br /&gt;
### xp_bugfix.txt&lt;br /&gt;
### xp_objectattributes.txt&lt;br /&gt;
### xp_srvadmin.txt&lt;br /&gt;
### xp_system.txt&lt;br /&gt;
### xp_time.txt&lt;br /&gt;
# Create C:\Users\Public\Desktop\Credentials.txt&lt;br /&gt;
# Copy standard links to C:\Users\Public\Desktop&lt;br /&gt;
# Copy standard links to C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Tools&lt;br /&gt;
# Copy standard scripts to C:\Scripts&lt;br /&gt;
# Copy standard NWN2 tools to C:\Tools&lt;br /&gt;
# Copy NWNServerConsole to C:\NWN2\Console&lt;br /&gt;
# Fix PowerShell signing&lt;br /&gt;
## Set-ExecutionPolicy -Scope LocalMachine -ExecutionPolicy Unrestricted -Force&lt;br /&gt;
# Install [http://git-scm.com/ Git]&lt;br /&gt;
# Install [https://filezilla-project.org/ FileZilla]&lt;br /&gt;
# Install [http://msdn.microsoft.com/en-us/windows/apps/br229516 Win8 Performance Toolkit]&lt;br /&gt;
# Install [http://www.7-zip.org/ 7-zip]&lt;br /&gt;
# Install [http://gvim.en.softonic.com/ gvim]&lt;br /&gt;
# Install WinDbg for [http://www.microsoft.com/en-us/download/details.aspx?id=8279 Windows 7] or [http://msdn.microsoft.com/en-US/windows/desktop/bg162891 Windows 8.1].&lt;br /&gt;
# Set &amp;lt;code&amp;gt;_NT_SYMBOL_PATH&amp;lt;/code&amp;gt; to &amp;lt;code&amp;gt;SRV*C:\Symbols*http://msdl.microsoft.com/download/symbols&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== NWNX4 Installation ==&lt;br /&gt;
# nwnx4_controller.exe -installservice&lt;br /&gt;
# Get SID for NWN2Server user with PowerShell:&lt;br /&gt;
::: &amp;lt;code&amp;gt;([wmi]&amp;quot;win32_Group.Domain='$env:ComputerName',Name='NWN2 Admins'&amp;quot;).sid&amp;lt;/code&amp;gt;&lt;br /&gt;
# Set SD on nwnx4-1 service to allow NWN2 Admins to start/stop:&lt;br /&gt;
::: &amp;lt;code&amp;gt;sc sdset nwnx4-1 D:(A;;CCLCSWRPWPDTLOCRRC;;;SY)(A;;CCDCLCSWRPWPDTLOCRSDRCWDWO;;;BA)(A;;CCLCSWLOCRRC;;;IU)(A;;CCLCSWLOCRRC;;;SU)(A;;RPWP;;;&amp;lt;&amp;gt;)S:(AU;FA;CCDCLCSWRPWPDTLOCRSDRCWDWO;;;WD)&amp;lt;/code&amp;gt;&lt;br /&gt;
# Install SSH private key to C:\NWNX4\sshfs.ppk&lt;br /&gt;
# Add SSH public key to alfa@sql.alandfaraway.org:~/.ssh/authorized_keys&lt;br /&gt;
# Set configuration in C:\NWNX4\nwnx.ini&lt;br /&gt;
# Set configuration in C:\NWNX4\AuroraServerNWScript.ini&lt;br /&gt;
# Set configuration in C:\NWNX4\xp_mysql.ini&lt;br /&gt;
# Set configuration in C:\NWNX4\DatabaseConnector.ini&lt;br /&gt;
# Set configuration in C:\NWNX4\AuroraServerVault.ini&lt;/div&gt;</summary>
		<author><name>Basilica</name></author>	</entry>

	<entry>
		<id>https://www.alandfaraway.info/Wiki/index.php?title=Basic_Host_Requirements&amp;diff=2631</id>
		<title>Basic Host Requirements</title>
		<link rel="alternate" type="text/html" href="https://www.alandfaraway.info/Wiki/index.php?title=Basic_Host_Requirements&amp;diff=2631"/>
				<updated>2014-08-10T05:41:42Z</updated>
		
		<summary type="html">&lt;p&gt;Basilica: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Technical Manuals]]&lt;br /&gt;
== System Requirements ==&lt;br /&gt;
ALFA strongly recommends that all game servers run a 64-bit OS for the operating system that runs nwn2server. A 32-bit OS does not provide enough address space for many modules to function reliably when hosted by nwn2server.&lt;br /&gt;
&lt;br /&gt;
If nwn2server is hosted in a virtual machine, ALFA recommends that either [http://www.vmware.com/ VMware] or [http://www.microsoft.com/hyper-v/‎ Hyper-V] be used for the virtualization infrastructure. Both of these products have both been validated and are functional in production use for live servers.&lt;br /&gt;
&lt;br /&gt;
Specifically noted, VirtualBox should not be used or the game will not function properly, on account of bugs in VirtualBox's timer handling (often manifests as perception not working over time or other time-based systems in the game malfunctioning).&lt;br /&gt;
&lt;br /&gt;
It is preferred that the Windows version (Windows 8.1 or Windows Server 2012 or higher are recommended) used to host the game server be a version that supports acting as a Remote Desktop Protocol (RDP) host, typically Professional (or higher) editions. Server editions also include Remote Desktop Protocol host functionality. RDP provides a superior remote administration experience as compared to VNC.&lt;br /&gt;
&lt;br /&gt;
The recommended memory size to allocate to a game server instance is 4GB. This may be adjusted based on the actual memory consumption of a module, but 2GB provides plenty of headroom for most of our servers.&lt;br /&gt;
&lt;br /&gt;
== Prerequisites ==&lt;br /&gt;
* [http://www.microsoft.com/en-us/download/details.aspx?id=26347 Microsoft Visual C++ 2005 Service Pack 1 Redistributable Package MFC Security Update]&lt;br /&gt;
* [http://www.microsoft.com/en-us/download/details.aspx?id=8328 Microsoft Visual C++ 2010 SP1 Redistributable Package (x86)]&lt;br /&gt;
* [http://support.microsoft.com/kb/968929/en-us Windows Management Framework Core] -- For operating systems older than Windows 7. Only need Windows PowerShell 2.0.&lt;br /&gt;
&lt;br /&gt;
= NWNx4 =&lt;br /&gt;
ALFA uses [http://www.nwnx.org/index.php?id=nwnx4 NWNx4] to host all of its live servers.&lt;br /&gt;
&lt;br /&gt;
While this document cannot replace the documentation provided with NWNx4, a brief explanation can be offered: NWNx4 is an application which runs alongside the nwn2server application, communicating with, running processes for, and altering the data within to achieve functionality which cannot be created without such means.&lt;br /&gt;
&lt;br /&gt;
The NWNx4 application works with a number of community-generated plugins-- libraries of functions and hooks, which are either called from the NWN scripting language or which intercept standard functions or functionality to correct bugs-- which are required for the proper function of [[ALFA Core Rules | ALFA's core ruleset]].&lt;br /&gt;
&lt;br /&gt;
Download the files from ACR.&lt;br /&gt;
* [https://github.com/ALandFarAway/ALFA-Base-Resources/tree/master/Server_Files/nwn2server%20directory nwn2server directory] -- These files go in the same folder as nwn2server.exe.&lt;br /&gt;
* [https://github.com/ALandFarAway/ALFA-Base-Resources/tree/master/Server_Files/nwnx4%20directory nwnx4 directory] -- These files go into your NWNx4 folder.&lt;br /&gt;
&lt;br /&gt;
NWNx4 is configured through the nwnx.ini file, which is plain text and contains help text to describe the function of each setting, which is installed to the NWNx4 install directory. Once configured, a server is run through NWNx4 by running one of the NWNx4 executables. The started application will also start nwn2server.&lt;br /&gt;
&lt;br /&gt;
== Currently Used Plugins ==&lt;br /&gt;
=== Server Folder Files ===&lt;br /&gt;
* '''NWNScriptJIT.dll''' -- NWScript JIT support, C# script support&lt;br /&gt;
* '''NWNScriptJITIntrinsics.dll''' -- NWScript JIT support, C# script support&lt;br /&gt;
* '''AuroraServerNetLayer.dll''' -- bug fixes&lt;br /&gt;
* '''NWNScriptCompiler.exe''' -- The script compiler should be somewhere in %PATH%, but it can be placed in the server install directory too.  Needed for the content patcher to automatically recompile modules on updates (required, or else the module could break after a content patch).&lt;br /&gt;
&lt;br /&gt;
=== NWNx4 Folder Files ===&lt;br /&gt;
* '''NWNx4_Hook.dll''' -- Allows script hooking in the first place.&lt;br /&gt;
* '''NWNScriptCompiler.exe -- Required to allow the content patcher to recompile a module. Take from AdvancedScriptCompiler\NWNScriptCompiler.exe on the ACR repository.&lt;br /&gt;
* '''xp_AuroraServerNWScript.dll''' -- Script improvements, C# support, allows workarounds of engine limitations.&lt;br /&gt;
* '''xp_bugfix.dll''' -- Bug fixes&lt;br /&gt;
* '''xp_craft.dll''' -- Customization of items during live play&lt;br /&gt;
* '''xp_mysql.dll''' -- Allows communication with SQL databases&lt;br /&gt;
* '''xp_objectattributes.dll''' -- Allows the modification of creatures during live play&lt;br /&gt;
* '''xp_ServerVault.dll''' -- Allows vault reads / writes to occur without stopping the main server process&lt;br /&gt;
* '''xp_srvadmin.dll''' -- Allows scripts to carry out server administration actions.&lt;br /&gt;
* '''xp_system.dll''' -- &lt;br /&gt;
* '''xp_time.dll''' --  &lt;br /&gt;
* '''MySql.Data.dll''' -- MySQL client library for CLR scripts.&lt;br /&gt;
&lt;br /&gt;
=== Configuration ===&lt;br /&gt;
* AuroraServerNWScript.ini&lt;br /&gt;
*: &amp;lt;code&amp;gt;AllowManagedScripts=1&amp;lt;/code&amp;gt;&lt;br /&gt;
* xp_craft.ini&lt;br /&gt;
** Set the database directory to proper location of the Campaign Database on the machine&lt;br /&gt;
* AuroraServerVault.ini&lt;br /&gt;
** The text within the configuration file explains how to configure the plugin. If this configuration fails, players will be unable to see their vaults.&lt;br /&gt;
** Typical configuration is to set LocalServerVaultPath=C:\NWN2User\servervault , RemoteServerVaultPath=C:\NWN2User\remotevault , SpoolPath=C:\NWN2User\servervaultspool. All three of these can be anywhere, so long as it is clear to anyone doing maintenance what they are (&amp;quot;remote vault&amp;quot; is where bics will be downloaded to for verification, &amp;quot;spool&amp;quot; is where saved bics will be staged for upload, and &amp;quot;local server vault&amp;quot; is the directory from which characters will be played).&lt;br /&gt;
** The text within the configuration file explains how to configure the plugin. If this configuration fails, the server will default to inappropriate settings (such as PvP, download server, or custom GUIs) or requiring the module to be started manually after nwn2server.exe stops.&lt;br /&gt;
** Remember to ensure that the directories specified in the config file exist!  They have to be created manually (except for the LocalServerVaultPath which is automatically created by nwn2server.exe, though it can be manually created safely).  If the directories don't all exist, the vault won't work correctly and players will not be able to log in.&lt;br /&gt;
* nwnx.ini&lt;br /&gt;
** The ACR requires a temporary directory to run. It can be anywhere that the user who runs the NWNx4 process can write to. It is set in nwn2temp&lt;br /&gt;
* DatabaseConnector.ini&lt;br /&gt;
** DatabaseConnector has only one setting in it, which should look something like:&lt;br /&gt;
*** CommandLine=-batch -L 3306:127.0.0.1:3306 -x -a -T -2 -noagent -N -i C:\NWNX4\ssh.ppk alfa@sql.alandfaraway.org&lt;br /&gt;
*** C:\NWNX4\ssh.ppk is the private key that you're specified for this server.&lt;br /&gt;
**** To create a key pair, use [http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html PuttyGen] to create a new key with all of the default settings.&lt;br /&gt;
**** Save the private key to your NWNx4 directory, and specify that location in the command line&lt;br /&gt;
**** Use [http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html PuTTy] to connect to alfa@sql.alandfaraway.org (as an HDM, you should have credentials for this) and edit (pico is the Linux command) .\alfa\.ssh\authorized_keys to add the public key to the bottom. Then, run (Windows+R) &amp;quot;&amp;lt;file location of putty&amp;gt; alfa@sql.alandfaraway.org -i &amp;lt;file location of your public key&amp;gt;&amp;quot; -- you will be prompted asking if you want to cache the public key from the server you're connecting to. Pick &amp;quot;yes&amp;quot; and close the connection.&lt;br /&gt;
* xp_mysql.ini&lt;br /&gt;
** Set the database credentials up as per standard for the central server.  TA, IA, or tech team can help provide credentials.  Use xp_mysql.txt to troubleshoot database connectivity or query problems.&lt;br /&gt;
** Set server = localhost to use the DatabaseConnector managed tunnel (all servers should generally use this).  If a Linux sshfs VM is in use instead, set server = linuxhost where linuxhost is the address of the Linux VM (this method is deprecated).&lt;/div&gt;</summary>
		<author><name>Basilica</name></author>	</entry>

	<entry>
		<id>https://www.alandfaraway.info/Wiki/index.php?title=Connecting_to_the_MySQL_Database&amp;diff=2630</id>
		<title>Connecting to the MySQL Database</title>
		<link rel="alternate" type="text/html" href="https://www.alandfaraway.info/Wiki/index.php?title=Connecting_to_the_MySQL_Database&amp;diff=2630"/>
				<updated>2014-08-10T05:39:48Z</updated>
		
		<summary type="html">&lt;p&gt;Basilica: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Technical Manuals]]&lt;br /&gt;
'''Note!  This page is deprecated.  See [[Basic Host Requirements]] for game server database setup.  This page is only kept for historical referenced.'''&lt;br /&gt;
&lt;br /&gt;
See [[Basic Host Requirements#Configuration|Basic Host Requirements: Configuration]] for details on how to set up DatabaseConnector.ini to manage the SSH tunnel used to connect to MySQL.&lt;br /&gt;
&lt;br /&gt;
-----&lt;br /&gt;
&lt;br /&gt;
Follow these instructions:&lt;br /&gt;
# Download and extract the following NWNX4 files from the link below to a dedicated folder on your host machine (eg. C:\NWNX4):&lt;br /&gt;
#* NWNX4_Controller.exe&lt;br /&gt;
#* NWNX4_GUI.exe&lt;br /&gt;
#* madCHook.dll&lt;br /&gt;
#* NWNX4_Hook.dll&lt;br /&gt;
#* xp_mysql.dll&lt;br /&gt;
#* xp_time.dll&lt;br /&gt;
#* nwnx.ini&lt;br /&gt;
#* xp_mysql.ini&lt;br /&gt;
# Copy the madCHook.dll file to your Neverwinter Nights 2 game folder (where the game installed itself). &lt;br /&gt;
# You will need to configure nwnx.ini with your module and game information. The most important line is the parameters entry:&lt;br /&gt;
#: &amp;lt;code&amp;gt;parameters = -module &amp;quot;'''&amp;lt;My Module&amp;gt;'''&amp;quot; -servervault 1 -publicserver 1&amp;lt;/code&amp;gt;&lt;br /&gt;
#: If you prefer to launch your module in directory mode, use the -moduledir paramater in place of -module.&lt;br /&gt;
# You will need to configure xp_mysql.ini with the correct connection details for the remote database server. Please contact the IA, TA, or DMA for that information. &lt;br /&gt;
# Once you have the file configured, you can launch your server using the NWNX4_GUI.exe program (NOT nwn2server.exe as you normally would). It will automatically launch nwn2server for you.&lt;br /&gt;
#: Alternatively, you can install NWNX4 as a service on your host machine by issuing the following commands in your NWNX4 folder (only recommended for advanced users):&lt;br /&gt;
#:: &amp;lt;code&amp;gt;NWNX4_Controller.exe -installservice&amp;lt;/code&amp;gt;&lt;br /&gt;
#:: &amp;lt;code&amp;gt;NWNX4_Controller.exe -startservice&amp;lt;/code&amp;gt;&lt;br /&gt;
#: NWNX4 will show up as a Windows service, which can be started and stopped like any other service on your machine (via Services in Administrative Tools). You can enable the nwn2server dialog window by navigating to the NWNX4 service, clicking on its properties, selecting the &amp;quot;Log On&amp;quot; tab, and checking the &amp;quot;Desktop Interaction&amp;quot; box.&lt;br /&gt;
#: Other service commands you can issue using NWNX4_Controller.exe:&lt;br /&gt;
#:: &amp;lt;code&amp;gt;-serviceno&amp;lt;/code&amp;gt; -- Specify service instance number&lt;br /&gt;
#:: &amp;lt;code&amp;gt;-stopservice&amp;lt;/code&amp;gt; -- Stop the NWNX service&lt;br /&gt;
#:: &amp;lt;code&amp;gt;-uninstallservice&amp;lt;/code&amp;gt; -- Uninstall the NWNX service&lt;br /&gt;
#:: &amp;lt;code&amp;gt;-interactive&amp;lt;/code&amp;gt; -- Start in interactive mode&lt;br /&gt;
&lt;br /&gt;
Note: NWNX logs are recorded in the nwnx.txt file, and MySQL logs are recorded in the xp_mysql.txt file in the install folder. These will help you identify any configuration or run time sql problems (like bad queries).&lt;/div&gt;</summary>
		<author><name>Basilica</name></author>	</entry>

	<entry>
		<id>https://www.alandfaraway.info/Wiki/index.php?title=Connecting_to_the_Server_Vault&amp;diff=2629</id>
		<title>Connecting to the Server Vault</title>
		<link rel="alternate" type="text/html" href="https://www.alandfaraway.info/Wiki/index.php?title=Connecting_to_the_Server_Vault&amp;diff=2629"/>
				<updated>2014-08-10T05:33:26Z</updated>
		
		<summary type="html">&lt;p&gt;Basilica: More links.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''Note!  This page is ''obsolete'', and only maintained for historical reference purposes.  The vault has been moved to Azure storage, see [[Server Vault]] for current documentation.'''&lt;br /&gt;
&lt;br /&gt;
See [[Basic Host Requirements#Configuration|Basic Host Requirements: Configuration]] for details on how to set up DatabaseConnector.ini to manage the SSH tunnel used to connect to MySQL.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Technical Manuals]]&lt;br /&gt;
These commands run inside the Linux VM.&lt;br /&gt;
&lt;br /&gt;
== SSHFS Installation ==&lt;br /&gt;
We first need to install sshfs:&lt;br /&gt;
 apt-get install sshfs&lt;br /&gt;
&lt;br /&gt;
Then we need to create the local alfa user. Create a file with the following in it (replace XXXXX with a password for the alfa user):&lt;br /&gt;
 cat &amp;gt; alfa.cred&lt;br /&gt;
 alfa:XXXXX:1001:1001::/home/alfa:/bin/bash&lt;br /&gt;
Hit Ctrl-d. Then run:&lt;br /&gt;
 newusers -r alfa.cred&lt;br /&gt;
&lt;br /&gt;
First try to ssh to the central vault host:&lt;br /&gt;
 ssh alfa@alandfaraway.org&lt;br /&gt;
&lt;br /&gt;
Type in the alfa user password for the central vault (ask IA or TA if you don't know it).&lt;br /&gt;
&lt;br /&gt;
Switch to user alfa (local user) and create a vault directory:&lt;br /&gt;
 su - alfa&lt;br /&gt;
 mkdir vault&lt;br /&gt;
&lt;br /&gt;
Switch back to root with a &amp;lt;code&amp;gt;logout&amp;lt;/code&amp;gt; or ctrl-d.&lt;br /&gt;
&lt;br /&gt;
Next, mount the vault (note you should do that only for testing as we have a better solution below that will automatically mount the vault when Linux starts):&lt;br /&gt;
sshfs alfa@alandfaraway.org:/home/alfa/vault /home/alfa/vault -o allow_other,reconnect&lt;br /&gt;
Type the alfa user password for the central vault.&lt;br /&gt;
&lt;br /&gt;
Switch again to user alfa and try to create a file:&lt;br /&gt;
 su - alfa&lt;br /&gt;
 cd vault&lt;br /&gt;
 cd test&lt;br /&gt;
 touch test&lt;br /&gt;
 ls -l test&lt;br /&gt;
&lt;br /&gt;
If everything is okay the output of ls should look like this:&lt;br /&gt;
 -rw-r--r-- 1 alfa alfa 0 Jun 27 21:24 test&lt;br /&gt;
&lt;br /&gt;
== Authentication ==&lt;br /&gt;
In order to allow reconnecting you must allow public key ssh connections (ie allow to connect without typing the password). On the game server linux box as the user called alfa type in:&lt;br /&gt;
 ssh-keygen -t dsa&lt;br /&gt;
(then type three times on return (ie default name for the file, no password, no password)&lt;br /&gt;
&lt;br /&gt;
Next, copy the public file over to the alandfaraway.org machine (here replace '''&amp;lt;gameserver&amp;gt;''' with the acronym of your game server - e.g. whl):&lt;br /&gt;
 scp ~/.ssh/id_dsa.pub alandfaraway.org:'''&amp;lt;gameserver&amp;gt;'''.pub&lt;br /&gt;
&lt;br /&gt;
Then connect to the alfa host:&lt;br /&gt;
 ssh alandfaraway.org&lt;br /&gt;
Type in your password.&lt;br /&gt;
 cat gameserver.pub &amp;gt;&amp;gt; .ssh/authorized_keys&lt;br /&gt;
 exit&lt;br /&gt;
 ssh alandfaraway.org&lt;br /&gt;
This time you'll connect without needing to type the password.&lt;br /&gt;
&lt;br /&gt;
In order for this to apply to the root user as well do the following:&lt;br /&gt;
Login as root using either:&lt;br /&gt;
 sudo su -&lt;br /&gt;
or&lt;br /&gt;
 su -&lt;br /&gt;
&lt;br /&gt;
Create a .ssh directory if it doesn't exist, copy over the private key file, and try to connect to the alfa vault. You should be able to connect without typing the password.&lt;br /&gt;
 mkdir ~/.ssh&lt;br /&gt;
 cp /home/alfa/.ssh/id_dsa ~/.ssh/&lt;br /&gt;
 ssh alfa@alandfaraway.org&lt;br /&gt;
&lt;br /&gt;
== Automatic Connection Script ==&lt;br /&gt;
 ### BEGIN INIT INFO&lt;br /&gt;
 # Provides: sshfs&lt;br /&gt;
 # Required-Start:    $remote_fs $syslog $network&lt;br /&gt;
 # Required-Stop:     $remote_fs $syslog $network&lt;br /&gt;
 # Default-Start:     2 3 4 5&lt;br /&gt;
 # Default-Stop:      0 1 6&lt;br /&gt;
 # Short-Description: sshfs alfa&lt;br /&gt;
 # Description:       Automatically mounts the alfa vault using sshfs&lt;br /&gt;
 ### END INIT INFO&lt;br /&gt;
  &lt;br /&gt;
 # Author: Patrice Torguet/Hialmar &amp;lt;torguet@gmail.com&amp;gt;&lt;br /&gt;
  &lt;br /&gt;
 # Do NOT &amp;quot;set -e&amp;quot;&lt;br /&gt;
  &lt;br /&gt;
 # PATH should only include /usr/* if it runs after the mountnfs.sh script&lt;br /&gt;
 PATH=/sbin:/usr/sbin:/bin:/usr/bin&lt;br /&gt;
 DESC=&amp;quot;Automatically mounts the alfa vault using sshfs&amp;quot;&lt;br /&gt;
 NAME=sshfs&lt;br /&gt;
 DAEMON=/usr/bin/$NAME&lt;br /&gt;
 DAEMON_ARGS=&amp;quot;alfa@alandfaraway.org:/home/alfa/vault /home/alfa/vault -o allow_other,reconnect,ssh_command=/usr/local/bin/alfa-sshfs-ssh&amp;quot;&lt;br /&gt;
 PIDFILE=/var/run/$NAME.pid&lt;br /&gt;
 SCRIPTNAME=/etc/init.d/$NAME&lt;br /&gt;
  &lt;br /&gt;
 # Exit if the package is not installed&lt;br /&gt;
 [ -x &amp;quot;$DAEMON&amp;quot; ] || exit 0&lt;br /&gt;
  &lt;br /&gt;
 # Read configuration variable file if it is present&lt;br /&gt;
 [ -r /etc/default/$NAME ] &amp;amp;&amp;amp; . /etc/default/$NAME&lt;br /&gt;
  &lt;br /&gt;
 # Load the VERBOSE setting and other rcS variables&lt;br /&gt;
 . /lib/init/vars.sh&lt;br /&gt;
  &lt;br /&gt;
 # Define LSB log_* functions.&lt;br /&gt;
 # Depend on lsb-base (&amp;gt;= 3.2-14) to ensure that this file is present&lt;br /&gt;
 # and status_of_proc is working.&lt;br /&gt;
 . /lib/lsb/init-functions&lt;br /&gt;
  &lt;br /&gt;
 #&lt;br /&gt;
 # Function that starts the daemon/service&lt;br /&gt;
 #&lt;br /&gt;
 do_start()&lt;br /&gt;
 {&lt;br /&gt;
    # Return&lt;br /&gt;
    #   0 if daemon has been started&lt;br /&gt;
    #   1 if daemon was already running&lt;br /&gt;
    #   2 if daemon could not be started&lt;br /&gt;
  &lt;br /&gt;
    date &amp;gt;&amp;gt; /var/log/sshfs.log&lt;br /&gt;
    echo 'trying to umount' | tee -a /var/log/sshfs.log&lt;br /&gt;
    umount -l /home/alfa/vault || echo &amp;quot;umount failed with error code $?&amp;quot; | tee -a /var/log/sshfs.log&lt;br /&gt;
    echo 'cleaning mount point' | tee -a /var/log/sshfs.log&lt;br /&gt;
    [ -x &amp;quot;/home/alfa/vault_pbs&amp;quot; ] || mkdir /home/alfa/vault_pbs&lt;br /&gt;
    rmdir /home/alfa/vault || mv /home/alfa/vault &amp;quot;/home/alfa/vault_pbs/vault`date +-%Y-%m-%d-%Hh%Mm%Ss`&amp;quot;&lt;br /&gt;
    mkdir /home/alfa/vault &amp;amp;&amp;amp; chmod a+rwx /home/alfa/vault&lt;br /&gt;
    echo 'calling sshfs' | tee -a /var/log/sshfs.log&lt;br /&gt;
    $DAEMON $DAEMON_ARGS || return 2&lt;br /&gt;
    date &amp;gt;&amp;gt; /var/log/sshfs.log&lt;br /&gt;
    echo 'sshfs done' | tee -a /var/log/sshfs.log&lt;br /&gt;
  &lt;br /&gt;
 }&lt;br /&gt;
  &lt;br /&gt;
 #&lt;br /&gt;
 # Function that stops the daemon/service&lt;br /&gt;
 #&lt;br /&gt;
 do_stop()&lt;br /&gt;
 {&lt;br /&gt;
    # Return&lt;br /&gt;
    #   0 if daemon has been stopped&lt;br /&gt;
    #   1 if daemon was already stopped&lt;br /&gt;
    #   2 if daemon could not be stopped&lt;br /&gt;
    #   other if a failure occurred&lt;br /&gt;
    echo 'umount' | tee -a /var/log/sshfs.log&lt;br /&gt;
    umount -l /home/alfa/vault || return 1&lt;br /&gt;
  &lt;br /&gt;
 }&lt;br /&gt;
  &lt;br /&gt;
 case &amp;quot;$1&amp;quot; in&lt;br /&gt;
   start)&lt;br /&gt;
    [ &amp;quot;$VERBOSE&amp;quot; != no ] &amp;amp;&amp;amp; log_daemon_msg &amp;quot;Starting $DESC&amp;quot; &amp;quot;$NAME&amp;quot;&lt;br /&gt;
    do_start&lt;br /&gt;
    case &amp;quot;$?&amp;quot; in&lt;br /&gt;
       0|1) [ &amp;quot;$VERBOSE&amp;quot; != no ] &amp;amp;&amp;amp; log_end_msg 0 ;;&lt;br /&gt;
       2) [ &amp;quot;$VERBOSE&amp;quot; != no ] &amp;amp;&amp;amp; log_end_msg 1 ;;&lt;br /&gt;
    esac&lt;br /&gt;
    ;;&lt;br /&gt;
   stop)&lt;br /&gt;
    [ &amp;quot;$VERBOSE&amp;quot; != no ] &amp;amp;&amp;amp; log_daemon_msg &amp;quot;Stopping $DESC&amp;quot; &amp;quot;$NAME&amp;quot;&lt;br /&gt;
    do_stop&lt;br /&gt;
    case &amp;quot;$?&amp;quot; in&lt;br /&gt;
       0|1) [ &amp;quot;$VERBOSE&amp;quot; != no ] &amp;amp;&amp;amp; log_end_msg 0 ;;&lt;br /&gt;
       2) [ &amp;quot;$VERBOSE&amp;quot; != no ] &amp;amp;&amp;amp; log_end_msg 1 ;;&lt;br /&gt;
    esac&lt;br /&gt;
    ;;&lt;br /&gt;
   status)&lt;br /&gt;
        status_of_proc &amp;quot;$DAEMON&amp;quot; &amp;quot;$NAME&amp;quot; &amp;amp;&amp;amp; exit 0 || exit $?&lt;br /&gt;
        ;;&lt;br /&gt;
   restart|force-reload)&lt;br /&gt;
    #&lt;br /&gt;
    # If the &amp;quot;reload&amp;quot; option is implemented then remove the&lt;br /&gt;
    # 'force-reload' alias&lt;br /&gt;
    #&lt;br /&gt;
    log_daemon_msg &amp;quot;Restarting $DESC&amp;quot; &amp;quot;$NAME&amp;quot;&lt;br /&gt;
    do_stop&lt;br /&gt;
    case &amp;quot;$?&amp;quot; in&lt;br /&gt;
      0|1)&lt;br /&gt;
       do_start&lt;br /&gt;
       case &amp;quot;$?&amp;quot; in&lt;br /&gt;
          0) log_end_msg 0 ;;&lt;br /&gt;
          1) log_end_msg 1 ;; # Old process is still running&lt;br /&gt;
          *) log_end_msg 1 ;; # Failed to start&lt;br /&gt;
       esac&lt;br /&gt;
       ;;&lt;br /&gt;
      *)&lt;br /&gt;
         # Failed to stop&lt;br /&gt;
       log_end_msg 1&lt;br /&gt;
       ;;&lt;br /&gt;
    esac&lt;br /&gt;
    ;;&lt;br /&gt;
   *)&lt;br /&gt;
    echo &amp;quot;Usage: $SCRIPTNAME {start|stop|status|restart|force-reload}&amp;quot; &amp;gt;&amp;amp;2&lt;br /&gt;
    exit 3&lt;br /&gt;
    ;;&lt;br /&gt;
 esac&lt;br /&gt;
  &lt;br /&gt;
 :&lt;br /&gt;
&lt;br /&gt;
You have to put it in /etc/init.d (I have named it sshfs) and chmod it (chmod a+x sshfs). Then type in:&lt;br /&gt;
 update-rc.d -f sshfs defaults&lt;br /&gt;
This will add links in the rc.d directories.&lt;br /&gt;
&lt;br /&gt;
== Keeping Connection Alive ==&lt;br /&gt;
This is a config file for ssh that will let ssh and sshfs send keep alive messages every 15 seconds.  This file should be called &amp;quot;config&amp;quot; and be in root's .ssh directory.&lt;br /&gt;
 Host *&lt;br /&gt;
 ServerAliveInterval 15&lt;br /&gt;
 Host alandfaraway.info&lt;br /&gt;
 User alfa&lt;br /&gt;
 IdentityFile ~/.ssh/id_dsa&lt;br /&gt;
 Host alandfaraway.org&lt;br /&gt;
 User alfa&lt;br /&gt;
 IdentityFile ~/.ssh/id_dsa&lt;br /&gt;
&lt;br /&gt;
== SSH Script for MySQL ==&lt;br /&gt;
The SSHFS connection is also used for connecting to MySQL securely.  You must place the following contents in a file at /usr/local/bin/alfa-sshfs-ssh .  That file will be referenced by the sshfs init script.&lt;br /&gt;
 #!/bin/bash&lt;br /&gt;
 &lt;br /&gt;
 a=$@&lt;br /&gt;
 shopt -s extglob&lt;br /&gt;
 ssh -g -L 3306:127.0.0.1:3306 ${a//-oClearAllForward*([^ ])?( )}&lt;br /&gt;
&lt;br /&gt;
Make the script executable after you have pasted it in:&lt;br /&gt;
 chmod +x /usr/local/bin/alfa-sshfs-ssh&lt;br /&gt;
&lt;br /&gt;
'''If the Linux machine is directly connected to the Internet, specify the right interface for the port forward'''.  Make sure to set up firewall rules for allowing port 3306 inbound, too.  This should NOT be allowed inbound from the internet, just the local LAN (or Windows gameserver instance). &lt;br /&gt;
&lt;br /&gt;
== Sambia Install ==&lt;br /&gt;
If you need samba to access the vault continue, if you don't (Windows VM hosted on a Linux OS) you can stop here. Install Sambia:&lt;br /&gt;
 apt-get install samba&lt;br /&gt;
&lt;br /&gt;
Modify samba configuration file so that in the authentication part (it starts with ####### Authentication #######) you have the following uncommented:&lt;br /&gt;
  security = user&lt;br /&gt;
And in the Home directory related part (it starts with [homes] you should have:&lt;br /&gt;
  read only = no&lt;br /&gt;
After this you must do:&lt;br /&gt;
 /etc/init.d/samba restart&lt;br /&gt;
On the windows machine you should now be able to type this in a cmd.exe:&lt;br /&gt;
 net use z \\WindowsIP\alfa&lt;/div&gt;</summary>
		<author><name>Basilica</name></author>	</entry>

	<entry>
		<id>https://www.alandfaraway.info/Wiki/index.php?title=Basic_Host_Requirements&amp;diff=2628</id>
		<title>Basic Host Requirements</title>
		<link rel="alternate" type="text/html" href="https://www.alandfaraway.info/Wiki/index.php?title=Basic_Host_Requirements&amp;diff=2628"/>
				<updated>2014-08-10T05:29:45Z</updated>
		
		<summary type="html">&lt;p&gt;Basilica: More SQL setup documentation&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Technical Manuals]]&lt;br /&gt;
== System Requirements ==&lt;br /&gt;
ALFA strongly recommends that all game servers run a 64-bit OS for the operating system that runs nwn2server. A 32-bit OS does not provide enough address space for many modules to function reliably when hosted by nwn2server.&lt;br /&gt;
&lt;br /&gt;
If nwn2server is hosted in a virtual machine, ALFA recommends that either [http://www.vmware.com/ VMware] or [http://www.microsoft.com/hyper-v/‎ Hyper-V] be used for the virtualization infrastructure. Both of these products have both been validated and are functional in production use for live servers.&lt;br /&gt;
&lt;br /&gt;
Specifically noted, VirtualBox should not be used or the game will not function properly, on account of bugs in VirtualBox's timer handling (often manifests as perception not working over time or other time-based systems in the game malfunctioning).&lt;br /&gt;
&lt;br /&gt;
It is preferred that the Windows version (Windows 8.1 or Windows Server 2012 or higher are recommended) used to host the game server be a version that supports acting as a Remote Desktop Protocol (RDP) host, typically Professional (or higher) editions. Server editions also include Remote Desktop Protocol host functionality. RDP provides a superior remote administration experience as compared to VNC.&lt;br /&gt;
&lt;br /&gt;
The recommended memory size to allocate to a game server instance is 4GB. This may be adjusted based on the actual memory consumption of a module, but 2GB provides plenty of headroom for most of our servers.&lt;br /&gt;
&lt;br /&gt;
== Prerequisites ==&lt;br /&gt;
* [http://www.microsoft.com/en-us/download/details.aspx?id=26347 Microsoft Visual C++ 2005 Service Pack 1 Redistributable Package MFC Security Update]&lt;br /&gt;
* [http://www.microsoft.com/en-us/download/details.aspx?id=8328 Microsoft Visual C++ 2010 SP1 Redistributable Package (x86)]&lt;br /&gt;
* [http://support.microsoft.com/kb/968929/en-us Windows Management Framework Core] -- For operating systems older than Windows 7. Only need Windows PowerShell 2.0.&lt;br /&gt;
&lt;br /&gt;
= NWNx4 =&lt;br /&gt;
ALFA uses [http://www.nwnx.org/index.php?id=nwnx4 NWNx4] to host all of its live servers.&lt;br /&gt;
&lt;br /&gt;
While this document cannot replace the documentation provided with NWNx4, a brief explanation can be offered: NWNx4 is an application which runs alongside the nwn2server application, communicating with, running processes for, and altering the data within to achieve functionality which cannot be created without such means.&lt;br /&gt;
&lt;br /&gt;
The NWNx4 application works with a number of community-generated plugins-- libraries of functions and hooks, which are either called from the NWN scripting language or which intercept standard functions or functionality to correct bugs-- which are required for the proper function of [[ALFA Core Rules | ALFA's core ruleset]].&lt;br /&gt;
&lt;br /&gt;
Download the files from ACR.&lt;br /&gt;
* [https://github.com/ALandFarAway/ALFA-Base-Resources/tree/master/Server_Files/nwn2server%20directory nwn2server directory] -- These files go in the same folder as nwn2server.exe.&lt;br /&gt;
* [https://github.com/ALandFarAway/ALFA-Base-Resources/tree/master/Server_Files/nwnx4%20directory nwnx4 directory] -- These files go into your NWNx4 folder.&lt;br /&gt;
&lt;br /&gt;
NWNx4 is configured through the nwnx.ini file, which is plain text and contains help text to describe the function of each setting, which is installed to the NWNx4 install directory. Once configured, a server is run through NWNx4 by running one of the NWNx4 executables. The started application will also start nwn2server.&lt;br /&gt;
&lt;br /&gt;
== Currently Used Plugins ==&lt;br /&gt;
=== Server Folder Files ===&lt;br /&gt;
* '''NWNScriptJIT.dll''' -- NWScript JIT support, C# script support&lt;br /&gt;
* '''NWNScriptJITIntrinsics.dll''' -- NWScript JIT support, C# script support&lt;br /&gt;
* '''AuroraServerNetLayer.dll''' -- bug fixes&lt;br /&gt;
* '''NWNScriptCompiler.exe''' -- The script compiler should be somewhere in %PATH%, but it can be placed in the server install directory too.  Needed for the content patcher to automatically recompile modules on updates (required, or else the module could break after a content patch).&lt;br /&gt;
&lt;br /&gt;
=== NWNx4 Folder Files ===&lt;br /&gt;
* '''NWNx4_Hook.dll''' -- Allows script hooking in the first place.&lt;br /&gt;
* '''NWNScriptCompiler.exe -- Required to allow the content patcher to recompile a module. Take from AdvancedScriptCompiler\NWNScriptCompiler.exe on the ACR repository.&lt;br /&gt;
* '''xp_AuroraServerNWScript.dll''' -- Script improvements, C# support, allows workarounds of engine limitations.&lt;br /&gt;
* '''xp_bugfix.dll''' -- Bug fixes&lt;br /&gt;
* '''xp_craft.dll''' -- Customization of items during live play&lt;br /&gt;
* '''xp_mysql.dll''' -- Allows communication with SQL databases&lt;br /&gt;
* '''xp_objectattributes.dll''' -- Allows the modification of creatures during live play&lt;br /&gt;
* '''xp_ServerVault.dll''' -- Allows vault reads / writes to occur without stopping the main server process&lt;br /&gt;
* '''xp_srvadmin.dll''' -- Allows scripts to carry out server administration actions.&lt;br /&gt;
* '''xp_system.dll''' -- &lt;br /&gt;
* '''xp_time.dll''' --  &lt;br /&gt;
* '''MySql.Data.dll''' -- MySQL client library for CLR scripts.&lt;br /&gt;
&lt;br /&gt;
=== Configuration ===&lt;br /&gt;
* AuroraServerNWScript.ini&lt;br /&gt;
*: &amp;lt;code&amp;gt;AllowManagedScripts=1&amp;lt;/code&amp;gt;&lt;br /&gt;
* xp_craft.ini&lt;br /&gt;
** Set the database directory to proper location of the Campaign Database on the machine&lt;br /&gt;
* AuroraServerVault.ini&lt;br /&gt;
** The text within the configuration file explains how to configure the plugin. If this configuration fails, players will be unable to see their vaults.&lt;br /&gt;
** Typical configuration is to set LocalServerVaultPath=C:\NWN2User\servervault , RemoteServerVaultPath=C:\NWN2User\remotevault , SpoolPath=C:\NWN2User\servervaultspool. All three of these can be anywhere, so long as it is clear to anyone doing maintenance what they are (&amp;quot;remote vault&amp;quot; is where bics will be downloaded to for verification, &amp;quot;spool&amp;quot; is where saved bics will be staged for upload, and &amp;quot;local server vault&amp;quot; is the directory from which characters will be played).&lt;br /&gt;
** The text within the configuration file explains how to configure the plugin. If this configuration fails, the server will default to inappropriate settings (such as PvP, download server, or custom GUIs) or requiring the module to be started manually after nwn2server.exe stops.&lt;br /&gt;
** Remember to ensure that the directories specified in the config file exist!  They have to be created manually (except for the LocalServerVaultPath which is automatically created by nwn2server.exe, though it can be manually created safely).  If the directories don't all exist, the vault won't work correctly and players will not be able to log in.&lt;br /&gt;
* nwnx.ini&lt;br /&gt;
** The ACR requires a temporary directory to run. It can be anywhere that the user who runs the NWNx4 process can write to. It is set in nwn2temp&lt;br /&gt;
* DatabaseConnector.ini&lt;br /&gt;
** DatabaseConnector has only one setting in it, which should look something like:&lt;br /&gt;
*** CommandLine=-batch -L 3306:127.0.0.1:3306 -x -a -T -2 -noagent -N -i C:\NWNX4\ssh.ppk alfa@sql.alandfaraway.org&lt;br /&gt;
*** C:\NWNX4\ssh.ppk is the private key that you're specified for this server.&lt;br /&gt;
**** To create a key pair, use [http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html PuttyGen] to create a new key with all of the default settings.&lt;br /&gt;
**** Save the private key to your NWNx4 directory, and specify that location in the command line&lt;br /&gt;
**** Use [http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html PuTTy] to connect to alfa@sql.alandfaraway.org (as an HDM, you should have credentials for this) and edit (pico is the Linux command) .\alfa\.ssh\authorized_keys to add the public key to the bottom. Then, run (Windows+R) &amp;quot;&amp;lt;file location of putty&amp;gt; alfa@sql.alandfaraway.org -i &amp;lt;file location of your public key&amp;gt;&amp;quot; -- you will be prompted asking if you want to cache the public key from the server you're connecting to. Pick &amp;quot;yes&amp;quot; and close the connection.&lt;br /&gt;
* xp_mysql.ini&lt;br /&gt;
** Set the database credentials up as per standard for the central server.  TA, IA, or tech team can help provide credentials.&lt;br /&gt;
** Set server = localhost to use the DatabaseConnector managed tunnel (all servers should generally use this).  If a Linux sshfs VM is in use instead, set server = linuxhost where linuxhost is the address of the Linux VM (this method is deprecated).&lt;/div&gt;</summary>
		<author><name>Basilica</name></author>	</entry>

	<entry>
		<id>https://www.alandfaraway.info/Wiki/index.php?title=Server_Vault&amp;diff=2627</id>
		<title>Server Vault</title>
		<link rel="alternate" type="text/html" href="https://www.alandfaraway.info/Wiki/index.php?title=Server_Vault&amp;diff=2627"/>
				<updated>2014-08-10T05:22:30Z</updated>
		
		<summary type="html">&lt;p&gt;Basilica: Add more setup links&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Technical Manuals]]&lt;br /&gt;
The server vault, the centralized repository for all ALFA character files, is hosted in [http://azure.microsoft.com Microsoft Azure].  Formerly, it was connected over SSHFS, but this system has been deprecated as it had reliability issues and forced the existence of two separate OS's (Windows and Linux) that had to be independently patched, managed, and maintained for each game server instance.&lt;br /&gt;
&lt;br /&gt;
=== Game server setup ===&lt;br /&gt;
&lt;br /&gt;
See [[Basic Host Requirements#Configuration|Basic Host Requirements: Configuration]] for details on how to set up DatabaseConnector.ini to manage the SSH tunnel used to connect to MySQL.&lt;br /&gt;
&lt;br /&gt;
=== Management ===&lt;br /&gt;
&lt;br /&gt;
The VaultTransferTool, built out of the ACR repository (VaultManagement\VaultTransferTool), provides a basic set of functionality for managing the server vault, including uploading files to the vault (but only if the vault didn't have a more up to date version of the files), downloading the entire vault to a directory (but only for files that were older than the vault versions), as well as selectively deleting files from the vault.&lt;br /&gt;
&lt;br /&gt;
One use of the VaultTransferTool would be to locally archive copies of the entire vault for selective restoration in case a character rollback had to be performed for technical or management reasons.  Another use might be for selective BIC edits.&lt;br /&gt;
&lt;br /&gt;
You can also use a tool like [http://aka.ms/AzCopy AzCopy] to copy files to and from Azure, or any [http://blogs.msdn.com/b/windowsazurestorage/archive/2014/03/11/windows-azure-storage-explorers-2014.aspx Azure Storage Explorer] tool to browse the vault interactively.  These require the use of an account name and access key, which can be obtained from the connection string (see the [[#VaultTransferTool|VaultTransferTool]] section below for details).  While the VaultTransferTool is slower for bulk transfers than AzCopy due to operating synchronously, the use of the VaultTransferTool is recommended for most operations if possible because it handles case conversion properly (all files on the Azure vault must be lowercased) and automatically avoids overwriting newer files.&lt;br /&gt;
&lt;br /&gt;
When deleting character files from the vault, remember to use the ALFA website's Clear Vault Cache tool to clear out any cached copies of the character file to delete in addition to removing the file from the Azure vault, so that the character file is not brought back the next time a player logs on to a server that previously hosted the character.&lt;br /&gt;
&lt;br /&gt;
=== VaultTransferTool ===&lt;br /&gt;
Build the ACR repository and then build the ACR_ManagedScripts solution in alfa2_acr.hak\ACR_ManagedScripts (or else simply build VaultManagement\VaultTransferTool\VaultTransferTool.csproj directly from MSBUILD).&lt;br /&gt;
&lt;br /&gt;
All usage of the VaultTransferTool needs a connection string.  Get this from the config table in the database (VaultConnectionString), and pass it on the command line with -connectionstring VaultConnectionString, in addition to the operation to perform.  See [[ACR Configuration Settings]] for my details on the database config table.&lt;br /&gt;
&lt;br /&gt;
Help text for the vault tool:&lt;br /&gt;
&lt;br /&gt;
ALFA Azure Vault Management Tool v1.0.5334.26752&lt;br /&gt;
&lt;br /&gt;
Usage:&lt;br /&gt;
 VaultTransferTool [-connectionstring &amp;lt;connection string&amp;gt;] [-download &amp;lt;path&amp;gt; | -upload &amp;lt;path&amp;gt; | -delete &amp;lt;path&amp;gt;] [-includeall]&lt;br /&gt;
&lt;br /&gt;
The -connectionstring argument designates the Azure connection string to use to communicate with the vault.&lt;br /&gt;
&lt;br /&gt;
One of -download &amp;lt;path&amp;gt;, -upload &amp;lt;path&amp;gt;, or -delete &amp;lt;path&amp;gt; must be specified.  The -download and -upload options enable downloading files from the vault, or uploading files to the vault.  The given path should be laid out like a normal server vault directory, with a subdirectory for each account name and character (*.bic) files in each subdirectory.  Files are never deleted from the remote vault, only updated with -download or -upload.  A file is only transferred if the source of the transfer is newer than the destination file (unmodified files aren't copied again).&lt;br /&gt;
&lt;br /&gt;
To delete a file, use -delete &amp;lt;path&amp;gt; where &amp;lt;path&amp;gt; is in the form of account\character.bic.  The file is permanently deleted from the Azure vault, but the cache should still be purged from each server using the purge cache tool to ensure that it is not regenerated the next time a player logs on to a server that had previously cached the character file to delete.  The file to be deleted doesn't need to exist on the local machine, and is not deleted from the local machine if it did exist.&lt;br /&gt;
&lt;br /&gt;
Normally, only character files (*.bic) are transferred.  Use the -includeall argument to transfer all files, regardless of file extension.&lt;br /&gt;
&lt;br /&gt;
=== Technical details ===&lt;br /&gt;
&lt;br /&gt;
The [https://github.com/ALandFarAway/ALFA-Base-Resources/blob/master/alfa2_acr.hak/ACR_ServerCommunicator/ServerVaultConnector.cs ServerVaultConnector] object in the ACR_ServerCommunicator manages the Azure vault storage, in conjunction with the server vault NWNX4 plugin.  [https://github.com/ALandFarAway/ALFA-Base-Resources/blob/master/alfa2_acr.hak/ALFA.Shared ALFA.Shared] contains a wrapper (FileStore, AzureFileStore) around the Azure .NET storage library that manages the low level connectivity to the backing store for the vault.&lt;br /&gt;
&lt;br /&gt;
The [https://github.com/ALandFarAway/ALFA-Base-Resources/blob/master/VaultManagement/VaultTransferTool/Program.cs VaultTransferTool] uses the ALFA.Shared FileStore/AzureFileStore mechanism to manage the vault.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Obsolete SSHFS vault documentation ===&lt;br /&gt;
 &lt;br /&gt;
See [[Connecting to the Server Vault]] for the obsolete documentation on the old SSHFS based vault mechanism.  '''This isn't in use on any servers anymore.'''&lt;/div&gt;</summary>
		<author><name>Basilica</name></author>	</entry>

	<entry>
		<id>https://www.alandfaraway.info/Wiki/index.php?title=Server_Vault&amp;diff=2626</id>
		<title>Server Vault</title>
		<link rel="alternate" type="text/html" href="https://www.alandfaraway.info/Wiki/index.php?title=Server_Vault&amp;diff=2626"/>
				<updated>2014-08-10T05:17:22Z</updated>
		
		<summary type="html">&lt;p&gt;Basilica: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Technical Manuals]]&lt;br /&gt;
The server vault, the centralized repository for all ALFA character files, is hosted in [http://azure.microsoft.com Microsoft Azure].  Formerly, it was connected over SSHFS, but this system has been deprecated as it had reliability issues and forced the existence of two separate OS's (Windows and Linux) that had to be independently patched, managed, and maintained for each game server instance.&lt;br /&gt;
&lt;br /&gt;
The VaultTransferTool, built out of the ACR repository (VaultManagement\VaultTransferTool), provides a basic set of functionality for managing the server vault, including uploading files to the vault (but only if the vault didn't have a more up to date version of the files), downloading the entire vault to a directory (but only for files that were older than the vault versions), as well as selectively deleting files from the vault.&lt;br /&gt;
&lt;br /&gt;
One use of the VaultTransferTool would be to locally archive copies of the entire vault for selective restoration in case a character rollback had to be performed for technical or management reasons.  Another use might be for selective BIC edits.&lt;br /&gt;
&lt;br /&gt;
You can also use a tool like [http://aka.ms/AzCopy AzCopy] to copy files to and from Azure, or any [http://blogs.msdn.com/b/windowsazurestorage/archive/2014/03/11/windows-azure-storage-explorers-2014.aspx Azure Storage Explorer] tool to browse the vault interactively.  These require the use of an account name and access key, which can be obtained from the connection string (see the [[#VaultTransferTool|VaultTransferTool]] section below for details).  While the VaultTransferTool is slower for bulk transfers than AzCopy due to operating synchronously, the use of the VaultTransferTool is recommended for most operations if possible because it handles case conversion properly (all files on the Azure vault must be lowercased) and automatically avoids overwriting newer files.&lt;br /&gt;
&lt;br /&gt;
When deleting character files from the vault, remember to use the ALFA website's Clear Vault Cache tool to clear out any cached copies of the character file to delete in addition to removing the file from the Azure vault, so that the character file is not brought back the next time a player logs on to a server that previously hosted the character.&lt;br /&gt;
&lt;br /&gt;
=== VaultTransferTool ===&lt;br /&gt;
Build the ACR repository and then build the ACR_ManagedScripts solution in alfa2_acr.hak\ACR_ManagedScripts (or else simply build VaultManagement\VaultTransferTool\VaultTransferTool.csproj directly from MSBUILD).&lt;br /&gt;
&lt;br /&gt;
All usage of the VaultTransferTool needs a connection string.  Get this from the config table in the database (VaultConnectionString), and pass it on the command line with -connectionstring VaultConnectionString, in addition to the operation to perform.  See [[ACR Configuration Settings]] for my details on the database config table.&lt;br /&gt;
&lt;br /&gt;
Help text for the vault tool:&lt;br /&gt;
&lt;br /&gt;
ALFA Azure Vault Management Tool v1.0.5334.26752&lt;br /&gt;
&lt;br /&gt;
Usage:&lt;br /&gt;
 VaultTransferTool [-connectionstring &amp;lt;connection string&amp;gt;] [-download &amp;lt;path&amp;gt; | -upload &amp;lt;path&amp;gt; | -delete &amp;lt;path&amp;gt;] [-includeall]&lt;br /&gt;
&lt;br /&gt;
The -connectionstring argument designates the Azure connection string to use to communicate with the vault.&lt;br /&gt;
&lt;br /&gt;
One of -download &amp;lt;path&amp;gt;, -upload &amp;lt;path&amp;gt;, or -delete &amp;lt;path&amp;gt; must be specified.  The -download and -upload options enable downloading files from the vault, or uploading files to the vault.  The given path should be laid out like a normal server vault directory, with a subdirectory for each account name and character (*.bic) files in each subdirectory.  Files are never deleted from the remote vault, only updated with -download or -upload.  A file is only transferred if the source of the transfer is newer than the destination file (unmodified files aren't copied again).&lt;br /&gt;
&lt;br /&gt;
To delete a file, use -delete &amp;lt;path&amp;gt; where &amp;lt;path&amp;gt; is in the form of account\character.bic.  The file is permanently deleted from the Azure vault, but the cache should still be purged from each server using the purge cache tool to ensure that it is not regenerated the next time a player logs on to a server that had previously cached the character file to delete.  The file to be deleted doesn't need to exist on the local machine, and is not deleted from the local machine if it did exist.&lt;br /&gt;
&lt;br /&gt;
Normally, only character files (*.bic) are transferred.  Use the -includeall argument to transfer all files, regardless of file extension.&lt;br /&gt;
&lt;br /&gt;
=== Technical details ===&lt;br /&gt;
&lt;br /&gt;
The [https://github.com/ALandFarAway/ALFA-Base-Resources/blob/master/alfa2_acr.hak/ACR_ServerCommunicator/ServerVaultConnector.cs ServerVaultConnector] object in the ACR_ServerCommunicator manages the Azure vault storage, in conjunction with the server vault NWNX4 plugin.  [https://github.com/ALandFarAway/ALFA-Base-Resources/blob/master/alfa2_acr.hak/ALFA.Shared ALFA.Shared] contains a wrapper (FileStore, AzureFileStore) around the Azure .NET storage library that manages the low level connectivity to the backing store for the vault.&lt;br /&gt;
&lt;br /&gt;
The [https://github.com/ALandFarAway/ALFA-Base-Resources/blob/master/VaultManagement/VaultTransferTool/Program.cs VaultTransferTool] uses the ALFA.Shared FileStore/AzureFileStore mechanism to manage the vault.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Obsolete SSHFS vault documentation ===&lt;br /&gt;
 &lt;br /&gt;
See [[Connecting to the Server Vault]] for the obsolete documentation on the old SSHFS based vault mechanism.  '''This isn't in use on any servers anymore.'''&lt;/div&gt;</summary>
		<author><name>Basilica</name></author>	</entry>

	<entry>
		<id>https://www.alandfaraway.info/Wiki/index.php?title=Basic_Host_Requirements&amp;diff=2625</id>
		<title>Basic Host Requirements</title>
		<link rel="alternate" type="text/html" href="https://www.alandfaraway.info/Wiki/index.php?title=Basic_Host_Requirements&amp;diff=2625"/>
				<updated>2014-08-10T05:09:41Z</updated>
		
		<summary type="html">&lt;p&gt;Basilica: Try again to fix link&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Technical Manuals]]&lt;br /&gt;
== System Requirements ==&lt;br /&gt;
ALFA strongly recommends that all game servers run a 64-bit OS for the operating system that runs nwn2server. A 32-bit OS does not provide enough address space for many modules to function reliably when hosted by nwn2server.&lt;br /&gt;
&lt;br /&gt;
If nwn2server is hosted in a virtual machine, ALFA recommends that either [http://www.vmware.com/ VMware] or [http://www.microsoft.com/hyper-v/‎ Hyper-V] be used for the virtualization infrastructure. Both of these products have both been validated and are functional in production use for live servers.&lt;br /&gt;
&lt;br /&gt;
Specifically noted, VirtualBox should not be used or the game will not function properly, on account of bugs in VirtualBox's timer handling (often manifests as perception not working over time or other time-based systems in the game malfunctioning).&lt;br /&gt;
&lt;br /&gt;
It is preferred that the Windows version (Windows 8.1 or Windows Server 2012 or higher are recommended) used to host the game server be a version that supports acting as a Remote Desktop Protocol (RDP) host, typically Professional (or higher) editions. Server editions also include Remote Desktop Protocol host functionality. RDP provides a superior remote administration experience as compared to VNC.&lt;br /&gt;
&lt;br /&gt;
The recommended memory size to allocate to a game server instance is 4GB. This may be adjusted based on the actual memory consumption of a module, but 2GB provides plenty of headroom for most of our servers.&lt;br /&gt;
&lt;br /&gt;
== Prerequisites ==&lt;br /&gt;
* [http://www.microsoft.com/en-us/download/details.aspx?id=26347 Microsoft Visual C++ 2005 Service Pack 1 Redistributable Package MFC Security Update]&lt;br /&gt;
* [http://www.microsoft.com/en-us/download/details.aspx?id=8328 Microsoft Visual C++ 2010 SP1 Redistributable Package (x86)]&lt;br /&gt;
* [http://support.microsoft.com/kb/968929/en-us Windows Management Framework Core] -- For operating systems older than Windows 7. Only need Windows PowerShell 2.0.&lt;br /&gt;
&lt;br /&gt;
= NWNx4 =&lt;br /&gt;
ALFA uses [http://www.nwnx.org/index.php?id=nwnx4 NWNx4] to host all of its live servers.&lt;br /&gt;
&lt;br /&gt;
While this document cannot replace the documentation provided with NWNx4, a brief explanation can be offered: NWNx4 is an application which runs alongside the nwn2server application, communicating with, running processes for, and altering the data within to achieve functionality which cannot be created without such means.&lt;br /&gt;
&lt;br /&gt;
The NWNx4 application works with a number of community-generated plugins-- libraries of functions and hooks, which are either called from the NWN scripting language or which intercept standard functions or functionality to correct bugs-- which are required for the proper function of [[ALFA Core Rules | ALFA's core ruleset]].&lt;br /&gt;
&lt;br /&gt;
Download the files from ACR.&lt;br /&gt;
* [https://github.com/ALandFarAway/ALFA-Base-Resources/tree/master/Server_Files/nwn2server%20directory nwn2server directory] -- These files go in the same folder as nwn2server.exe.&lt;br /&gt;
* [https://github.com/ALandFarAway/ALFA-Base-Resources/tree/master/Server_Files/nwnx4%20directory nwnx4 directory] -- These files go into your NWNx4 folder.&lt;br /&gt;
&lt;br /&gt;
NWNx4 is configured through the nwnx.ini file, which is plain text and contains help text to describe the function of each setting, which is installed to the NWNx4 install directory. Once configured, a server is run through NWNx4 by running one of the NWNx4 executables. The started application will also start nwn2server.&lt;br /&gt;
&lt;br /&gt;
== Currently Used Plugins ==&lt;br /&gt;
=== Server Folder Files ===&lt;br /&gt;
* '''NWNScriptJIT.dll''' -- NWScript JIT support, C# script support&lt;br /&gt;
* '''NWNScriptJITIntrinsics.dll''' -- NWScript JIT support, C# script support&lt;br /&gt;
* '''AuroraServerNetLayer.dll''' -- bug fixes&lt;br /&gt;
* '''NWNScriptCompiler.exe''' -- The script compiler should be somewhere in %PATH%, but it can be placed in the server install directory too.  Needed for the content patcher to automatically recompile modules on updates (required, or else the module could break after a content patch).&lt;br /&gt;
&lt;br /&gt;
=== NWNx4 Folder Files ===&lt;br /&gt;
* '''NWNx4_Hook.dll''' -- Allows script hooking in the first place.&lt;br /&gt;
* '''NWNScriptCompiler.exe -- Required to allow the content patcher to recompile a module. Take from AdvancedScriptCompiler\NWNScriptCompiler.exe on the ACR repository.&lt;br /&gt;
* '''xp_AuroraServerNWScript.dll''' -- Script improvements, C# support, allows workarounds of engine limitations.&lt;br /&gt;
* '''xp_bugfix.dll''' -- Bug fixes&lt;br /&gt;
* '''xp_craft.dll''' -- Customization of items during live play&lt;br /&gt;
* '''xp_mysql.dll''' -- Allows communication with SQL databases&lt;br /&gt;
* '''xp_objectattributes.dll''' -- Allows the modification of creatures during live play&lt;br /&gt;
* '''xp_ServerVault.dll''' -- Allows vault reads / writes to occur without stopping the main server process&lt;br /&gt;
* '''xp_srvadmin.dll''' -- Allows scripts to carry out server administration actions.&lt;br /&gt;
* '''xp_system.dll''' -- &lt;br /&gt;
* '''xp_time.dll''' --  &lt;br /&gt;
* '''MySql.Data.dll''' -- MySQL client library for CLR scripts.&lt;br /&gt;
&lt;br /&gt;
=== Configuration ===&lt;br /&gt;
* AuroraServerNWScript.ini&lt;br /&gt;
*: &amp;lt;code&amp;gt;AllowManagedScripts=1&amp;lt;/code&amp;gt;&lt;br /&gt;
* xp_craft.ini&lt;br /&gt;
** Set the database directory to proper location of the Campaign Database on the machine&lt;br /&gt;
* AuroraServerVault.ini&lt;br /&gt;
** The text within the configuration file explains how to configure the plugin. If this configuration fails, players will be unable to see their vaults.&lt;br /&gt;
** Typical configuration is to set LocalServerVaultPath=C:\NWN2User\servervault , RemoteServerVaultPath=C:\NWN2User\remotevault , SpoolPath=C:\NWN2User\servervaultspool. All three of these can be anywhere, so long as it is clear to anyone doing maintenance what they are (&amp;quot;remote vault&amp;quot; is where bics will be downloaded to for verification, &amp;quot;spool&amp;quot; is where saved bics will be staged for upload, and &amp;quot;local server vault&amp;quot; is the directory from which characters will be played).&lt;br /&gt;
** The text within the configuration file explains how to configure the plugin. If this configuration fails, the server will default to inappropriate settings (such as PvP, download server, or custom GUIs) or requiring the module to be started manually after nwn2server.exe stops.&lt;br /&gt;
** Remember to ensure that the directories specified in the config file exist!  They have to be created manually (except for the LocalServerVaultPath which is automatically created by nwn2server.exe, though it can be manually created safely).  If the directories don't all exist, the vault won't work correctly and players will not be able to log in.&lt;br /&gt;
* nwnx.ini&lt;br /&gt;
** The ACR requires a temporary directory to run. It can be anywhere that the user who runs the NWNx4 process can write to. It is set in nwn2temp&lt;br /&gt;
* DatabaseConnector.ini&lt;br /&gt;
** DatabaseConnector has only one setting in it, which should look something like:&lt;br /&gt;
*** CommandLine=-batch -L 3306:127.0.0.1:3306 -x -a -T -2 -noagent -N -i C:\NWNX4\ssh.ppk alfa@sql.alandfaraway.org&lt;br /&gt;
*** C:\NWNX4\ssh.ppk is the private key that you're specified for this server.&lt;br /&gt;
**** To create a key pair, use [http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html PuttyGen] to create a new key with all of the default settings.&lt;br /&gt;
**** Save the private key to your NWNx4 directory, and specify that location in the command line&lt;br /&gt;
**** Use [http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html PuTTy] to connect to alfa@sql.alandfaraway.org (as an HDM, you should have credentials for this) and edit (pico is the Linux command) .\alfa\.ssh\authorized_keys to add the public key to the bottom. Then, run (Windows+R) &amp;quot;&amp;lt;file location of putty&amp;gt; alfa@sql.alandfaraway.org -i &amp;lt;file location of your public key&amp;gt;&amp;quot; -- you will be prompted asking if you want to cache the public key from the server you're connecting to. Pick &amp;quot;yes&amp;quot; and close the connection.&lt;/div&gt;</summary>
		<author><name>Basilica</name></author>	</entry>

	<entry>
		<id>https://www.alandfaraway.info/Wiki/index.php?title=Basic_Host_Requirements&amp;diff=2624</id>
		<title>Basic Host Requirements</title>
		<link rel="alternate" type="text/html" href="https://www.alandfaraway.info/Wiki/index.php?title=Basic_Host_Requirements&amp;diff=2624"/>
				<updated>2014-08-10T05:03:58Z</updated>
		
		<summary type="html">&lt;p&gt;Basilica: Fixing link&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Technical Manuals]]&lt;br /&gt;
== System Requirements ==&lt;br /&gt;
ALFA strongly recommends that all game servers run a 64-bit OS for the operating system that runs nwn2server. A 32-bit OS does not provide enough address space for many modules to function reliably when hosted by nwn2server.&lt;br /&gt;
&lt;br /&gt;
If nwn2server is hosted in a virtual machine, ALFA recommends that either [http://www.vmware.com/ VMware] or [http://www.microsoft.com/hyperv‎ Hyper-V] be used for the virtualization infrastructure. Both of these products have both been validated and are functional in production use for live servers.&lt;br /&gt;
&lt;br /&gt;
Specifically noted, VirtualBox should not be used or the game will not function properly, on account of bugs in VirtualBox's timer handling (often manifests as perception not working over time or other time-based systems in the game malfunctioning).&lt;br /&gt;
&lt;br /&gt;
It is preferred that the Windows version (Windows 8.1 or Windows Server 2012 or higher are recommended) used to host the game server be a version that supports acting as a Remote Desktop Protocol (RDP) host, typically Professional (or higher) editions. Server editions also include Remote Desktop Protocol host functionality. RDP provides a superior remote administration experience as compared to VNC.&lt;br /&gt;
&lt;br /&gt;
The recommended memory size to allocate to a game server instance is 4GB. This may be adjusted based on the actual memory consumption of a module, but 2GB provides plenty of headroom for most of our servers.&lt;br /&gt;
&lt;br /&gt;
== Prerequisites ==&lt;br /&gt;
* [http://www.microsoft.com/en-us/download/details.aspx?id=26347 Microsoft Visual C++ 2005 Service Pack 1 Redistributable Package MFC Security Update]&lt;br /&gt;
* [http://www.microsoft.com/en-us/download/details.aspx?id=8328 Microsoft Visual C++ 2010 SP1 Redistributable Package (x86)]&lt;br /&gt;
* [http://support.microsoft.com/kb/968929/en-us Windows Management Framework Core] -- For operating systems older than Windows 7. Only need Windows PowerShell 2.0.&lt;br /&gt;
&lt;br /&gt;
= NWNx4 =&lt;br /&gt;
ALFA uses [http://www.nwnx.org/index.php?id=nwnx4 NWNx4] to host all of its live servers.&lt;br /&gt;
&lt;br /&gt;
While this document cannot replace the documentation provided with NWNx4, a brief explanation can be offered: NWNx4 is an application which runs alongside the nwn2server application, communicating with, running processes for, and altering the data within to achieve functionality which cannot be created without such means.&lt;br /&gt;
&lt;br /&gt;
The NWNx4 application works with a number of community-generated plugins-- libraries of functions and hooks, which are either called from the NWN scripting language or which intercept standard functions or functionality to correct bugs-- which are required for the proper function of [[ALFA Core Rules | ALFA's core ruleset]].&lt;br /&gt;
&lt;br /&gt;
Download the files from ACR.&lt;br /&gt;
* [https://github.com/ALandFarAway/ALFA-Base-Resources/tree/master/Server_Files/nwn2server%20directory nwn2server directory] -- These files go in the same folder as nwn2server.exe.&lt;br /&gt;
* [https://github.com/ALandFarAway/ALFA-Base-Resources/tree/master/Server_Files/nwnx4%20directory nwnx4 directory] -- These files go into your NWNx4 folder.&lt;br /&gt;
&lt;br /&gt;
NWNx4 is configured through the nwnx.ini file, which is plain text and contains help text to describe the function of each setting, which is installed to the NWNx4 install directory. Once configured, a server is run through NWNx4 by running one of the NWNx4 executables. The started application will also start nwn2server.&lt;br /&gt;
&lt;br /&gt;
== Currently Used Plugins ==&lt;br /&gt;
=== Server Folder Files ===&lt;br /&gt;
* '''NWNScriptJIT.dll''' -- NWScript JIT support, C# script support&lt;br /&gt;
* '''NWNScriptJITIntrinsics.dll''' -- NWScript JIT support, C# script support&lt;br /&gt;
* '''AuroraServerNetLayer.dll''' -- bug fixes&lt;br /&gt;
* '''NWNScriptCompiler.exe''' -- The script compiler should be somewhere in %PATH%, but it can be placed in the server install directory too.  Needed for the content patcher to automatically recompile modules on updates (required, or else the module could break after a content patch).&lt;br /&gt;
&lt;br /&gt;
=== NWNx4 Folder Files ===&lt;br /&gt;
* '''NWNx4_Hook.dll''' -- Allows script hooking in the first place.&lt;br /&gt;
* '''NWNScriptCompiler.exe -- Required to allow the content patcher to recompile a module. Take from AdvancedScriptCompiler\NWNScriptCompiler.exe on the ACR repository.&lt;br /&gt;
* '''xp_AuroraServerNWScript.dll''' -- Script improvements, C# support, allows workarounds of engine limitations.&lt;br /&gt;
* '''xp_bugfix.dll''' -- Bug fixes&lt;br /&gt;
* '''xp_craft.dll''' -- Customization of items during live play&lt;br /&gt;
* '''xp_mysql.dll''' -- Allows communication with SQL databases&lt;br /&gt;
* '''xp_objectattributes.dll''' -- Allows the modification of creatures during live play&lt;br /&gt;
* '''xp_ServerVault.dll''' -- Allows vault reads / writes to occur without stopping the main server process&lt;br /&gt;
* '''xp_srvadmin.dll''' -- Allows scripts to carry out server administration actions.&lt;br /&gt;
* '''xp_system.dll''' -- &lt;br /&gt;
* '''xp_time.dll''' --  &lt;br /&gt;
* '''MySql.Data.dll''' -- MySQL client library for CLR scripts.&lt;br /&gt;
&lt;br /&gt;
=== Configuration ===&lt;br /&gt;
* AuroraServerNWScript.ini&lt;br /&gt;
*: &amp;lt;code&amp;gt;AllowManagedScripts=1&amp;lt;/code&amp;gt;&lt;br /&gt;
* xp_craft.ini&lt;br /&gt;
** Set the database directory to proper location of the Campaign Database on the machine&lt;br /&gt;
* AuroraServerVault.ini&lt;br /&gt;
** The text within the configuration file explains how to configure the plugin. If this configuration fails, players will be unable to see their vaults.&lt;br /&gt;
** Typical configuration is to set LocalServerVaultPath=C:\NWN2User\servervault , RemoteServerVaultPath=C:\NWN2User\remotevault , SpoolPath=C:\NWN2User\servervaultspool. All three of these can be anywhere, so long as it is clear to anyone doing maintenance what they are (&amp;quot;remote vault&amp;quot; is where bics will be downloaded to for verification, &amp;quot;spool&amp;quot; is where saved bics will be staged for upload, and &amp;quot;local server vault&amp;quot; is the directory from which characters will be played).&lt;br /&gt;
** The text within the configuration file explains how to configure the plugin. If this configuration fails, the server will default to inappropriate settings (such as PvP, download server, or custom GUIs) or requiring the module to be started manually after nwn2server.exe stops.&lt;br /&gt;
** Remember to ensure that the directories specified in the config file exist!  They have to be created manually (except for the LocalServerVaultPath which is automatically created by nwn2server.exe, though it can be manually created safely).  If the directories don't all exist, the vault won't work correctly and players will not be able to log in.&lt;br /&gt;
* nwnx.ini&lt;br /&gt;
** The ACR requires a temporary directory to run. It can be anywhere that the user who runs the NWNx4 process can write to. It is set in nwn2temp&lt;br /&gt;
* DatabaseConnector.ini&lt;br /&gt;
** DatabaseConnector has only one setting in it, which should look something like:&lt;br /&gt;
*** CommandLine=-batch -L 3306:127.0.0.1:3306 -x -a -T -2 -noagent -N -i C:\NWNX4\ssh.ppk alfa@sql.alandfaraway.org&lt;br /&gt;
*** C:\NWNX4\ssh.ppk is the private key that you're specified for this server.&lt;br /&gt;
**** To create a key pair, use [http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html PuttyGen] to create a new key with all of the default settings.&lt;br /&gt;
**** Save the private key to your NWNx4 directory, and specify that location in the command line&lt;br /&gt;
**** Use [http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html PuTTy] to connect to alfa@sql.alandfaraway.org (as an HDM, you should have credentials for this) and edit (pico is the Linux command) .\alfa\.ssh\authorized_keys to add the public key to the bottom. Then, run (Windows+R) &amp;quot;&amp;lt;file location of putty&amp;gt; alfa@sql.alandfaraway.org -i &amp;lt;file location of your public key&amp;gt;&amp;quot; -- you will be prompted asking if you want to cache the public key from the server you're connecting to. Pick &amp;quot;yes&amp;quot; and close the connection.&lt;/div&gt;</summary>
		<author><name>Basilica</name></author>	</entry>

	<entry>
		<id>https://www.alandfaraway.info/Wiki/index.php?title=Server_Vault&amp;diff=2623</id>
		<title>Server Vault</title>
		<link rel="alternate" type="text/html" href="https://www.alandfaraway.info/Wiki/index.php?title=Server_Vault&amp;diff=2623"/>
				<updated>2014-08-10T04:10:35Z</updated>
		
		<summary type="html">&lt;p&gt;Basilica: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Technical Manuals]]&lt;br /&gt;
The server vault, the centralized repository for all ALFA character files, is hosted in [http://azure.microsoft.com Microsoft Azure].  Formerly, it was connected over SSHFS, but this system has been deprecated as it had reliability issues and forced the existence of two separate OS's (Windows and Linux) that had to be independently patched, managed, and maintained for each game server instance.&lt;br /&gt;
&lt;br /&gt;
The VaultTransferTool, built out of the ACR repository (VaultManagement\VaultTransferTool), provides a basic set of functionality for managing the server vault, including uploading files to the vault (but only if the vault didn't have a more up to date version of the files), downloading the entire vault to a directory (but only for files that were older than the vault versions), as well as selectively deleting files from the vault.&lt;br /&gt;
&lt;br /&gt;
One use of the VaultTransferTool would be to locally archive copies of the entire vault for selective restoration in case a character rollback had to be performed for technical or management reasons.  Another use might be for selective BIC edits.&lt;br /&gt;
&lt;br /&gt;
You can also use a tool like [http://aka.ms/AzCopy AzCopy] to copy files to and from Azure, or any [http://blogs.msdn.com/b/windowsazurestorage/archive/2014/03/11/windows-azure-storage-explorers-2014.aspx Azure Storage Explorer] tool to browse the vault interactively.  These require the use of an account name and access key, which can be obtained from the connection string (see the VaultTransferTool section below for details).  While the VaultTransferTool is slower for bulk transfers than AzCopy due to operating synchronously, the use of the VaultTransferTool is recommended for most operations if possible because it handles case conversion properly (all files on the Azure vault must be lowercased) and automatically avoids overwriting newer files.&lt;br /&gt;
&lt;br /&gt;
When deleting character files from the vault, remember to use the ALFA website's Clear Vault Cache tool to clear out any cached copies of the character file to delete in addition to removing the file from the Azure vault, so that the character file is not brought back the next time a player logs on to a server that previously hosted the character.&lt;br /&gt;
&lt;br /&gt;
=== VaultTransferTool ===&lt;br /&gt;
Build the ACR repository and then build the ACR_ManagedScripts solution in alfa2_acr.hak\ACR_ManagedScripts (or else simply build VaultManagement\VaultTransferTool\VaultTransferTool.csproj directly from MSBUILD).&lt;br /&gt;
&lt;br /&gt;
All usage of the VaultTransferTool needs a connection string.  Get this from the config table in the database (VaultConnectionString), and pass it on the command line with -connectionstring VaultConnectionString, in addition to the operation to perform.  See [[ACR Configuration Settings]] for my details on the database config table.&lt;br /&gt;
&lt;br /&gt;
Help text for the vault tool:&lt;br /&gt;
&lt;br /&gt;
ALFA Azure Vault Management Tool v1.0.5334.26752&lt;br /&gt;
&lt;br /&gt;
Usage:&lt;br /&gt;
 VaultTransferTool [-connectionstring &amp;lt;connection string&amp;gt;] [-download &amp;lt;path&amp;gt; | -upload &amp;lt;path&amp;gt; | -delete &amp;lt;path&amp;gt;] [-includeall]&lt;br /&gt;
&lt;br /&gt;
The -connectionstring argument designates the Azure connection string to use to communicate with the vault.&lt;br /&gt;
&lt;br /&gt;
One of -download &amp;lt;path&amp;gt;, -upload &amp;lt;path&amp;gt;, or -delete &amp;lt;path&amp;gt; must be specified.  The -download and -upload options enable downloading files from the vault, or uploading files to the vault.  The given path should be laid out like a normal server vault directory, with a subdirectory for each account name and character (*.bic) files in each subdirectory.  Files are never deleted from the remote vault, only updated with -download or -upload.  A file is only transferred if the source of the transfer is newer than the destination file (unmodified files aren't copied again).&lt;br /&gt;
&lt;br /&gt;
To delete a file, use -delete &amp;lt;path&amp;gt; where &amp;lt;path&amp;gt; is in the form of account\character.bic.  The file is permanently deleted from the Azure vault, but the cache should still be purged from each server using the purge cache tool to ensure that it is not regenerated the next time a player logs on to a server that had previously cached the character file to delete.  The file to be deleted doesn't need to exist on the local machine, and is not deleted from the local machine if it did exist.&lt;br /&gt;
&lt;br /&gt;
Normally, only character files (*.bic) are transferred.  Use the -includeall argument to transfer all files, regardless of file extension.&lt;br /&gt;
&lt;br /&gt;
=== Technical details ===&lt;br /&gt;
&lt;br /&gt;
The [https://github.com/ALandFarAway/ALFA-Base-Resources/blob/master/alfa2_acr.hak/ACR_ServerCommunicator/ServerVaultConnector.cs ServerVaultConnector] object in the ACR_ServerCommunicator manages the Azure vault storage, in conjunction with the server vault NWNX4 plugin.  [https://github.com/ALandFarAway/ALFA-Base-Resources/blob/master/alfa2_acr.hak/ALFA.Shared ALFA.Shared] contains a wrapper (FileStore, AzureFileStore) around the Azure .NET storage library that manages the low level connectivity to the backing store for the vault.&lt;br /&gt;
&lt;br /&gt;
The [https://github.com/ALandFarAway/ALFA-Base-Resources/blob/master/VaultManagement/VaultTransferTool/Program.cs VaultTransferTool] uses the ALFA.Shared FileStore/AzureFileStore mechanism to manage the vault.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Obsolete SSHFS vault documentation ===&lt;br /&gt;
 &lt;br /&gt;
See [[Connecting to the Server Vault]] for the obsolete documentation on the old SSHFS based vault mechanism.  '''This isn't in use on any servers anymore.'''&lt;/div&gt;</summary>
		<author><name>Basilica</name></author>	</entry>

	<entry>
		<id>https://www.alandfaraway.info/Wiki/index.php?title=Server_Vault&amp;diff=2622</id>
		<title>Server Vault</title>
		<link rel="alternate" type="text/html" href="https://www.alandfaraway.info/Wiki/index.php?title=Server_Vault&amp;diff=2622"/>
				<updated>2014-08-10T04:09:33Z</updated>
		
		<summary type="html">&lt;p&gt;Basilica: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Technical Manuals]]&lt;br /&gt;
The server vault, the centralized repository for all ALFA character files, is hosted in [http://azure.microsoft.com Microsoft Azure].  Formerly, it was connected over SSHFS, but this system has been deprecated as it had reliability issues and forced the existence of two separate OS's (Windows and Linux) that had to be independently patched, managed, and maintained for each game server instance.&lt;br /&gt;
&lt;br /&gt;
The VaultTransferTool, built out of the ACR repository (VaultManagement\VaultTransferTool), provides a basic set of functionality for managing the server vault, including uploading files to the vault (but only if the vault didn't have a more up to date version of the files), downloading the entire vault to a directory (but only for files that were older than the vault versions), as well as selectively deleting files from the vault.&lt;br /&gt;
&lt;br /&gt;
One use of the VaultTransferTool would be to locally archive copies of the entire vault for selective restoration in case a character rollback had to be performed for technical or management reasons.  Another use might be for selective BIC edits.&lt;br /&gt;
&lt;br /&gt;
You can also use a tool like [http://aka.ms/AzCopy AzCopy] to copy files to and from Azure, or any [http://blogs.msdn.com/b/windowsazurestorage/archive/2014/03/11/windows-azure-storage-explorers-2014.aspx Azure Storage Explorer] tool to browse the vault interactively.  These require the use of an account name and access key, which can be obtained from the connection string (see the VaultTransferTool section below for details).  While the VaultTransferTool is slower for bulk transfers than AzCopy due to operating synchronously, the use of the VaultTransferTool is recommended for most operations if possible because it handles case conversion properly (all files on the Azure vault must be lowercased) and automatically avoids overwriting newer files.&lt;br /&gt;
&lt;br /&gt;
When deleting character files from the vault, remember to use the ALFA website's Clear Vault Cache tool to clear out any cached copies of the character file to delete in addition to removing the file from the Azure vault, so that the character file is not brought back the next time a player logs on to a server that previously hosted the character.&lt;br /&gt;
&lt;br /&gt;
=== VaultTransferTool ===&lt;br /&gt;
Build the ACR repository and then build the ACR_ManagedScripts solution in alfa2_acr.hak\ACR_ManagedScripts (or else simply build VaultManagement\VaultTransferTool\VaultTransferTool.csproj directly from MSBUILD).&lt;br /&gt;
&lt;br /&gt;
All usage of the VaultTransferTool needs a connection string.  Get this from the config table in the database (VaultConnectionString), and pass it on the command line with -connectionstring VaultConnectionString, in addition to the operation to perform.  See [[ACR Configuration Settings]] for my details on the database config table.&lt;br /&gt;
&lt;br /&gt;
Help text for the vault tool:&lt;br /&gt;
&lt;br /&gt;
ALFA Azure Vault Management Tool v1.0.5334.26752&lt;br /&gt;
&lt;br /&gt;
Usage:&lt;br /&gt;
 VaultTransferTool [-connectionstring &amp;lt;connection string&amp;gt;] [-download &amp;lt;path&amp;gt; | -upload &amp;lt;path&amp;gt; | -delete &amp;lt;path&amp;gt;] [-includeall]&lt;br /&gt;
&lt;br /&gt;
The -connectionstring argument designates the Azure connection string to use to communicate with the vault.&lt;br /&gt;
&lt;br /&gt;
One of -download &amp;lt;path&amp;gt;, -upload &amp;lt;path&amp;gt;, or -delete &amp;lt;path&amp;gt; must be specified.  The -download and -upload options enable downloading files from the vault, or uploading files to the vault.  The given path should be laid out like a normal server vault directory, with a subdirectory for each account name and character (*.bic) files in each subdirectory.  Files are never deleted from the remote vault, only updated with -download or -upload.  A file is only transferred if the source of the transfer is newer than the destination file (unmodified files aren't copied again).&lt;br /&gt;
&lt;br /&gt;
To delete a file, use -delete &amp;lt;path&amp;gt; where &amp;lt;path&amp;gt; is in the form of account\character.bic.  The file is permanently deleted from the Azure vault, but the cache should still be purged from each server using the purge cache tool to ensure that it is not regenerated the next time a player logs on to a server that had previously cached the character file to delete.  The file to be deleted doesn't need to exist on the local machine, and is not deleted from the local machine if it did exist.&lt;br /&gt;
&lt;br /&gt;
Normally, only character files (*.bic) are transferred.  Use the -includeall argument to transfer all files, regardless of file extension.&lt;br /&gt;
&lt;br /&gt;
=== Technical details ===&lt;br /&gt;
&lt;br /&gt;
The [https://github.com/ALandFarAway/ALFA-Base-Resources/blob/master/alfa2_acr.hak/ACR_ServerCommunicator/ServerVaultConnector.cs ServerVaultConnector] object in the ACR_ServerCommunicator manages the Azure vault storage, in conjunction with the server vault NWNX4 plugin.  ALFA.Shared contains a wrapper (FileStore, AzureFileStore) around the Azure .NET storage library that manages the low level connectivity to the backing store for the vault.&lt;br /&gt;
&lt;br /&gt;
The [https://github.com/ALandFarAway/ALFA-Base-Resources/blob/master/VaultManagement/VaultTransferTool/Program.cs VaultTransferTool] uses the ALFA.Shared FileStore/AzureFileStore mechanism to manage the vault.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Obsolete SSHFS vault documentation ===&lt;br /&gt;
 &lt;br /&gt;
See [[Connecting to the Server Vault]] for the obsolete documentation on the old SSHFS based vault mechanism.  '''This isn't in use on any servers anymore.'''&lt;/div&gt;</summary>
		<author><name>Basilica</name></author>	</entry>

	<entry>
		<id>https://www.alandfaraway.info/Wiki/index.php?title=Server_Vault&amp;diff=2621</id>
		<title>Server Vault</title>
		<link rel="alternate" type="text/html" href="https://www.alandfaraway.info/Wiki/index.php?title=Server_Vault&amp;diff=2621"/>
				<updated>2014-08-10T04:05:52Z</updated>
		
		<summary type="html">&lt;p&gt;Basilica: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Technical Manuals]]&lt;br /&gt;
The server vault, the centralized repository for all ALFA character files, is hosted in [http://azure.microsoft.com Microsoft Azure].  Formerly, it was connected over SSHFS, but this system has been deprecated as it had reliability issues and forced the existence of two separate OS's (Windows and Linux) that had to be independently patched, managed, and maintained for each game server instance.&lt;br /&gt;
&lt;br /&gt;
The VaultTransferTool, built out of the ACR repository (VaultManagement\VaultTransferTool), provides a basic set of functionality for managing the server vault, including uploading files to the vault (but only if the vault didn't have a more up to date version of the files), downloading the entire vault to a directory (but only for files that were older than the vault versions), as well as selectively deleting files from the vault.&lt;br /&gt;
&lt;br /&gt;
One use of the VaultTransferTool would be to locally archive copies of the entire vault for selective restoration in case a character rollback had to be performed for technical or management reasons.  Another use might be for selective BIC edits.&lt;br /&gt;
&lt;br /&gt;
You can also use a tool like [http://aka.ms/AzCopy AzCopy] to copy files to and from Azure, or any [http://blogs.msdn.com/b/windowsazurestorage/archive/2014/03/11/windows-azure-storage-explorers-2014.aspx Azure Storage Explorer] tool to browse the vault interactively.  These require the use of an account name and access key, which can be obtained from the connection string (see the VaultTransferTool section below for details).  While the VaultTransferTool is slower for bulk transfers than AzCopy due to operating synchronously, the use of the VaultTransferTool is recommended for most operations if possible because it handles case conversion properly (all files on the Azure vault must be lowercased) and automatically avoids overwriting newer files.&lt;br /&gt;
&lt;br /&gt;
When deleting character files from the vault, remember to use the ALFA website's Clear Vault Cache tool to clear out any cached copies of the character file to delete in addition to removing the file from the Azure vault, so that the character file is not brought back the next time a player logs on to a server that previously hosted the character.&lt;br /&gt;
&lt;br /&gt;
=== VaultTransferTool ===&lt;br /&gt;
Build the ACR repository and then build the ACR_ManagedScripts solution in alfa2_acr.hak\ACR_ManagedScripts (or else simply build VaultManagement\VaultTransferTool\VaultTransferTool.csproj directly from MSBUILD).&lt;br /&gt;
&lt;br /&gt;
All usage of the VaultTransferTool needs a connection string.  Get this from the config table in the database (VaultConnectionString), and pass it on the command line with -connectionstring VaultConnectionString, in addition to the operation to perform.  See [[ACR Configuration Settings]] for my details on the database config table.&lt;br /&gt;
&lt;br /&gt;
Help text for the vault tool:&lt;br /&gt;
&lt;br /&gt;
ALFA Azure Vault Management Tool v1.0.5334.26752&lt;br /&gt;
&lt;br /&gt;
Usage:&lt;br /&gt;
 VaultTransferTool [-connectionstring &amp;lt;connection string&amp;gt;] [-download &amp;lt;path&amp;gt; | -upload &amp;lt;path&amp;gt; | -delete &amp;lt;path&amp;gt;] [-includeall]&lt;br /&gt;
&lt;br /&gt;
The -connectionstring argument designates the Azure connection string to use to communicate with the vault.&lt;br /&gt;
&lt;br /&gt;
One of -download &amp;lt;path&amp;gt;, -upload &amp;lt;path&amp;gt;, or -delete &amp;lt;path&amp;gt; must be specified.  The -download and -upload options enable downloading files from the vault, or uploading files to the vault.  The given path should be laid out like a normal server vault directory, with a subdirectory for each account name and character (*.bic) files in each subdirectory.  Files are never deleted from the remote vault, only updated with -download or -upload.  A file is only transferred if the source of the transfer is newer than the destination file (unmodified files aren't copied again).&lt;br /&gt;
&lt;br /&gt;
To delete a file, use -delete &amp;lt;path&amp;gt; where &amp;lt;path&amp;gt; is in the form of account\character.bic.  The file is permanently deleted from the Azure vault, but the cache should still be purged from each server using the purge cache tool to ensure that it is not regenerated the next time a player logs on to a server that had previously cached the character file to delete.  The file to be deleted doesn't need to exist on the local machine, and is not deleted from the local machine if it did exist.&lt;br /&gt;
&lt;br /&gt;
Normally, only character files (*.bic) are transferred.  Use the -includeall argument to transfer all files, regardless of file extension.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Obsolete SSHFS Vault Documentation ===&lt;br /&gt;
 &lt;br /&gt;
See [[Connecting to the Server Vault]] for the obsolete documentation on the old SSHFS based vault mechanism.  '''This isn't in use on any servers anymore.'''&lt;/div&gt;</summary>
		<author><name>Basilica</name></author>	</entry>

	<entry>
		<id>https://www.alandfaraway.info/Wiki/index.php?title=Connecting_to_the_Server_Vault&amp;diff=2619</id>
		<title>Connecting to the Server Vault</title>
		<link rel="alternate" type="text/html" href="https://www.alandfaraway.info/Wiki/index.php?title=Connecting_to_the_Server_Vault&amp;diff=2619"/>
				<updated>2014-08-10T04:03:44Z</updated>
		
		<summary type="html">&lt;p&gt;Basilica: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''Note!  This page is ''obsolete'', and only maintained for historical reference purposes.  The vault has been moved to Azure storage, see [[Server Vault]] for current documentation.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Technical Manuals]]&lt;br /&gt;
These commands run inside the Linux VM.&lt;br /&gt;
&lt;br /&gt;
== SSHFS Installation ==&lt;br /&gt;
We first need to install sshfs:&lt;br /&gt;
 apt-get install sshfs&lt;br /&gt;
&lt;br /&gt;
Then we need to create the local alfa user. Create a file with the following in it (replace XXXXX with a password for the alfa user):&lt;br /&gt;
 cat &amp;gt; alfa.cred&lt;br /&gt;
 alfa:XXXXX:1001:1001::/home/alfa:/bin/bash&lt;br /&gt;
Hit Ctrl-d. Then run:&lt;br /&gt;
 newusers -r alfa.cred&lt;br /&gt;
&lt;br /&gt;
First try to ssh to the central vault host:&lt;br /&gt;
 ssh alfa@alandfaraway.org&lt;br /&gt;
&lt;br /&gt;
Type in the alfa user password for the central vault (ask IA or TA if you don't know it).&lt;br /&gt;
&lt;br /&gt;
Switch to user alfa (local user) and create a vault directory:&lt;br /&gt;
 su - alfa&lt;br /&gt;
 mkdir vault&lt;br /&gt;
&lt;br /&gt;
Switch back to root with a &amp;lt;code&amp;gt;logout&amp;lt;/code&amp;gt; or ctrl-d.&lt;br /&gt;
&lt;br /&gt;
Next, mount the vault (note you should do that only for testing as we have a better solution below that will automatically mount the vault when Linux starts):&lt;br /&gt;
sshfs alfa@alandfaraway.org:/home/alfa/vault /home/alfa/vault -o allow_other,reconnect&lt;br /&gt;
Type the alfa user password for the central vault.&lt;br /&gt;
&lt;br /&gt;
Switch again to user alfa and try to create a file:&lt;br /&gt;
 su - alfa&lt;br /&gt;
 cd vault&lt;br /&gt;
 cd test&lt;br /&gt;
 touch test&lt;br /&gt;
 ls -l test&lt;br /&gt;
&lt;br /&gt;
If everything is okay the output of ls should look like this:&lt;br /&gt;
 -rw-r--r-- 1 alfa alfa 0 Jun 27 21:24 test&lt;br /&gt;
&lt;br /&gt;
== Authentication ==&lt;br /&gt;
In order to allow reconnecting you must allow public key ssh connections (ie allow to connect without typing the password). On the game server linux box as the user called alfa type in:&lt;br /&gt;
 ssh-keygen -t dsa&lt;br /&gt;
(then type three times on return (ie default name for the file, no password, no password)&lt;br /&gt;
&lt;br /&gt;
Next, copy the public file over to the alandfaraway.org machine (here replace '''&amp;lt;gameserver&amp;gt;''' with the acronym of your game server - e.g. whl):&lt;br /&gt;
 scp ~/.ssh/id_dsa.pub alandfaraway.org:'''&amp;lt;gameserver&amp;gt;'''.pub&lt;br /&gt;
&lt;br /&gt;
Then connect to the alfa host:&lt;br /&gt;
 ssh alandfaraway.org&lt;br /&gt;
Type in your password.&lt;br /&gt;
 cat gameserver.pub &amp;gt;&amp;gt; .ssh/authorized_keys&lt;br /&gt;
 exit&lt;br /&gt;
 ssh alandfaraway.org&lt;br /&gt;
This time you'll connect without needing to type the password.&lt;br /&gt;
&lt;br /&gt;
In order for this to apply to the root user as well do the following:&lt;br /&gt;
Login as root using either:&lt;br /&gt;
 sudo su -&lt;br /&gt;
or&lt;br /&gt;
 su -&lt;br /&gt;
&lt;br /&gt;
Create a .ssh directory if it doesn't exist, copy over the private key file, and try to connect to the alfa vault. You should be able to connect without typing the password.&lt;br /&gt;
 mkdir ~/.ssh&lt;br /&gt;
 cp /home/alfa/.ssh/id_dsa ~/.ssh/&lt;br /&gt;
 ssh alfa@alandfaraway.org&lt;br /&gt;
&lt;br /&gt;
== Automatic Connection Script ==&lt;br /&gt;
 ### BEGIN INIT INFO&lt;br /&gt;
 # Provides: sshfs&lt;br /&gt;
 # Required-Start:    $remote_fs $syslog $network&lt;br /&gt;
 # Required-Stop:     $remote_fs $syslog $network&lt;br /&gt;
 # Default-Start:     2 3 4 5&lt;br /&gt;
 # Default-Stop:      0 1 6&lt;br /&gt;
 # Short-Description: sshfs alfa&lt;br /&gt;
 # Description:       Automatically mounts the alfa vault using sshfs&lt;br /&gt;
 ### END INIT INFO&lt;br /&gt;
  &lt;br /&gt;
 # Author: Patrice Torguet/Hialmar &amp;lt;torguet@gmail.com&amp;gt;&lt;br /&gt;
  &lt;br /&gt;
 # Do NOT &amp;quot;set -e&amp;quot;&lt;br /&gt;
  &lt;br /&gt;
 # PATH should only include /usr/* if it runs after the mountnfs.sh script&lt;br /&gt;
 PATH=/sbin:/usr/sbin:/bin:/usr/bin&lt;br /&gt;
 DESC=&amp;quot;Automatically mounts the alfa vault using sshfs&amp;quot;&lt;br /&gt;
 NAME=sshfs&lt;br /&gt;
 DAEMON=/usr/bin/$NAME&lt;br /&gt;
 DAEMON_ARGS=&amp;quot;alfa@alandfaraway.org:/home/alfa/vault /home/alfa/vault -o allow_other,reconnect,ssh_command=/usr/local/bin/alfa-sshfs-ssh&amp;quot;&lt;br /&gt;
 PIDFILE=/var/run/$NAME.pid&lt;br /&gt;
 SCRIPTNAME=/etc/init.d/$NAME&lt;br /&gt;
  &lt;br /&gt;
 # Exit if the package is not installed&lt;br /&gt;
 [ -x &amp;quot;$DAEMON&amp;quot; ] || exit 0&lt;br /&gt;
  &lt;br /&gt;
 # Read configuration variable file if it is present&lt;br /&gt;
 [ -r /etc/default/$NAME ] &amp;amp;&amp;amp; . /etc/default/$NAME&lt;br /&gt;
  &lt;br /&gt;
 # Load the VERBOSE setting and other rcS variables&lt;br /&gt;
 . /lib/init/vars.sh&lt;br /&gt;
  &lt;br /&gt;
 # Define LSB log_* functions.&lt;br /&gt;
 # Depend on lsb-base (&amp;gt;= 3.2-14) to ensure that this file is present&lt;br /&gt;
 # and status_of_proc is working.&lt;br /&gt;
 . /lib/lsb/init-functions&lt;br /&gt;
  &lt;br /&gt;
 #&lt;br /&gt;
 # Function that starts the daemon/service&lt;br /&gt;
 #&lt;br /&gt;
 do_start()&lt;br /&gt;
 {&lt;br /&gt;
    # Return&lt;br /&gt;
    #   0 if daemon has been started&lt;br /&gt;
    #   1 if daemon was already running&lt;br /&gt;
    #   2 if daemon could not be started&lt;br /&gt;
  &lt;br /&gt;
    date &amp;gt;&amp;gt; /var/log/sshfs.log&lt;br /&gt;
    echo 'trying to umount' | tee -a /var/log/sshfs.log&lt;br /&gt;
    umount -l /home/alfa/vault || echo &amp;quot;umount failed with error code $?&amp;quot; | tee -a /var/log/sshfs.log&lt;br /&gt;
    echo 'cleaning mount point' | tee -a /var/log/sshfs.log&lt;br /&gt;
    [ -x &amp;quot;/home/alfa/vault_pbs&amp;quot; ] || mkdir /home/alfa/vault_pbs&lt;br /&gt;
    rmdir /home/alfa/vault || mv /home/alfa/vault &amp;quot;/home/alfa/vault_pbs/vault`date +-%Y-%m-%d-%Hh%Mm%Ss`&amp;quot;&lt;br /&gt;
    mkdir /home/alfa/vault &amp;amp;&amp;amp; chmod a+rwx /home/alfa/vault&lt;br /&gt;
    echo 'calling sshfs' | tee -a /var/log/sshfs.log&lt;br /&gt;
    $DAEMON $DAEMON_ARGS || return 2&lt;br /&gt;
    date &amp;gt;&amp;gt; /var/log/sshfs.log&lt;br /&gt;
    echo 'sshfs done' | tee -a /var/log/sshfs.log&lt;br /&gt;
  &lt;br /&gt;
 }&lt;br /&gt;
  &lt;br /&gt;
 #&lt;br /&gt;
 # Function that stops the daemon/service&lt;br /&gt;
 #&lt;br /&gt;
 do_stop()&lt;br /&gt;
 {&lt;br /&gt;
    # Return&lt;br /&gt;
    #   0 if daemon has been stopped&lt;br /&gt;
    #   1 if daemon was already stopped&lt;br /&gt;
    #   2 if daemon could not be stopped&lt;br /&gt;
    #   other if a failure occurred&lt;br /&gt;
    echo 'umount' | tee -a /var/log/sshfs.log&lt;br /&gt;
    umount -l /home/alfa/vault || return 1&lt;br /&gt;
  &lt;br /&gt;
 }&lt;br /&gt;
  &lt;br /&gt;
 case &amp;quot;$1&amp;quot; in&lt;br /&gt;
   start)&lt;br /&gt;
    [ &amp;quot;$VERBOSE&amp;quot; != no ] &amp;amp;&amp;amp; log_daemon_msg &amp;quot;Starting $DESC&amp;quot; &amp;quot;$NAME&amp;quot;&lt;br /&gt;
    do_start&lt;br /&gt;
    case &amp;quot;$?&amp;quot; in&lt;br /&gt;
       0|1) [ &amp;quot;$VERBOSE&amp;quot; != no ] &amp;amp;&amp;amp; log_end_msg 0 ;;&lt;br /&gt;
       2) [ &amp;quot;$VERBOSE&amp;quot; != no ] &amp;amp;&amp;amp; log_end_msg 1 ;;&lt;br /&gt;
    esac&lt;br /&gt;
    ;;&lt;br /&gt;
   stop)&lt;br /&gt;
    [ &amp;quot;$VERBOSE&amp;quot; != no ] &amp;amp;&amp;amp; log_daemon_msg &amp;quot;Stopping $DESC&amp;quot; &amp;quot;$NAME&amp;quot;&lt;br /&gt;
    do_stop&lt;br /&gt;
    case &amp;quot;$?&amp;quot; in&lt;br /&gt;
       0|1) [ &amp;quot;$VERBOSE&amp;quot; != no ] &amp;amp;&amp;amp; log_end_msg 0 ;;&lt;br /&gt;
       2) [ &amp;quot;$VERBOSE&amp;quot; != no ] &amp;amp;&amp;amp; log_end_msg 1 ;;&lt;br /&gt;
    esac&lt;br /&gt;
    ;;&lt;br /&gt;
   status)&lt;br /&gt;
        status_of_proc &amp;quot;$DAEMON&amp;quot; &amp;quot;$NAME&amp;quot; &amp;amp;&amp;amp; exit 0 || exit $?&lt;br /&gt;
        ;;&lt;br /&gt;
   restart|force-reload)&lt;br /&gt;
    #&lt;br /&gt;
    # If the &amp;quot;reload&amp;quot; option is implemented then remove the&lt;br /&gt;
    # 'force-reload' alias&lt;br /&gt;
    #&lt;br /&gt;
    log_daemon_msg &amp;quot;Restarting $DESC&amp;quot; &amp;quot;$NAME&amp;quot;&lt;br /&gt;
    do_stop&lt;br /&gt;
    case &amp;quot;$?&amp;quot; in&lt;br /&gt;
      0|1)&lt;br /&gt;
       do_start&lt;br /&gt;
       case &amp;quot;$?&amp;quot; in&lt;br /&gt;
          0) log_end_msg 0 ;;&lt;br /&gt;
          1) log_end_msg 1 ;; # Old process is still running&lt;br /&gt;
          *) log_end_msg 1 ;; # Failed to start&lt;br /&gt;
       esac&lt;br /&gt;
       ;;&lt;br /&gt;
      *)&lt;br /&gt;
         # Failed to stop&lt;br /&gt;
       log_end_msg 1&lt;br /&gt;
       ;;&lt;br /&gt;
    esac&lt;br /&gt;
    ;;&lt;br /&gt;
   *)&lt;br /&gt;
    echo &amp;quot;Usage: $SCRIPTNAME {start|stop|status|restart|force-reload}&amp;quot; &amp;gt;&amp;amp;2&lt;br /&gt;
    exit 3&lt;br /&gt;
    ;;&lt;br /&gt;
 esac&lt;br /&gt;
  &lt;br /&gt;
 :&lt;br /&gt;
&lt;br /&gt;
You have to put it in /etc/init.d (I have named it sshfs) and chmod it (chmod a+x sshfs). Then type in:&lt;br /&gt;
 update-rc.d -f sshfs defaults&lt;br /&gt;
This will add links in the rc.d directories.&lt;br /&gt;
&lt;br /&gt;
== Keeping Connection Alive ==&lt;br /&gt;
This is a config file for ssh that will let ssh and sshfs send keep alive messages every 15 seconds.  This file should be called &amp;quot;config&amp;quot; and be in root's .ssh directory.&lt;br /&gt;
 Host *&lt;br /&gt;
 ServerAliveInterval 15&lt;br /&gt;
 Host alandfaraway.info&lt;br /&gt;
 User alfa&lt;br /&gt;
 IdentityFile ~/.ssh/id_dsa&lt;br /&gt;
 Host alandfaraway.org&lt;br /&gt;
 User alfa&lt;br /&gt;
 IdentityFile ~/.ssh/id_dsa&lt;br /&gt;
&lt;br /&gt;
== SSH Script for MySQL ==&lt;br /&gt;
The SSHFS connection is also used for connecting to MySQL securely.  You must place the following contents in a file at /usr/local/bin/alfa-sshfs-ssh .  That file will be referenced by the sshfs init script.&lt;br /&gt;
 #!/bin/bash&lt;br /&gt;
 &lt;br /&gt;
 a=$@&lt;br /&gt;
 shopt -s extglob&lt;br /&gt;
 ssh -g -L 3306:127.0.0.1:3306 ${a//-oClearAllForward*([^ ])?( )}&lt;br /&gt;
&lt;br /&gt;
Make the script executable after you have pasted it in:&lt;br /&gt;
 chmod +x /usr/local/bin/alfa-sshfs-ssh&lt;br /&gt;
&lt;br /&gt;
'''If the Linux machine is directly connected to the Internet, specify the right interface for the port forward'''.  Make sure to set up firewall rules for allowing port 3306 inbound, too.  This should NOT be allowed inbound from the internet, just the local LAN (or Windows gameserver instance). &lt;br /&gt;
&lt;br /&gt;
== Sambia Install ==&lt;br /&gt;
If you need samba to access the vault continue, if you don't (Windows VM hosted on a Linux OS) you can stop here. Install Sambia:&lt;br /&gt;
 apt-get install samba&lt;br /&gt;
&lt;br /&gt;
Modify samba configuration file so that in the authentication part (it starts with ####### Authentication #######) you have the following uncommented:&lt;br /&gt;
  security = user&lt;br /&gt;
And in the Home directory related part (it starts with [homes] you should have:&lt;br /&gt;
  read only = no&lt;br /&gt;
After this you must do:&lt;br /&gt;
 /etc/init.d/samba restart&lt;br /&gt;
On the windows machine you should now be able to type this in a cmd.exe:&lt;br /&gt;
 net use z \\WindowsIP\alfa&lt;/div&gt;</summary>
		<author><name>Basilica</name></author>	</entry>

	<entry>
		<id>https://www.alandfaraway.info/Wiki/index.php?title=Connecting_to_the_Server_Vault&amp;diff=2618</id>
		<title>Connecting to the Server Vault</title>
		<link rel="alternate" type="text/html" href="https://www.alandfaraway.info/Wiki/index.php?title=Connecting_to_the_Server_Vault&amp;diff=2618"/>
				<updated>2014-08-10T04:03:19Z</updated>
		
		<summary type="html">&lt;p&gt;Basilica: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''Note!  This page is ''obsolete'', and only maintained for historical reference purposes.  The vault has been moved to Azure storage, see [[Server Vault]] for current documentation.'''&lt;br /&gt;
&lt;br /&gt;
[[Category:Technical Manuals]]&lt;br /&gt;
These commands run inside the Linux VM.&lt;br /&gt;
&lt;br /&gt;
== SSHFS Installation ==&lt;br /&gt;
We first need to install sshfs:&lt;br /&gt;
 apt-get install sshfs&lt;br /&gt;
&lt;br /&gt;
Then we need to create the local alfa user. Create a file with the following in it (replace XXXXX with a password for the alfa user):&lt;br /&gt;
 cat &amp;gt; alfa.cred&lt;br /&gt;
 alfa:XXXXX:1001:1001::/home/alfa:/bin/bash&lt;br /&gt;
Hit Ctrl-d. Then run:&lt;br /&gt;
 newusers -r alfa.cred&lt;br /&gt;
&lt;br /&gt;
First try to ssh to the central vault host:&lt;br /&gt;
 ssh alfa@alandfaraway.org&lt;br /&gt;
&lt;br /&gt;
Type in the alfa user password for the central vault (ask IA or TA if you don't know it).&lt;br /&gt;
&lt;br /&gt;
Switch to user alfa (local user) and create a vault directory:&lt;br /&gt;
 su - alfa&lt;br /&gt;
 mkdir vault&lt;br /&gt;
&lt;br /&gt;
Switch back to root with a &amp;lt;code&amp;gt;logout&amp;lt;/code&amp;gt; or ctrl-d.&lt;br /&gt;
&lt;br /&gt;
Next, mount the vault (note you should do that only for testing as we have a better solution below that will automatically mount the vault when Linux starts):&lt;br /&gt;
sshfs alfa@alandfaraway.org:/home/alfa/vault /home/alfa/vault -o allow_other,reconnect&lt;br /&gt;
Type the alfa user password for the central vault.&lt;br /&gt;
&lt;br /&gt;
Switch again to user alfa and try to create a file:&lt;br /&gt;
 su - alfa&lt;br /&gt;
 cd vault&lt;br /&gt;
 cd test&lt;br /&gt;
 touch test&lt;br /&gt;
 ls -l test&lt;br /&gt;
&lt;br /&gt;
If everything is okay the output of ls should look like this:&lt;br /&gt;
 -rw-r--r-- 1 alfa alfa 0 Jun 27 21:24 test&lt;br /&gt;
&lt;br /&gt;
== Authentication ==&lt;br /&gt;
In order to allow reconnecting you must allow public key ssh connections (ie allow to connect without typing the password). On the game server linux box as the user called alfa type in:&lt;br /&gt;
 ssh-keygen -t dsa&lt;br /&gt;
(then type three times on return (ie default name for the file, no password, no password)&lt;br /&gt;
&lt;br /&gt;
Next, copy the public file over to the alandfaraway.org machine (here replace '''&amp;lt;gameserver&amp;gt;''' with the acronym of your game server - e.g. whl):&lt;br /&gt;
 scp ~/.ssh/id_dsa.pub alandfaraway.org:'''&amp;lt;gameserver&amp;gt;'''.pub&lt;br /&gt;
&lt;br /&gt;
Then connect to the alfa host:&lt;br /&gt;
 ssh alandfaraway.org&lt;br /&gt;
Type in your password.&lt;br /&gt;
 cat gameserver.pub &amp;gt;&amp;gt; .ssh/authorized_keys&lt;br /&gt;
 exit&lt;br /&gt;
 ssh alandfaraway.org&lt;br /&gt;
This time you'll connect without needing to type the password.&lt;br /&gt;
&lt;br /&gt;
In order for this to apply to the root user as well do the following:&lt;br /&gt;
Login as root using either:&lt;br /&gt;
 sudo su -&lt;br /&gt;
or&lt;br /&gt;
 su -&lt;br /&gt;
&lt;br /&gt;
Create a .ssh directory if it doesn't exist, copy over the private key file, and try to connect to the alfa vault. You should be able to connect without typing the password.&lt;br /&gt;
 mkdir ~/.ssh&lt;br /&gt;
 cp /home/alfa/.ssh/id_dsa ~/.ssh/&lt;br /&gt;
 ssh alfa@alandfaraway.org&lt;br /&gt;
&lt;br /&gt;
== Automatic Connection Script ==&lt;br /&gt;
 ### BEGIN INIT INFO&lt;br /&gt;
 # Provides: sshfs&lt;br /&gt;
 # Required-Start:    $remote_fs $syslog $network&lt;br /&gt;
 # Required-Stop:     $remote_fs $syslog $network&lt;br /&gt;
 # Default-Start:     2 3 4 5&lt;br /&gt;
 # Default-Stop:      0 1 6&lt;br /&gt;
 # Short-Description: sshfs alfa&lt;br /&gt;
 # Description:       Automatically mounts the alfa vault using sshfs&lt;br /&gt;
 ### END INIT INFO&lt;br /&gt;
  &lt;br /&gt;
 # Author: Patrice Torguet/Hialmar &amp;lt;torguet@gmail.com&amp;gt;&lt;br /&gt;
  &lt;br /&gt;
 # Do NOT &amp;quot;set -e&amp;quot;&lt;br /&gt;
  &lt;br /&gt;
 # PATH should only include /usr/* if it runs after the mountnfs.sh script&lt;br /&gt;
 PATH=/sbin:/usr/sbin:/bin:/usr/bin&lt;br /&gt;
 DESC=&amp;quot;Automatically mounts the alfa vault using sshfs&amp;quot;&lt;br /&gt;
 NAME=sshfs&lt;br /&gt;
 DAEMON=/usr/bin/$NAME&lt;br /&gt;
 DAEMON_ARGS=&amp;quot;alfa@alandfaraway.org:/home/alfa/vault /home/alfa/vault -o allow_other,reconnect,ssh_command=/usr/local/bin/alfa-sshfs-ssh&amp;quot;&lt;br /&gt;
 PIDFILE=/var/run/$NAME.pid&lt;br /&gt;
 SCRIPTNAME=/etc/init.d/$NAME&lt;br /&gt;
  &lt;br /&gt;
 # Exit if the package is not installed&lt;br /&gt;
 [ -x &amp;quot;$DAEMON&amp;quot; ] || exit 0&lt;br /&gt;
  &lt;br /&gt;
 # Read configuration variable file if it is present&lt;br /&gt;
 [ -r /etc/default/$NAME ] &amp;amp;&amp;amp; . /etc/default/$NAME&lt;br /&gt;
  &lt;br /&gt;
 # Load the VERBOSE setting and other rcS variables&lt;br /&gt;
 . /lib/init/vars.sh&lt;br /&gt;
  &lt;br /&gt;
 # Define LSB log_* functions.&lt;br /&gt;
 # Depend on lsb-base (&amp;gt;= 3.2-14) to ensure that this file is present&lt;br /&gt;
 # and status_of_proc is working.&lt;br /&gt;
 . /lib/lsb/init-functions&lt;br /&gt;
  &lt;br /&gt;
 #&lt;br /&gt;
 # Function that starts the daemon/service&lt;br /&gt;
 #&lt;br /&gt;
 do_start()&lt;br /&gt;
 {&lt;br /&gt;
    # Return&lt;br /&gt;
    #   0 if daemon has been started&lt;br /&gt;
    #   1 if daemon was already running&lt;br /&gt;
    #   2 if daemon could not be started&lt;br /&gt;
  &lt;br /&gt;
    date &amp;gt;&amp;gt; /var/log/sshfs.log&lt;br /&gt;
    echo 'trying to umount' | tee -a /var/log/sshfs.log&lt;br /&gt;
    umount -l /home/alfa/vault || echo &amp;quot;umount failed with error code $?&amp;quot; | tee -a /var/log/sshfs.log&lt;br /&gt;
    echo 'cleaning mount point' | tee -a /var/log/sshfs.log&lt;br /&gt;
    [ -x &amp;quot;/home/alfa/vault_pbs&amp;quot; ] || mkdir /home/alfa/vault_pbs&lt;br /&gt;
    rmdir /home/alfa/vault || mv /home/alfa/vault &amp;quot;/home/alfa/vault_pbs/vault`date +-%Y-%m-%d-%Hh%Mm%Ss`&amp;quot;&lt;br /&gt;
    mkdir /home/alfa/vault &amp;amp;&amp;amp; chmod a+rwx /home/alfa/vault&lt;br /&gt;
    echo 'calling sshfs' | tee -a /var/log/sshfs.log&lt;br /&gt;
    $DAEMON $DAEMON_ARGS || return 2&lt;br /&gt;
    date &amp;gt;&amp;gt; /var/log/sshfs.log&lt;br /&gt;
    echo 'sshfs done' | tee -a /var/log/sshfs.log&lt;br /&gt;
  &lt;br /&gt;
 }&lt;br /&gt;
  &lt;br /&gt;
 #&lt;br /&gt;
 # Function that stops the daemon/service&lt;br /&gt;
 #&lt;br /&gt;
 do_stop()&lt;br /&gt;
 {&lt;br /&gt;
    # Return&lt;br /&gt;
    #   0 if daemon has been stopped&lt;br /&gt;
    #   1 if daemon was already stopped&lt;br /&gt;
    #   2 if daemon could not be stopped&lt;br /&gt;
    #   other if a failure occurred&lt;br /&gt;
    echo 'umount' | tee -a /var/log/sshfs.log&lt;br /&gt;
    umount -l /home/alfa/vault || return 1&lt;br /&gt;
  &lt;br /&gt;
 }&lt;br /&gt;
  &lt;br /&gt;
 case &amp;quot;$1&amp;quot; in&lt;br /&gt;
   start)&lt;br /&gt;
    [ &amp;quot;$VERBOSE&amp;quot; != no ] &amp;amp;&amp;amp; log_daemon_msg &amp;quot;Starting $DESC&amp;quot; &amp;quot;$NAME&amp;quot;&lt;br /&gt;
    do_start&lt;br /&gt;
    case &amp;quot;$?&amp;quot; in&lt;br /&gt;
       0|1) [ &amp;quot;$VERBOSE&amp;quot; != no ] &amp;amp;&amp;amp; log_end_msg 0 ;;&lt;br /&gt;
       2) [ &amp;quot;$VERBOSE&amp;quot; != no ] &amp;amp;&amp;amp; log_end_msg 1 ;;&lt;br /&gt;
    esac&lt;br /&gt;
    ;;&lt;br /&gt;
   stop)&lt;br /&gt;
    [ &amp;quot;$VERBOSE&amp;quot; != no ] &amp;amp;&amp;amp; log_daemon_msg &amp;quot;Stopping $DESC&amp;quot; &amp;quot;$NAME&amp;quot;&lt;br /&gt;
    do_stop&lt;br /&gt;
    case &amp;quot;$?&amp;quot; in&lt;br /&gt;
       0|1) [ &amp;quot;$VERBOSE&amp;quot; != no ] &amp;amp;&amp;amp; log_end_msg 0 ;;&lt;br /&gt;
       2) [ &amp;quot;$VERBOSE&amp;quot; != no ] &amp;amp;&amp;amp; log_end_msg 1 ;;&lt;br /&gt;
    esac&lt;br /&gt;
    ;;&lt;br /&gt;
   status)&lt;br /&gt;
        status_of_proc &amp;quot;$DAEMON&amp;quot; &amp;quot;$NAME&amp;quot; &amp;amp;&amp;amp; exit 0 || exit $?&lt;br /&gt;
        ;;&lt;br /&gt;
   restart|force-reload)&lt;br /&gt;
    #&lt;br /&gt;
    # If the &amp;quot;reload&amp;quot; option is implemented then remove the&lt;br /&gt;
    # 'force-reload' alias&lt;br /&gt;
    #&lt;br /&gt;
    log_daemon_msg &amp;quot;Restarting $DESC&amp;quot; &amp;quot;$NAME&amp;quot;&lt;br /&gt;
    do_stop&lt;br /&gt;
    case &amp;quot;$?&amp;quot; in&lt;br /&gt;
      0|1)&lt;br /&gt;
       do_start&lt;br /&gt;
       case &amp;quot;$?&amp;quot; in&lt;br /&gt;
          0) log_end_msg 0 ;;&lt;br /&gt;
          1) log_end_msg 1 ;; # Old process is still running&lt;br /&gt;
          *) log_end_msg 1 ;; # Failed to start&lt;br /&gt;
       esac&lt;br /&gt;
       ;;&lt;br /&gt;
      *)&lt;br /&gt;
         # Failed to stop&lt;br /&gt;
       log_end_msg 1&lt;br /&gt;
       ;;&lt;br /&gt;
    esac&lt;br /&gt;
    ;;&lt;br /&gt;
   *)&lt;br /&gt;
    echo &amp;quot;Usage: $SCRIPTNAME {start|stop|status|restart|force-reload}&amp;quot; &amp;gt;&amp;amp;2&lt;br /&gt;
    exit 3&lt;br /&gt;
    ;;&lt;br /&gt;
 esac&lt;br /&gt;
  &lt;br /&gt;
 :&lt;br /&gt;
&lt;br /&gt;
You have to put it in /etc/init.d (I have named it sshfs) and chmod it (chmod a+x sshfs). Then type in:&lt;br /&gt;
 update-rc.d -f sshfs defaults&lt;br /&gt;
This will add links in the rc.d directories.&lt;br /&gt;
&lt;br /&gt;
== Keeping Connection Alive ==&lt;br /&gt;
This is a config file for ssh that will let ssh and sshfs send keep alive messages every 15 seconds.  This file should be called &amp;quot;config&amp;quot; and be in root's .ssh directory.&lt;br /&gt;
 Host *&lt;br /&gt;
 ServerAliveInterval 15&lt;br /&gt;
 Host alandfaraway.info&lt;br /&gt;
 User alfa&lt;br /&gt;
 IdentityFile ~/.ssh/id_dsa&lt;br /&gt;
 Host alandfaraway.org&lt;br /&gt;
 User alfa&lt;br /&gt;
 IdentityFile ~/.ssh/id_dsa&lt;br /&gt;
&lt;br /&gt;
== SSH Script for MySQL ==&lt;br /&gt;
The SSHFS connection is also used for connecting to MySQL securely.  You must place the following contents in a file at /usr/local/bin/alfa-sshfs-ssh .  That file will be referenced by the sshfs init script.&lt;br /&gt;
 #!/bin/bash&lt;br /&gt;
 &lt;br /&gt;
 a=$@&lt;br /&gt;
 shopt -s extglob&lt;br /&gt;
 ssh -g -L 3306:127.0.0.1:3306 ${a//-oClearAllForward*([^ ])?( )}&lt;br /&gt;
&lt;br /&gt;
Make the script executable after you have pasted it in:&lt;br /&gt;
 chmod +x /usr/local/bin/alfa-sshfs-ssh&lt;br /&gt;
&lt;br /&gt;
'''If the Linux machine is directly connected to the Internet, specify the right interface for the port forward'''.  Make sure to set up firewall rules for allowing port 3306 inbound, too.  This should NOT be allowed inbound from the internet, just the local LAN (or Windows gameserver instance). &lt;br /&gt;
&lt;br /&gt;
== Sambia Install ==&lt;br /&gt;
If you need samba to access the vault continue, if you don't (Windows VM hosted on a Linux OS) you can stop here. Install Sambia:&lt;br /&gt;
 apt-get install samba&lt;br /&gt;
&lt;br /&gt;
Modify samba configuration file so that in the authentication part (it starts with ####### Authentication #######) you have the following uncommented:&lt;br /&gt;
  security = user&lt;br /&gt;
And in the Home directory related part (it starts with [homes] you should have:&lt;br /&gt;
  read only = no&lt;br /&gt;
After this you must do:&lt;br /&gt;
 /etc/init.d/samba restart&lt;br /&gt;
On the windows machine you should now be able to type this in a cmd.exe:&lt;br /&gt;
 net use z \\WindowsIP\alfa&lt;/div&gt;</summary>
		<author><name>Basilica</name></author>	</entry>

	<entry>
		<id>https://www.alandfaraway.info/Wiki/index.php?title=Server_Vault&amp;diff=2617</id>
		<title>Server Vault</title>
		<link rel="alternate" type="text/html" href="https://www.alandfaraway.info/Wiki/index.php?title=Server_Vault&amp;diff=2617"/>
				<updated>2014-08-10T04:01:21Z</updated>
		
		<summary type="html">&lt;p&gt;Basilica: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Technical Manuals]]&lt;br /&gt;
The server vault, the centralized repository for all ALFA character files, is hosted in [http://azure.microsoft.com Microsoft Azure].  Formerly, it was connected over SSHFS, but this system has been deprecated as it had reliability issues and forced the existence of two separate OS's (Windows and Linux) that had to be independently patched, managed, and maintained for each game server instance.&lt;br /&gt;
&lt;br /&gt;
The VaultTransferTool, built out of the ACR repository (VaultManagement\VaultTransferTool), provides a basic set of functionality for managing the server vault, including uploading files to the vault (but only if the vault didn't have a more up to date version of the files), downloading the entire vault to a directory (but only for files that were older than the vault versions), as well as selectively deleting files from the vault.&lt;br /&gt;
&lt;br /&gt;
One use of the VaultTransferTool would be to locally archive copies of the entire vault for selective restoration in case a character rollback had to be performed for technical or management reasons.  Another use might be for selective BIC edits.&lt;br /&gt;
&lt;br /&gt;
You can also use a tool like [http://aka.ms/AzCopy AzCopy] to copy files to and from Azure, or any [http://blogs.msdn.com/b/windowsazurestorage/archive/2014/03/11/windows-azure-storage-explorers-2014.aspx Azure Storage Explorer] tool to browse the vault interactively.  These require the use of an account name and access key, which can be obtained from the connection string (see the VaultTransferTool section below for details).  While the VaultTransferTool is slower for bulk transfers than AzCopy due to operating synchronously, the use of the VaultTransferTool is recommended for most operations if possible because it handles case conversion properly (all files on the Azure vault must be lowercased) and automatically avoids overwriting newer files.&lt;br /&gt;
&lt;br /&gt;
When deleting character files from the vault, remember to use the ALFA website's Clear Vault Cache tool to clear out any cached copies of the character file to delete in addition to removing the file from the Azure vault, so that the character file is not brought back the next time a player logs on to a server that previously hosted the character.&lt;br /&gt;
&lt;br /&gt;
=== VaultTransferTool ===&lt;br /&gt;
&lt;br /&gt;
Build the ACR repository and then build the ACR_ManagedScripts solution in alfa2_acr.hak\ACR_ManagedScripts (or else simply build VaultManagement\VaultTransferTool\VaultTransferTool.csproj directly from MSBUILD).&lt;br /&gt;
&lt;br /&gt;
All usage of the VaultTransferTool needs a connection string.  Get this from the config table in the database (VaultConnectionString), and pass it on the command line with -connectionstring VaultConnectionString, in addition to the operation to perform.  See [[ACR Configuration Settings]] for my details on the database config table.&lt;br /&gt;
&lt;br /&gt;
Help text for the vault tool:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tt&amp;gt;ALFA Azure Vault Management Tool v1.0.5334.26752&lt;br /&gt;
&lt;br /&gt;
Usage: VaultTransferTool [-connectionstring &amp;lt;connection string&amp;gt;] [-download &amp;lt;path&amp;gt; | -upload &amp;lt;path&amp;gt; | -delete &amp;lt;path&amp;gt;] [-includeall]&lt;br /&gt;
&lt;br /&gt;
The -connectionstring argument designates the Azure connection string to use to communicate with the vault.&lt;br /&gt;
&lt;br /&gt;
One of -download &amp;lt;path&amp;gt;, -upload &amp;lt;path&amp;gt;, or -delete &amp;lt;path&amp;gt; must be specified.  The -download and -upload options enable downloading files from the vault, or uploading files to the vault.  The given path should be laid out like a normal server vault directory, with a subdirectory for each account name and character (*.bic) files in each subdirectory.  Files are never deleted from the remote vault, only updated with -download or -upload.  A file is only transferred if the source of the transfer is newer than the destination file (unmodified files aren't copied again).&lt;br /&gt;
&lt;br /&gt;
To delete a file, use -delete &amp;lt;path&amp;gt; where &amp;lt;path&amp;gt; is in the form of account\character.bic.  The file is permanently deleted from the Azure vault, but the cache should still be purged from each server using the purge cache tool to ensure that it is not regenerated the next time a player logs on to a server that had previously cached the character file to delete.  The file to be deleted doesn't need to exist on the local machine, and is not deleted from the local machine if it did exist.&lt;br /&gt;
&lt;br /&gt;
Normally, only character files (*.bic) are transferred.  Use the -includeall argument to transfer all files, regardless of file extension.&amp;lt;/tt&amp;gt;&lt;/div&gt;</summary>
		<author><name>Basilica</name></author>	</entry>

	<entry>
		<id>https://www.alandfaraway.info/Wiki/index.php?title=Server_Vault&amp;diff=2616</id>
		<title>Server Vault</title>
		<link rel="alternate" type="text/html" href="https://www.alandfaraway.info/Wiki/index.php?title=Server_Vault&amp;diff=2616"/>
				<updated>2014-08-10T04:00:43Z</updated>
		
		<summary type="html">&lt;p&gt;Basilica: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Technical Manuals]]&lt;br /&gt;
The server vault, the centralized repository for all ALFA character files, is hosted in [http://azure.microsoft.com Microsoft Azure].  Formerly, it was connected over SSHFS, but this system has been deprecated as it had reliability issues and forced the existence of two separate OS's (Windows and Linux) that had to be independently patched, managed, and maintained for each game server instance.&lt;br /&gt;
&lt;br /&gt;
The VaultTransferTool, built out of the ACR repository (VaultManagement\VaultTransferTool), provides a basic set of functionality for managing the server vault, including uploading files to the vault (but only if the vault didn't have a more up to date version of the files), downloading the entire vault to a directory (but only for files that were older than the vault versions), as well as selectively deleting files from the vault.&lt;br /&gt;
&lt;br /&gt;
One use of the VaultTransferTool would be to locally archive copies of the entire vault for selective restoration in case a character rollback had to be performed for technical or management reasons.  Another use might be for selective BIC edits.&lt;br /&gt;
&lt;br /&gt;
You can also use a tool like [http://aka.ms/AzCopy AzCopy] to copy files to and from Azure, or any [http://blogs.msdn.com/b/windowsazurestorage/archive/2014/03/11/windows-azure-storage-explorers-2014.aspx Azure Storage Explorer] tool to browse the vault interactively.  These require the use of an account name and access key, which can be obtained from the connection string (see the VaultTransferTool section below for details).  While the VaultTransferTool is slower for bulk transfers than AzCopy due to operating synchronously, the use of the VaultTransferTool is recommended for most operations if possible because it handles case conversion properly (all files on the Azure vault must be lowercased) and automatically avoids overwriting newer files.&lt;br /&gt;
&lt;br /&gt;
When deleting character files from the vault, remember to use the ALFA website's Clear Vault Cache tool to clear out any cached copies of the character file to delete.&lt;br /&gt;
&lt;br /&gt;
=== VaultTransferTool ===&lt;br /&gt;
&lt;br /&gt;
Build the ACR repository and then build the ACR_ManagedScripts solution in alfa2_acr.hak\ACR_ManagedScripts (or else simply build VaultManagement\VaultTransferTool\VaultTransferTool.csproj directly from MSBUILD).&lt;br /&gt;
&lt;br /&gt;
All usage of the VaultTransferTool needs a connection string.  Get this from the config table in the database (VaultConnectionString), and pass it on the command line with -connectionstring VaultConnectionString, in addition to the operation to perform.  See [[ACR Configuration Settings]] for my details on the database config table.&lt;br /&gt;
&lt;br /&gt;
Help text for the vault tool:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tt&amp;gt;ALFA Azure Vault Management Tool v1.0.5334.26752&lt;br /&gt;
&lt;br /&gt;
Usage: VaultTransferTool [-connectionstring &amp;lt;connection string&amp;gt;] [-download &amp;lt;path&amp;gt; | -upload &amp;lt;path&amp;gt; | -delete &amp;lt;path&amp;gt;] [-includeall]&lt;br /&gt;
&lt;br /&gt;
The -connectionstring argument designates the Azure connection string to use to communicate with the vault.&lt;br /&gt;
&lt;br /&gt;
One of -download &amp;lt;path&amp;gt;, -upload &amp;lt;path&amp;gt;, or -delete &amp;lt;path&amp;gt; must be specified.  The -download and -upload options enable downloading files from the vault, or uploading files to the vault.  The given path should be laid out like a normal server vault directory, with a subdirectory for each account name and character (*.bic) files in each subdirectory.  Files are never deleted from the remote vault, only updated with -download or -upload.  A file is only transferred if the source of the transfer is newer than the destination file (unmodified files aren't copied again).&lt;br /&gt;
&lt;br /&gt;
To delete a file, use -delete &amp;lt;path&amp;gt; where &amp;lt;path&amp;gt; is in the form of account\character.bic.  The file is permanently deleted from the Azure vault, but the cache should still be purged from each server using the purge cache tool to ensure that it is not regenerated the next time a player logs on to a server that had previously cached the character file to delete.  The file to be deleted doesn't need to exist on the local machine, and is not deleted from the local machine if it did exist.&lt;br /&gt;
&lt;br /&gt;
Normally, only character files (*.bic) are transferred.  Use the -includeall argument to transfer all files, regardless of file extension.&amp;lt;/tt&amp;gt;&lt;/div&gt;</summary>
		<author><name>Basilica</name></author>	</entry>

	<entry>
		<id>https://www.alandfaraway.info/Wiki/index.php?title=Server_Vault&amp;diff=2615</id>
		<title>Server Vault</title>
		<link rel="alternate" type="text/html" href="https://www.alandfaraway.info/Wiki/index.php?title=Server_Vault&amp;diff=2615"/>
				<updated>2014-08-10T04:00:21Z</updated>
		
		<summary type="html">&lt;p&gt;Basilica: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Technical Manuals]]&lt;br /&gt;
The server vault, the centralized repository for all ALFA character files, is hosted in [http://azure.microsoft.com Microsoft Azure].  Formerly, it was connected over SSHFS, but this system has been deprecated as it had reliability issues and forced the existence of two separate OS's (Windows and Linux) that had to be independently patched, managed, and maintained for each game server instance.&lt;br /&gt;
&lt;br /&gt;
The VaultTransferTool, built out of the ACR repository (VaultManagement\VaultTransferTool), provides a basic set of functionality for managing the server vault, including uploading files to the vault (but only if the vault didn't have a more up to date version of the files), downloading the entire vault to a directory (but only for files that were older than the vault versions), as well as selectively deleting files from the vault.&lt;br /&gt;
&lt;br /&gt;
One use of the VaultTransferTool would be to locally archive copies of the entire vault for selective restoration in case a character rollback had to be performed for technical or management reasons.  Another use might be for selective BIC edits.&lt;br /&gt;
&lt;br /&gt;
You can also use a tool like [http://aka.ms/AzCopy AzCopy] to copy files to and from Azure, or any [http://blogs.msdn.com/b/windowsazurestorage/archive/2014/03/11/windows-azure-storage-explorers-2014.aspx Azure Storage Explorer] tool to browse the vault interactively.  These require the use of an account name and access key, which can be obtained from the connection string (see the VaultTransferTool section below for details).  While the VaultTransferTool is slower for bulk transfers than AzCopy due to operating synchronously, the use of the VaultTransferTool is recommended for most operations if possible because as it handles case conversion properly (all files on the Azure vault must be lowercased) and automatically avoids overwriting newer files.&lt;br /&gt;
&lt;br /&gt;
When deleting character files from the vault, remember to use the ALFA website's Clear Vault Cache tool to clear out any cached copies of the character file to delete.&lt;br /&gt;
&lt;br /&gt;
=== VaultTransferTool ===&lt;br /&gt;
&lt;br /&gt;
Build the ACR repository and then build the ACR_ManagedScripts solution in alfa2_acr.hak\ACR_ManagedScripts (or else simply build VaultManagement\VaultTransferTool\VaultTransferTool.csproj directly from MSBUILD).&lt;br /&gt;
&lt;br /&gt;
All usage of the VaultTransferTool needs a connection string.  Get this from the config table in the database (VaultConnectionString), and pass it on the command line with -connectionstring VaultConnectionString, in addition to the operation to perform.  See [[ACR Configuration Settings]] for my details on the database config table.&lt;br /&gt;
&lt;br /&gt;
Help text for the vault tool:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tt&amp;gt;ALFA Azure Vault Management Tool v1.0.5334.26752&lt;br /&gt;
&lt;br /&gt;
Usage: VaultTransferTool [-connectionstring &amp;lt;connection string&amp;gt;] [-download &amp;lt;path&amp;gt; | -upload &amp;lt;path&amp;gt; | -delete &amp;lt;path&amp;gt;] [-includeall]&lt;br /&gt;
&lt;br /&gt;
The -connectionstring argument designates the Azure connection string to use to communicate with the vault.&lt;br /&gt;
&lt;br /&gt;
One of -download &amp;lt;path&amp;gt;, -upload &amp;lt;path&amp;gt;, or -delete &amp;lt;path&amp;gt; must be specified.  The -download and -upload options enable downloading files from the vault, or uploading files to the vault.  The given path should be laid out like a normal server vault directory, with a subdirectory for each account name and character (*.bic) files in each subdirectory.  Files are never deleted from the remote vault, only updated with -download or -upload.  A file is only transferred if the source of the transfer is newer than the destination file (unmodified files aren't copied again).&lt;br /&gt;
&lt;br /&gt;
To delete a file, use -delete &amp;lt;path&amp;gt; where &amp;lt;path&amp;gt; is in the form of account\character.bic.  The file is permanently deleted from the Azure vault, but the cache should still be purged from each server using the purge cache tool to ensure that it is not regenerated the next time a player logs on to a server that had previously cached the character file to delete.  The file to be deleted doesn't need to exist on the local machine, and is not deleted from the local machine if it did exist.&lt;br /&gt;
&lt;br /&gt;
Normally, only character files (*.bic) are transferred.  Use the -includeall argument to transfer all files, regardless of file extension.&amp;lt;/tt&amp;gt;&lt;/div&gt;</summary>
		<author><name>Basilica</name></author>	</entry>

	<entry>
		<id>https://www.alandfaraway.info/Wiki/index.php?title=Server_Vault&amp;diff=2614</id>
		<title>Server Vault</title>
		<link rel="alternate" type="text/html" href="https://www.alandfaraway.info/Wiki/index.php?title=Server_Vault&amp;diff=2614"/>
				<updated>2014-08-10T03:59:53Z</updated>
		
		<summary type="html">&lt;p&gt;Basilica: Wording update.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Technical Manuals]]&lt;br /&gt;
The server vault, the centralized repository for all ALFA character files, is hosted in [http://azure.microsoft.com Microsoft Azure].  Formerly, it was connected over SSHFS, but this system has been deprecated as it had reliability issues and forced the existence of two separate OS's (Windows and Linux) that had to be independently patched, managed, and maintained for each game server instance.&lt;br /&gt;
&lt;br /&gt;
The VaultTransferTool, built out of the ACR repository (VaultManagement\VaultTransferTool), provides a basic set of functionality for managing the server vault, including uploading files to the vault (but only if the vault didn't have a more up to date version of the files), downloading the entire vault to a directory (but only for files that were older than the vault versions), as well as selectively deleting files from the vault.&lt;br /&gt;
&lt;br /&gt;
One use of the VaultTransferTool would be to locally archive copies of the entire vault for selective restoration in case a character rollback had to be performed for technical or management reasons.  Another use might be for selective BIC edits.&lt;br /&gt;
&lt;br /&gt;
You can also use a tool like [http://aka.ms/AzCopy AzCopy] to copy files to and from Azure, or any [http://blogs.msdn.com/b/windowsazurestorage/archive/2014/03/11/windows-azure-storage-explorers-2014.aspx Azure Storage Explorer] tool to browse the vault interactively.  These require the use of an account name and access key, which can be obtained from the connection string (see the VaultTransferTool section below for details).  While the VaultTransferTool is slower for bulk transfers than AzCopy due to operating synchronously, the use of the VaultTransferTool is recommended for most operations if possible, however, as it handles case conversion properly (all files on the Azure vault must be lowercased) and automatically avoids overwriting newer files.&lt;br /&gt;
&lt;br /&gt;
When deleting character files from the vault, remember to use the ALFA website's Clear Vault Cache tool to clear out any cached copies of the character file to delete.&lt;br /&gt;
&lt;br /&gt;
=== VaultTransferTool ===&lt;br /&gt;
&lt;br /&gt;
Build the ACR repository and then build the ACR_ManagedScripts solution in alfa2_acr.hak\ACR_ManagedScripts (or else simply build VaultManagement\VaultTransferTool\VaultTransferTool.csproj directly from MSBUILD).&lt;br /&gt;
&lt;br /&gt;
All usage of the VaultTransferTool needs a connection string.  Get this from the config table in the database (VaultConnectionString), and pass it on the command line with -connectionstring VaultConnectionString, in addition to the operation to perform.  See [[ACR Configuration Settings]] for my details on the database config table.&lt;br /&gt;
&lt;br /&gt;
Help text for the vault tool:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tt&amp;gt;ALFA Azure Vault Management Tool v1.0.5334.26752&lt;br /&gt;
&lt;br /&gt;
Usage: VaultTransferTool [-connectionstring &amp;lt;connection string&amp;gt;] [-download &amp;lt;path&amp;gt; | -upload &amp;lt;path&amp;gt; | -delete &amp;lt;path&amp;gt;] [-includeall]&lt;br /&gt;
&lt;br /&gt;
The -connectionstring argument designates the Azure connection string to use to communicate with the vault.&lt;br /&gt;
&lt;br /&gt;
One of -download &amp;lt;path&amp;gt;, -upload &amp;lt;path&amp;gt;, or -delete &amp;lt;path&amp;gt; must be specified.  The -download and -upload options enable downloading files from the vault, or uploading files to the vault.  The given path should be laid out like a normal server vault directory, with a subdirectory for each account name and character (*.bic) files in each subdirectory.  Files are never deleted from the remote vault, only updated with -download or -upload.  A file is only transferred if the source of the transfer is newer than the destination file (unmodified files aren't copied again).&lt;br /&gt;
&lt;br /&gt;
To delete a file, use -delete &amp;lt;path&amp;gt; where &amp;lt;path&amp;gt; is in the form of account\character.bic.  The file is permanently deleted from the Azure vault, but the cache should still be purged from each server using the purge cache tool to ensure that it is not regenerated the next time a player logs on to a server that had previously cached the character file to delete.  The file to be deleted doesn't need to exist on the local machine, and is not deleted from the local machine if it did exist.&lt;br /&gt;
&lt;br /&gt;
Normally, only character files (*.bic) are transferred.  Use the -includeall argument to transfer all files, regardless of file extension.&amp;lt;/tt&amp;gt;&lt;/div&gt;</summary>
		<author><name>Basilica</name></author>	</entry>

	<entry>
		<id>https://www.alandfaraway.info/Wiki/index.php?title=Server_Vault&amp;diff=2613</id>
		<title>Server Vault</title>
		<link rel="alternate" type="text/html" href="https://www.alandfaraway.info/Wiki/index.php?title=Server_Vault&amp;diff=2613"/>
				<updated>2014-08-10T03:58:40Z</updated>
		
		<summary type="html">&lt;p&gt;Basilica: Add link to ACR Configuration Settings page.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Technical Manuals]]&lt;br /&gt;
The server vault, the centralized repository for all ALFA character files, is hosted in [http://azure.microsoft.com Microsoft Azure].  Formerly, it was connected over SSHFS, but this system has been deprecated as it had reliability issues and forced the existence of two separate OS's (Windows and Linux) that had to be independently patched, managed, and maintained for each game server instance.&lt;br /&gt;
&lt;br /&gt;
The VaultTransferTool, built out of the ACR repository (VaultManagement\VaultTransferTool), provides a basic set of functionality for managing the server vault, including uploading files to the vault (but only if the vault didn't have a more up to date version of the files), downloading the entire vault to a directory (but only for files that were older than the vault versions), as well as selectively deleting files from the vault.&lt;br /&gt;
&lt;br /&gt;
One use of the VaultTransferTool would be to locally archive copies of the entire vault for selective restoration in case a character rollback had to be performed for technical or management reasons.  Another use might be for selective BIC edits.&lt;br /&gt;
&lt;br /&gt;
You can also use a tool like [http://aka.ms/AzCopy AzCopy] to copy files to and from Azure, or any [http://blogs.msdn.com/b/windowsazurestorage/archive/2014/03/11/windows-azure-storage-explorers-2014.aspx Azure Storage Explorer] tool to browse the vault interactively.  These require the use of an account name and access key, which can be obtained from the connection string (see the VaultTransferTool section below for details).  While it is slower for bulk transfers than AzCopy due to operating synchronously, the use of the VaultTransferTool is recommended for most operations if possible, however, as it handles case conversion properly (all files on the Azure vault must be lowercased) and automatically avoids overwriting newer files.&lt;br /&gt;
&lt;br /&gt;
When deleting character files from the vault, remember to use the ALFA website's Clear Vault Cache tool to clear out any cached copies of the character file to delete.&lt;br /&gt;
&lt;br /&gt;
=== VaultTransferTool ===&lt;br /&gt;
&lt;br /&gt;
Build the ACR repository and then build the ACR_ManagedScripts solution in alfa2_acr.hak\ACR_ManagedScripts (or else simply build VaultManagement\VaultTransferTool\VaultTransferTool.csproj directly from MSBUILD).&lt;br /&gt;
&lt;br /&gt;
All usage of the VaultTransferTool needs a connection string.  Get this from the config table in the database (VaultConnectionString), and pass it on the command line with -connectionstring VaultConnectionString, in addition to the operation to perform.  See [[ACR Configuration Settings]] for my details on the database config table.&lt;br /&gt;
&lt;br /&gt;
Help text for the vault tool:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tt&amp;gt;ALFA Azure Vault Management Tool v1.0.5334.26752&lt;br /&gt;
&lt;br /&gt;
Usage: VaultTransferTool [-connectionstring &amp;lt;connection string&amp;gt;] [-download &amp;lt;path&amp;gt; | -upload &amp;lt;path&amp;gt; | -delete &amp;lt;path&amp;gt;] [-includeall]&lt;br /&gt;
&lt;br /&gt;
The -connectionstring argument designates the Azure connection string to use to communicate with the vault.&lt;br /&gt;
&lt;br /&gt;
One of -download &amp;lt;path&amp;gt;, -upload &amp;lt;path&amp;gt;, or -delete &amp;lt;path&amp;gt; must be specified.  The -download and -upload options enable downloading files from the vault, or uploading files to the vault.  The given path should be laid out like a normal server vault directory, with a subdirectory for each account name and character (*.bic) files in each subdirectory.  Files are never deleted from the remote vault, only updated with -download or -upload.  A file is only transferred if the source of the transfer is newer than the destination file (unmodified files aren't copied again).&lt;br /&gt;
&lt;br /&gt;
To delete a file, use -delete &amp;lt;path&amp;gt; where &amp;lt;path&amp;gt; is in the form of account\character.bic.  The file is permanently deleted from the Azure vault, but the cache should still be purged from each server using the purge cache tool to ensure that it is not regenerated the next time a player logs on to a server that had previously cached the character file to delete.  The file to be deleted doesn't need to exist on the local machine, and is not deleted from the local machine if it did exist.&lt;br /&gt;
&lt;br /&gt;
Normally, only character files (*.bic) are transferred.  Use the -includeall argument to transfer all files, regardless of file extension.&amp;lt;/tt&amp;gt;&lt;/div&gt;</summary>
		<author><name>Basilica</name></author>	</entry>

	<entry>
		<id>https://www.alandfaraway.info/Wiki/index.php?title=Technical_Manual&amp;diff=2612</id>
		<title>Technical Manual</title>
		<link rel="alternate" type="text/html" href="https://www.alandfaraway.info/Wiki/index.php?title=Technical_Manual&amp;diff=2612"/>
				<updated>2014-08-10T03:56:03Z</updated>
		
		<summary type="html">&lt;p&gt;Basilica: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Manuals]]&lt;br /&gt;
This section is intended to help those interested in building, or just wanting to know how things like the core scripts work. Most of this information is NWN2-specific, though we will have some NWN1 technical documents listed here as well in the days to come. In the meantime, much of this information is outdated or at least in need of organization and qualification.&lt;br /&gt;
&lt;br /&gt;
== For Everyone ==&lt;br /&gt;
* [[Reporting Bugs]]&lt;br /&gt;
* [[Crafting Guide]]&lt;br /&gt;
* The [[ALFA Development Environment]] (How to use [https://github.com/ GitHub])&lt;br /&gt;
* [[Alternative Downloads]] for United States and Israel users.&lt;br /&gt;
&lt;br /&gt;
== Hosts and HDMs ==&lt;br /&gt;
* [[Virtual Machine Setup]]&lt;br /&gt;
* [[Basic Host Requirements]] - NWNx4 and nwn2server, basic requirements to host a module.&lt;br /&gt;
* [[Connecting to the MySQL Database]]&lt;br /&gt;
* [[Connecting to the Server Vault]]&lt;br /&gt;
&lt;br /&gt;
== Builders ==&lt;br /&gt;
* [[ALFA Build Module]]&lt;br /&gt;
* Guide to [[Writing ACR Quests]], as well as an [[Quest Creation Example]].&lt;br /&gt;
* [[ALFA Base Resources]] (ABR) Basics&lt;br /&gt;
* [[Toolset Guide]]&lt;br /&gt;
* [[Using Local Variables]]&lt;br /&gt;
* [[Building Areas]]&lt;br /&gt;
** [[Creating Creating Terrain with L3DT and YATT]]&lt;br /&gt;
* [[Building Doors]]&lt;br /&gt;
* [[Building Items]]&lt;br /&gt;
* [[Building Placeables]]&lt;br /&gt;
* [[Building Creatures]]&lt;br /&gt;
* [[Building Triggers]]&lt;br /&gt;
* [[Building Portals]]&lt;br /&gt;
* [[Writing Conversations &amp;amp; Quests]]&lt;br /&gt;
* [[ACR Spawn]] System: The complete manual&lt;br /&gt;
* [[ACR Encounter]] System&lt;br /&gt;
* [[ACR Rest]]ing &amp;amp; Healing Bonuses&lt;br /&gt;
&lt;br /&gt;
== Scripters ==&lt;br /&gt;
* [[ALFA Core Rules]] (ACR) Basics&lt;br /&gt;
* [[Data Persistence]]&lt;br /&gt;
* [[Rewarding Experience]]&lt;br /&gt;
* [[Spell Scripting]]&lt;br /&gt;
* [[Scripting Items]]&lt;br /&gt;
* [[Scripting Feats]]&lt;br /&gt;
* [[Script Library]] (General)&lt;br /&gt;
* [[Developing for ALFA]]&lt;br /&gt;
* [[Creating CLR Programs]]&lt;br /&gt;
* [[Creating Instanced Areas]]&lt;br /&gt;
* [[Running Scripts Remotely]]&lt;br /&gt;
&lt;br /&gt;
Reference Documents:&lt;br /&gt;
* [[GetEffectInteger]] return values&lt;br /&gt;
&lt;br /&gt;
== Technical Documentation ==&lt;br /&gt;
* [[Core Content Release Process]]&lt;br /&gt;
* [[ACR and Core Content Addition Policies]]&lt;br /&gt;
* [[TLK]] Information&lt;br /&gt;
* [[2DA]] Information&lt;br /&gt;
* [[GUI]] Information&lt;br /&gt;
* [[ACR Configuration Settings]]&lt;br /&gt;
* [[Creating a Content Patch]]&lt;br /&gt;
* [[Release Notes]]&lt;br /&gt;
* [[Server Vault]]&lt;/div&gt;</summary>
		<author><name>Basilica</name></author>	</entry>

	<entry>
		<id>https://www.alandfaraway.info/Wiki/index.php?title=Server_Vault&amp;diff=2611</id>
		<title>Server Vault</title>
		<link rel="alternate" type="text/html" href="https://www.alandfaraway.info/Wiki/index.php?title=Server_Vault&amp;diff=2611"/>
				<updated>2014-08-10T03:55:48Z</updated>
		
		<summary type="html">&lt;p&gt;Basilica: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Technical Manuals]]&lt;br /&gt;
The server vault, the centralized repository for all ALFA character files, is hosted in [http://azure.microsoft.com Microsoft Azure].  Formerly, it was connected over SSHFS, but this system has been deprecated as it had reliability issues and forced the existence of two separate OS's (Windows and Linux) that had to be independently patched, managed, and maintained for each game server instance.&lt;br /&gt;
&lt;br /&gt;
The VaultTransferTool, built out of the ACR repository (VaultManagement\VaultTransferTool), provides a basic set of functionality for managing the server vault, including uploading files to the vault (but only if the vault didn't have a more up to date version of the files), downloading the entire vault to a directory (but only for files that were older than the vault versions), as well as selectively deleting files from the vault.&lt;br /&gt;
&lt;br /&gt;
One use of the VaultTransferTool would be to locally archive copies of the entire vault for selective restoration in case a character rollback had to be performed for technical or management reasons.  Another use might be for selective BIC edits.&lt;br /&gt;
&lt;br /&gt;
You can also use a tool like [http://aka.ms/AzCopy AzCopy] to copy files to and from Azure, or any [http://blogs.msdn.com/b/windowsazurestorage/archive/2014/03/11/windows-azure-storage-explorers-2014.aspx Azure Storage Explorer] tool to browse the vault interactively.  These require the use of an account name and access key, which can be obtained from the connection string (see the VaultTransferTool section below for details).  While it is slower for bulk transfers than AzCopy due to operating synchronously, the use of the VaultTransferTool is recommended for most operations if possible, however, as it handles case conversion properly (all files on the Azure vault must be lowercased) and automatically avoids overwriting newer files.&lt;br /&gt;
&lt;br /&gt;
When deleting character files from the vault, remember to use the ALFA website's Clear Vault Cache tool to clear out any cached copies of the character file to delete.&lt;br /&gt;
&lt;br /&gt;
=== VaultTransferTool ===&lt;br /&gt;
&lt;br /&gt;
Build the ACR repository and then build the ACR_ManagedScripts solution in alfa2_acr.hak\ACR_ManagedScripts (or else simply build VaultManagement\VaultTransferTool\VaultTransferTool.csproj directly from MSBUILD).&lt;br /&gt;
&lt;br /&gt;
All usage of the VaultTransferTool needs a connection string.  Get this from the config table in the database (VaultConnectionString), and pass it on the command line with -connectionstring VaultConnectionString, in addition to the operation to perform.&lt;br /&gt;
&lt;br /&gt;
Help text for the vault tool:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tt&amp;gt;ALFA Azure Vault Management Tool v1.0.5334.26752&lt;br /&gt;
&lt;br /&gt;
Usage: VaultTransferTool [-connectionstring &amp;lt;connection string&amp;gt;] [-download &amp;lt;path&amp;gt; | -upload &amp;lt;path&amp;gt; | -delete &amp;lt;path&amp;gt;] [-includeall]&lt;br /&gt;
&lt;br /&gt;
The -connectionstring argument designates the Azure connection string to use to communicate with the vault.&lt;br /&gt;
&lt;br /&gt;
One of -download &amp;lt;path&amp;gt;, -upload &amp;lt;path&amp;gt;, or -delete &amp;lt;path&amp;gt; must be specified.  The -download and -upload options enable downloading files from the vault, or uploading files to the vault.  The given path should be laid out like a normal server vault directory, with a subdirectory for each account name and character (*.bic) files in each subdirectory.  Files are never deleted from the remote vault, only updated with -download or -upload.  A file is only transferred if the source of the transfer is newer than the destination file (unmodified files aren't copied again).&lt;br /&gt;
&lt;br /&gt;
To delete a file, use -delete &amp;lt;path&amp;gt; where &amp;lt;path&amp;gt; is in the form of account\character.bic.  The file is permanently deleted from the Azure vault, but the cache should still be purged from each server using the purge cache tool to ensure that it is not regenerated the next time a player logs on to a server that had previously cached the character file to delete.  The file to be deleted doesn't need to exist on the local machine, and is not deleted from the local machine if it did exist.&lt;br /&gt;
&lt;br /&gt;
Normally, only character files (*.bic) are transferred.  Use the -includeall argument to transfer all files, regardless of file extension.&amp;lt;/tt&amp;gt;&lt;/div&gt;</summary>
		<author><name>Basilica</name></author>	</entry>

	</feed>