Remote includes/en

Remote includes are a great way to share your configuration settings between servers.

You simply put your (shared) configuration files on a secure location, like a trusted web server. IRC servers will then fetch the configuration from there when they boot or the configuration is /REHASH'ed.

Example
In the example below we will assume you have a website called admin.example.org:

Create and password-protect a HTTP directory
Note: operations below are executed on the shell and assume shell access. You may possibly achieve the same via an admin panel like cPanel and SCP/SFTP.

irc@system:~$ cd public_html irc@system:~/public_html$ mkdir conf irc@system:~/public_html$ cd conf irc@system:~/public_html/conf$ irc@system:~/public_html/conf$ nano .htaccess Put in that file the following (change the path where needed!): AuthType Basic AuthName "restricted test" AuthUserFile /home/irc/public_html/conf/.htpasswd require valid-user irc@system:~/public_html/conf$ htpasswd -c /home/irc/public_html/conf/.htpasswd restricted New password: Re-type new password: Adding password for user 'restricted'
 * SSH to your www shell, go to the WWW directory and create a directory to store the configuration files:
 * Create an .htaccess file
 * Create a .htpasswd file with the appropriate password
 * Create or upload a file called opers.conf in this ~/public_html/conf/ directory.

Use remote includes to fetch the conf
This is simple, you just write down the URL in the include directive. In our example that would be like this:

HTTPS is best, but requires your site to have HTTPS enabled (often not the default!!): include "https://restricted:passwordyoutyped@admin.example.org/conf/opers.conf";

HTTP example: include "http://restricted:passwordyoutyped@admin.example.org/conf/opers.conf";

What if your web server is down
When UnrealIRCd can't load a remote include it will used a "cache copy" (stored in the cache/ subdirectory in UnrealIRCd). Unless you are loading a remote include for the very first time (or changed the URL) the cached copy should always be available.

This way, you can safely use remote includes. Even if there's an outage at your web server, your IRC servers will still be able to boot or REHASH. (Previously this wasn't the case and an outage of the webservers would cause a really problematic situation)