Warning: preg_match(): Unknown modifier '-' in /home/akl1986/public_html/support/wp-content/plugins/redux-framework/redux-core/inc/extensions/metaboxes/class-redux-extension-metaboxes.php on line 783

Warning: preg_match(): Unknown modifier '-' in /home/akl1986/public_html/support/wp-content/plugins/redux-framework/redux-core/inc/extensions/metaboxes/class-redux-extension-metaboxes.php on line 783

Warning: preg_match(): Unknown modifier '-' in /home/akl1986/public_html/support/wp-content/plugins/redux-framework/redux-core/inc/extensions/metaboxes/class-redux-extension-metaboxes.php on line 783

Warning: preg_match(): Unknown modifier '-' in /home/akl1986/public_html/support/wp-content/plugins/redux-framework/redux-core/inc/extensions/metaboxes/class-redux-extension-metaboxes.php on line 783

Warning: preg_match(): Unknown modifier '-' in /home/akl1986/public_html/support/wp-content/plugins/redux-framework/redux-core/inc/extensions/metaboxes/class-redux-extension-metaboxes.php on line 783

Warning: preg_match(): Unknown modifier '-' in /home/akl1986/public_html/support/wp-content/plugins/redux-framework/redux-core/inc/extensions/metaboxes/class-redux-extension-metaboxes.php on line 783

Warning: preg_match(): Unknown modifier '-' in /home/akl1986/public_html/support/wp-content/plugins/redux-framework/redux-core/inc/extensions/metaboxes/class-redux-extension-metaboxes.php on line 783

Warning: preg_match(): Unknown modifier '-' in /home/akl1986/public_html/support/wp-content/plugins/redux-framework/redux-core/inc/extensions/metaboxes/class-redux-extension-metaboxes.php on line 783

Warning: Cannot modify header information - headers already sent by (output started at /home/akl1986/public_html/support/wp-content/plugins/redux-framework/redux-core/inc/extensions/metaboxes/class-redux-extension-metaboxes.php:783) in /home/akl1986/public_html/support/wp-includes/rest-api/class-wp-rest-server.php on line 1794

Warning: Cannot modify header information - headers already sent by (output started at /home/akl1986/public_html/support/wp-content/plugins/redux-framework/redux-core/inc/extensions/metaboxes/class-redux-extension-metaboxes.php:783) in /home/akl1986/public_html/support/wp-includes/rest-api/class-wp-rest-server.php on line 1794

Warning: Cannot modify header information - headers already sent by (output started at /home/akl1986/public_html/support/wp-content/plugins/redux-framework/redux-core/inc/extensions/metaboxes/class-redux-extension-metaboxes.php:783) in /home/akl1986/public_html/support/wp-includes/rest-api/class-wp-rest-server.php on line 1794

Warning: Cannot modify header information - headers already sent by (output started at /home/akl1986/public_html/support/wp-content/plugins/redux-framework/redux-core/inc/extensions/metaboxes/class-redux-extension-metaboxes.php:783) in /home/akl1986/public_html/support/wp-includes/rest-api/class-wp-rest-server.php on line 1794

Warning: Cannot modify header information - headers already sent by (output started at /home/akl1986/public_html/support/wp-content/plugins/redux-framework/redux-core/inc/extensions/metaboxes/class-redux-extension-metaboxes.php:783) in /home/akl1986/public_html/support/wp-includes/rest-api/class-wp-rest-server.php on line 1794

Warning: Cannot modify header information - headers already sent by (output started at /home/akl1986/public_html/support/wp-content/plugins/redux-framework/redux-core/inc/extensions/metaboxes/class-redux-extension-metaboxes.php:783) in /home/akl1986/public_html/support/wp-includes/rest-api/class-wp-rest-server.php on line 1794

Warning: Cannot modify header information - headers already sent by (output started at /home/akl1986/public_html/support/wp-content/plugins/redux-framework/redux-core/inc/extensions/metaboxes/class-redux-extension-metaboxes.php:783) in /home/akl1986/public_html/support/wp-includes/rest-api/class-wp-rest-server.php on line 1794

