Difference between revisions of "ZNC"

From ArchWiki
Jump to: navigation, search
m (Init script)
(See also: adding ZNC module link)
 
(24 intermediate revisions by 13 users not shown)
Line 1: Line 1:
 
[[Category:Internet Relay Chat]]
 
[[Category:Internet Relay Chat]]
'''ZNC''' is an advanced IRC bouncer that is left connected so an IRC client can disconnect/reconnect without loosing the chat session.
+
[[ja:Znc]]
 +
{{Related articles start}}
 +
{{Related|PsyBNC}}
 +
{{Related articles end}}
 +
[https://wiki.znc.in/ZNC ZNC] is an advanced IRC bouncer that is left connected so an IRC client can disconnect/reconnect without losing the chat session.
  
== Init script ==
+
== Installation ==
  
By default, ZNC does not include an daemon init script (like those usually found in {{ic|/etc/rc.d/}}). It maybe preferable to run ZNC as a daemon:
+
[[Install]] the {{pkg|znc}} package. The installation script will create a group and user '''znc'''. The default home directory for this user is {{ic|/var/lib/znc}}.
  
1. Install {{pkg|znc}} from the [[Official Repositories]].
+
Generate ZNC config as user '''znc'''.
 +
$ sudo -u znc znc --makeconf
 +
Go through the wizard and setup your preferences. [[Start/enable]] {{ic|znc.service}}.
  
2. Create a znc group and user
+
== Configuration ==
 +
Though you can choose to modify your configuration files manually, this requires shutting down the server first. To load a module when {{ic|znc.service}} starts, add {{ic|LoadModule <nowiki>=</nowiki> <modulename>}} to the configuration file: {{ic|/var/lib/znc/.znc/configs/znc.conf}}.
 +
{{warning|Do not edit {{ic|/var/lib/znc/.znc/configs/znc.conf}} while ZNC is running. There is a good chance you will lose your configuration. Use the ''webadmin'' or ''controlpanel'' modules, which are included in the package, to change settings on-the-fly.}}
  
groupadd -r znc
+
=== Webadmin Module ===
useradd -r -g znc -d /var/lib/znc -s /bin/false -c znc znc
+
If you enabled the web admin module, you can access it at {{ic|http://''yourhostname:port''}}, the znc port number is the same as you defined for connecting to the bouncer.
mkdir -p /var/lib/znc
 
chown znc:znc /var/lib/znc
 
  
{{Out of date|Arch Linux has moved to systemd, so rc.conf is no longer used.}}
+
=== Control Panel Module ===
3. Install rc.d and conf.d script:
+
If you enabled the control panel module, {{ic|/msg *controlpanel help}} for a list of settings while you are connected to the server.
 
 
wget -O /etc/rc.d/znc https://raw.github.com/kylef/ark/master/znc-system-wide/znc.rcd
 
chmod a+x /etc/rc.d/znc
 
wget -O /etc/conf.d/znc https://raw.github.com/kylef/ark/master/znc-system-wide/znc.conf
 
 
 
4. Generate ZNC config:
 
 
 
rc.d makeconf znc
 
 
 
To make ZNC start on boot, add ZNC to <code>DAEMONS</code> in <code>/etc/rc.conf</code>.
 
 
 
Start and stop the ZNC daemon as usual by running:
 
 
 
rc.d {start|stop|restart} znc
 
  
 
== See also ==
 
== See also ==
 
 
* [http://wiki.znc.in/ZNC ZNC's website]
 
* [http://wiki.znc.in/ZNC ZNC's website]
 +
* [http://wiki.znc.in/Modules#Module_List ZNC modules]

Latest revision as of 12:49, 30 April 2018

ZNC is an advanced IRC bouncer that is left connected so an IRC client can disconnect/reconnect without losing the chat session.

Installation

Install the znc package. The installation script will create a group and user znc. The default home directory for this user is /var/lib/znc.

Generate ZNC config as user znc.

$ sudo -u znc znc --makeconf

Go through the wizard and setup your preferences. Start/enable znc.service.

Configuration

Though you can choose to modify your configuration files manually, this requires shutting down the server first. To load a module when znc.service starts, add LoadModule = <modulename> to the configuration file: /var/lib/znc/.znc/configs/znc.conf.

Warning: Do not edit /var/lib/znc/.znc/configs/znc.conf while ZNC is running. There is a good chance you will lose your configuration. Use the webadmin or controlpanel modules, which are included in the package, to change settings on-the-fly.

Webadmin Module

If you enabled the web admin module, you can access it at http://yourhostname:port, the znc port number is the same as you defined for connecting to the bouncer.

Control Panel Module

If you enabled the control panel module, /msg *controlpanel help for a list of settings while you are connected to the server.

See also