Difference between revisions of "ZNC"

From ArchWiki
Jump to: navigation, search
m (Larivact moved page Znc to ZNC over redirect: casing)
 
(28 intermediate revisions by 16 users not shown)
Line 1: Line 1:
[[Category:Daemons and system services]]
+
[[Category:Internet Relay Chat]]
[[Category:Internet Relay Chat (English)]]
+
[[ja:Znc]]
{{i18n|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.
  
 +
== Installation ==
  
'''ZNC''' is an advanced IRC bouncer that is left connected so an IRC client can disconnect/reconnect without loosing the chat session.
+
[[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}}.
  
== Init script ==
+
Generate ZNC config as user '''znc'''.
 +
$ sudo -u znc znc --makeconf
 +
Go through the wizard and setup your preferences.
 +
{{warning|Do not edit configuration files manually in a text editor while ZNC is running. There is a very good chance you will lose your configuration. Use the webadmin or controlpanel modules to change settings on-the-fly. They are both included in the package.}}
  
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:
+
[[Start/enable]] {{ic|znc.service}}.
  
1. Install and create a config as normal:
+
== Configuration ==
 +
Though you can choose to modify your configuration files manually, this requires shutting down the server first. '''Do not edit configuration files while ZNC is running'''.
  
  pacman -S znc
+
=== Webadmin Module ===
  znc --makeconf
+
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.
  
2. Move the generated config to a global directory:
+
=== Control Panel Module ===
 +
If you enabled the control panel module, {{ic|/msg *controlpanel help}} for a list of settings while you are connected to the server.
  
  mkdir /etc/znc
+
== See also ==
  mv /home/$USER/.znc/* /etc/znc/
+
* [http://wiki.znc.in/ZNC ZNC's website]
  rm -rf /home/$USER/.znc
 
 
 
3. Create a new system user account
 
 
 
  useradd --system --no-create-home --user-group znc
 
 
 
4. Apply the correct permissions to the configuration directory
 
 
 
  chown -R znc:znc /etc/znc
 
 
 
5. Copy the prepared [https://gist.github.com/1266098 init script] to {{ic|/etc/rc.d/znc}} and make it executable
 
 
 
  cd /etc/rc.d
 
  wget https://raw.github.com/gist/1266098/b5530ead3f797ef344fb0e0cba16d270281d087b/znc
 
  chmod +x znc
 
 
 
6. Add znc to the [daemons] section in '''/etc/rc.conf'''.
 
 
 
Start and stop the ZNC daemon as usual by running:
 
  rc.d {start|stop|restart} znc
 
 
 
== External links ==
 
 
 
* [http://wiki.znc.in/ZNC ZNC (website)]
 
* [http://doomclaw.de/index.php/2009/08/18/run-znc-at-boot-with-an-init-script/ Init script guide]
 

Latest revision as of 16:18, 24 August 2017

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.

Warning: Do not edit configuration files manually in a text editor while ZNC is running. There is a very good chance you will lose your configuration. Use the webadmin or controlpanel modules to change settings on-the-fly. They are both included in the package.

Start/enable znc.service.

Configuration

Though you can choose to modify your configuration files manually, this requires shutting down the server first. Do not edit configuration files while ZNC is running.

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