Warning: Cannot modify header information - headers already sent by (output started at /home/akl1986/public_html/support/wp-content/plugins/redux-framework/redux-core/inc/extensions/metaboxes/class-redux-extension-metaboxes.php:783) in /home/akl1986/public_html/support/wp-includes/rest-api/class-wp-rest-server.php on line 1794
{"id":2889,"date":"2019-12-27T07:00:05","date_gmt":"2019-12-27T07:00:05","guid":{"rendered":"https:\/\/support.aklwebhost.com\/?post_type=manual_kb&p=2889"},"modified":"2019-12-27T07:00:05","modified_gmt":"2019-12-27T07:00:05","slug":"znc-install-and-setup-on-ubuntu","status":"publish","type":"manual_kb","link":"https:\/\/support.aklwebhost.com\/knowledgebase\/znc-install-and-setup-on-ubuntu\/","title":{"rendered":"ZNC Install and Setup on Ubuntu"},"content":{"rendered":"

ZNC<\/strong>\u00a0is an advanced\u00a0IRC network bouncer<\/a>\u00a0that is left connected all the time so that an IRC client can disconnect or reconnect without losing the chat session.<\/p>\n

In this tutorial, we’ll compile ZNC with the web admin module installed.<\/p>\n

Installation<\/h3>\n
Packages<\/h5>\n

First of all, and as always, we’ll update the package cache.<\/p>\n

sudo apt-get update\r\n<\/code><\/pre>\n

Next, we’ll install some dependencies required to compile ZNC.<\/p>\n

sudo apt-get install libssl-dev libperl-dev pkg-config build-essential\r\n<\/code><\/pre>\n
Compile and install ZNC<\/h5>\n

Download the latest release of ZNC:<\/p>\n

cd \/usr\/local\/src\r\nsudo wget http:\/\/znc.in\/releases\/znc-latest.tar.gz\r\n<\/code><\/pre>\n

Extract ZNC from the tarball, and then enter the source directory:<\/p>\n

sudo tar xf znc-latest.tar.gz\r\ncd znc-*\/\r\n<\/code><\/pre>\n

At this step, you can set ZNC’s installation directory by adding the\u00a0--prefix=<yourdir><\/code>\u00a0option. But for now, we’ll install it system wide:<\/p>\n

.\/configure\r\n<\/code><\/pre>\n

We’ll compile ZNC and install it with the following commands. To speed up the process, you may add\u00a0-j n<\/code>\u00a0to the first\u00a0make<\/code>\u00a0command, where\u00a0n<\/code>\u00a0is the number of cores \/ vCPUs on your server.<\/p>\n

sudo make\r\nsudo make install\r\n<\/code><\/pre>\n

This may take a few minutes, depends on your machine’s configuration.<\/p>\n

Configuration<\/h3>\n

It is important not to run web-facing apps under\u00a0root<\/code>. So we’ll create a new user for ZNC.<\/p>\n

adduser --disabled-password znc\r\n<\/code><\/pre>\n

Now switch to\u00a0znc<\/code>.<\/p>\n

su znc -\r\ncd ~\r\n<\/code><\/pre>\n

Create ZNC’s config file under\u00a0znc<\/code>:<\/p>\n

\/usr\/local\/bin\/znc --makeconf\r\n<\/code><\/pre>\n

ZNC will ask us some questions in order to create the config file. The first one is important;\u00a0note your input because you will connect to the ZNC daemon using\u00a0that<\/em>\u00a0port.<\/strong><\/p>\n

We’ll enter\u00a06697<\/code>\u00a0now – that’s the default port for IRC with SSL \/ TLS.<\/p>\n

[ ?? ] What port would you like ZNC to listen on? (1025 to 65535): 6697\r\n<\/code><\/pre>\n

It is strongly recommended to enable SSL listening instead of the\u00a0plain-text<\/em>\u00a0(i.e. insecure) scheme.<\/p>\n

 Would you like ZNC to listen using SSL? (yes\/no) [no]: yes\r\n<\/code><\/pre>\n

Next question is regarding IPv6. That actually depends on your needs. If your home network is IPv6 enabled, it’s recommended to enable. We’ll just leave the default option there.<\/p>\n

[ ?? ] Would you like ZNC to listen using both IPv4 and IPv6? (yes\/no) [yes]: <press Enter>\r\n<\/code><\/pre>\n

Now it’ll prompt us about two global modules,\u00a0partyline<\/code>\u00a0and\u00a0webadmin<\/code>. They’re self-explanatory, and we’ll need to enable them.<\/p>\n

[ ?? ] Load global module <partyline>? (yes\/no) [no]: yes\r\n[ ?? ] Load global module <webadmin>? (yes\/no) [no]: yes\r\n<\/code><\/pre>\n

User creation. Enter your desired username and password for the user, then confirm it. Note that the password will\u00a0not<\/em>\u00a0be echoed.<\/p>\n

[ ?? ] Username (AlphaNumeric): Doe\r\n[ ?? ] Enter Password: <password>\r\n[ ?? ] Confirm Password: <password>\r\n<\/code><\/pre>\n

Grant the user admin permissions:<\/p>\n

[ ?? ] Would you like this user to be an admin? (yes\/no) [yes]: yes\r\n<\/code><\/pre>\n

Then, your IRC network options. Set it on your own. Here’s an example:<\/p>\n

[ ?? ] Nick [Doe]: Doe \r\n[ ?? ] Alt Nick [Doe_]: Doe_\r\n[ ?? ] Ident [Doe]: DoeIdent\r\n[ ?? ] Real Name [Got ZNC?]: Jane Doe        \r\n[ ?? ] Bind Host (optional): server.hostname\r\n[ ?? ] Number of lines to buffer per channel [50]: 50\r\n[ ?? ] Would you like to clear channel buffers after replay? (yes\/no) [yes]: yes\r\n<\/code><\/pre>\n

Enable these modules:<\/p>\n

[ ?? ] Load module <chansaver>? (yes\/no) [no]: yes\r\n[ ?? ] Load module <controlpanel>? (yes\/no) [no]: yes\r\n[ ?? ] Load module <perform>? (yes\/no) [no]: yes\r\n[ ?? ] Load module <webadmin>? (yes\/no) [no]: yes\r\n<\/code><\/pre>\n

Now we may setup the IRC network that ZNC will connect to.<\/p>\n

[ ?? ] Would you like to set up a network? (yes\/no) [no]: yes\r\n<\/code><\/pre>\n

We’ll use\u00a0#ubuntu<\/code>\u00a0on Freenode for example.<\/p>\n

Network (e.g. 'freenode' or 'efnet'): freenode\r\n<\/code><\/pre>\n

Information about these network modules prompted are\u00a0here<\/a>.<\/p>\n

[ ?? ] Load module <chansaver>? (yes\/no) [no]: yes\r\n[ ?? ] Load module <keepnick>? (yes\/no) [no]: yes\r\n[ ?? ] Load module <kickrejoin>? (yes\/no) [no]: yes\r\n[ ?? ] Load module <kickrejoin>? (yes\/no) [no]: yes\r\n[ ?? ] Load module <nickserv>? (yes\/no) [no]: yes\r\n[ ?? ] Load module <perform>? (yes\/no) [no]: yes\r\n[ ?? ] Load module <simple_away>? (yes\/no) [no]: yes\r\n<\/code><\/pre>\n

Set the server we’ll connect to:<\/p>\n

[ ?? ] IRC server (host only): irc.freenode.net\r\n[ ?? ] [irc.freenode.net] Port (1 to 65535) [6667]: 6697\r\n[ ?? ] [irc.freenode.net] Password (probably empty): \r\n[ ?? ] Does this server use SSL? (yes\/no) [no]: yes\r\n[ ** ] \r\n[ ?? ] Would you like to add another server for this IRC network? (yes\/no) [no]: no\r\n<\/code><\/pre>\n

And the channel we’ll join:<\/p>\n

[ ?? ] Would you like to add a channel for ZNC to automatically join? (yes\/no) [yes]: yes\r\n[ ?? ] Channel name: #ubuntu\r\n[ ?? ] Would you like to add another channel? (yes\/no) [no]: no\r\n<\/code><\/pre>\n

Finish the configuration and launch ZNC:<\/p>\n

[ ?? ] Would you like to set up another user? (yes\/no) [no]: no\r\n[ .. ] Writing config [\/home\/znc\/.znc\/configs\/znc.conf]...\r\n[ >> ] ok\r\n... ...\r\n[ ?? ] Launch ZNC now? (yes\/no) [yes]: yes\r\n<\/code><\/pre>\n

Yay. ZNC is up and running!<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"open","ping_status":"closed","template":"","format":"standard","manualknowledgebasecat":[244,247],"manual_kb_tag":[445],"_links":{"self":[{"href":"https:\/\/support.aklwebhost.com\/wp-json\/wp\/v2\/manual_kb\/2889"}],"collection":[{"href":"https:\/\/support.aklwebhost.com\/wp-json\/wp\/v2\/manual_kb"}],"about":[{"href":"https:\/\/support.aklwebhost.com\/wp-json\/wp\/v2\/types\/manual_kb"}],"author":[{"embeddable":true,"href":"https:\/\/support.aklwebhost.com\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/support.aklwebhost.com\/wp-json\/wp\/v2\/comments?post=2889"}],"version-history":[{"count":1,"href":"https:\/\/support.aklwebhost.com\/wp-json\/wp\/v2\/manual_kb\/2889\/revisions"}],"predecessor-version":[{"id":2890,"href":"https:\/\/support.aklwebhost.com\/wp-json\/wp\/v2\/manual_kb\/2889\/revisions\/2890"}],"wp:attachment":[{"href":"https:\/\/support.aklwebhost.com\/wp-json\/wp\/v2\/media?parent=2889"}],"wp:term":[{"taxonomy":"manualknowledgebasecat","embeddable":true,"href":"https:\/\/support.aklwebhost.com\/wp-json\/wp\/v2\/manualknowledgebasecat?post=2889"},{"taxonomy":"manual_kb_tag","embeddable":true,"href":"https:\/\/support.aklwebhost.com\/wp-json\/wp\/v2\/manual_kb_tag?post=2889"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}