Configuring Atheme

  By default Atheme does not include a configuration file, which means we will have to create one by copying from the example configuration file.

cp /usr/local/atheme/etc/atheme.conf.example /usr/local/atheme/etc/atheme.conf
vi /usr/local/atheme/etc/atheme.conf

Locate the MODULES section and scroll down to the list of IRC daemon protocol modules. You can add the ngIRCd module on a new line.

loadmodule "modules/protocol/ngircd";

The nickserv enforce module will enforce users to identify themselves if they attempt to use a registered nickname. Locate the line and uncomment (remove the pound character "#") for the nickserv enforce module. Don't modify the other defaults in this section unless it's necessary or if you already know what you're doing.

loadmodule "modules/nickserv/enforce";

Scroll down in the config file until you reach the "serverinfo" block. This block will define how the Atheme service will appear to ngIRCd. Use the 'name' that you configured previously in the [Server] block of the ngircd.conf file. For the netname, use the name that you configured in the [Global] block of the ngircd.conf file. Don't modify the other defaults in this section unless it's neccesary.

serverinfo {
  name = "service.emhmki.org";
  netname = "irc.emhmki.org";
  adminname = "<insert any name here>";
  adminemail = "<insert any mail address here>";
};

Scroll down in the config file until you reach the "uplink" block. This block will define how the Atheme service will connect to ngIRCd. For the send_password, use the password configured previously in the [Server] block of the ngircd.conf file for "MyPassword." For the receive_password, use the password configured previously in the [Server] block of the ngircd.conf file for "PeerPassword." Don't modify the other defaults in this section unless it's neccesary.

uplink "irc.emhmki.org" {
  send_password = "<insert the password here>";
  receive_password = "<insert the password here>";
};

Scroll down in the config file until you reach the "nickserv" block. Don't modify the other defaults in this section unless it's neccesary.

nickserv {
  host = "irc.emhmki.org";
};

Scroll down in the config file until you reach the "chanserv" block. Don't modify the other defaults in this section unless it's neccesary.

chanserv {
  host = "irc.emhmki.org";
};


Setup Atheme service account and Systemd startup script.

  It would be best practice to run the Atheme daemon from a non-root service account.

useradd --system --comment "Athemed IRC Service Daemon" --shell /sbin/nologin --home-dir /usr/local/atheme/bin/ athemed

Our athemed user will also need permission to read and write in the /usr/local/atheme directory.

chown -R athemed:athemed /usr/local/atheme/

Next we will need a Systemd unit service file for running Atheme.

vi /usr/lib/systemd/system/athemed.service

Add the following configuration to the file.

[Unit]
Description=Atheme IRC Service Daemon
After=network.target

[Service]
PrivateTmp=yes
NoNewPrivileges=true
User=athemed
ExecStart=/usr/local/atheme/bin/atheme-services
RemainAfterExit=true

[Install]
WantedBy=multi-user.target



[Return to top]

Back

Next

Last modified date: 2021-01-16