Yes, you can run ZNC on webfaction - the only requirement is that it's used privately (you or a group of people you know) and isn't used for malicious purposes.
However, you will need a Dedicated IP Address ($5/month) or Open-Ports IP address (free) with an open port in order to connect to the ZNC server. Alternatively, you could use an SSH tunnel. Both of these methods are described below.
The open-ports IP address is a recent development with WebFaction, where you can obtain a free semi-dedicated IP address used only for an open port. Please contact WebFaction Support for more information. This guide will refer to either a dedicated IP address or an Open-Ports IP address as a "dedicated IP"; the install procedure is identical for either.
First, create a Custom Application (Listening on Port) in the Control Panel. It will be used only to reserve the ZNC port. Note the port assigned by the Control Panel - we will call it
PORT and use a value of
33333 in this example.
Next, note your dedicated IP address - we will call it
DEDICATED_IP and use a value of
126.96.36.199 in this example. If you do not have a dedicated IP address, use the server's Shared IP address (and note the special steps at the end of the guide for using an SSH Tunnel).
If you have a dedicated IP address, you will need WebFaction Support to open this port in the firewall, too. This can be done via support ticket and usually only takes a few minutes.
# install znc. Original: http://znc.in/releases/znc-0.206.tar.gz
mkdir -p $HOME/znc/src
tar -xzf znc-0.206.tar.gz
make && make install
# generate config
# answer the questions:
# [ ?? ] What port would you like ZNC to listen on? (1 to 65535): 33333 # use your PORT
# [ ?? ] Would you like ZNC to listen using SSL? (yes/no) [no]: yes
# [ ?? ] Would you like to create a new pem file now? (yes/no) [yes]: yes
# [ ?? ] Would you like ZNC to listen using ipv6? (yes/no) [yes]: no
# [ ?? ] Listen Host (Blank for all ips): 188.8.131.52 # use your DEDICATED_IP . If you don't have a dedicated IP, use 127.0.0.1 instead
# [ ?? ] Load global module <partyline>? (yes/no) [no]: yes # allows you to create internal channels
# [ ?? ] Load global module <webadmin>? (yes/no) [no]: yes # allows you to manage users from a web admin page
# [ ?? ] Username (AlphaNumeric): myuser # this is the admin user
# [ ?? ] Enter Password: some_password # It's stored as an encrypted hash inside of ~/.znc
# [ ?? ] Would you like this user to be an admin? (yes/no) [yes]: yes
# [ ?? ] Nick [myuser]: myuser
# [ ?? ] Alt Nick [myuser_]: myuser_
- Accept defaults. You can enable modules later from the webadmin (and there is a better selection)
- Next, add your IRC servers. The passwords are not stored encrypted (that would be impossible).
- For IRC Channels, include the hash; use channel
#foo instead of
- Choose to launch ZNC
Accessing the ZNC Admin
open https://184.108.40.206:33333/ in a web browser (substituting
220.127.116.11:33333 with your
Accept the (self-signed) SSL certificate and login with your ZNC admin username and password.
I enable the following modules:
- simple_away (requires a value like "
myuser|away" in corresponding field)
Connecting to your ZNC
Set your IRC Client to use:
Server: 18.104.22.168 # use your DEDICATED_IP
Port: 33333 # use your PORT
Username: myuser # use your znc username
Password: myuser:some_password # note the "user:pass" format
Use SSL: True
Keeping ZNC up and running
Add this line to your crontab:
0,20,40 * * * * $HOME/znc/bin/znc > /dev/null 2>&1
ZNC won't start again if it's already running, so this is safe.
Using an SSH Tunnel (if you don't have a dedicated IP)
127.0.0.1 for the IP address in the ZNC configuration. (ZNC must bind to
- Use the server's Shared IP instead of the Dedicated IP in all other locations above
- Create an SSH tunnel exactly as for a remote connection to a database
- Except, instead of using port "
3306" or "
5432" for the tunnel, use your
PORT from above (ex: "
- Access your Web Admin from https://127.0.0.1:33333/
- When connecting to your ZNC, use a "
Server" value of "
127.0.0.1" in your IRC client.
- You can only connect to your local IRC client to the ZNC server while the tunnel is open
- ZNC will remain connected to the IRC server at all times irrespective of the tunnel
Dec 28 '11 at 22:23