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.
You will use the server's Open-Ports IP address (free) or a Dedicated IP Address to connect to the ZNC server. Alternatively, you could use an SSH tunnel. Both of these methods are described below.
An open-ports IP address will be added to your account automatically after creating a "Custom Application (listening on port)", and then selecting that application and marking it as having an Open Port in the applications list. You can see your server's Open Ports IP from the Control Panel dashboard and you'll use that in place of
OPENPORTS_IP in the instructions below.
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, edit the above application and mark Open Port. Then note your Open Ports IP address - we will call it
OPENPORTS_IP and use a value of
22.214.171.124 in this example. If you would rather connect through an SSH tunnel, use
127.0.0.1 instead, and note the special steps at the end of the guide for using an SSH Tunnel.
# install znc. Original: http://znc.in/releases/znc-1.6.3.tar.gz
mkdir -p $HOME/znc/src
tar -xzf znc-1.6.3.tar.gz
make && make install
# generate config
# answer the questions:
# [ ?? ] Listen on port (1025 to 65534): 33333 # use your PORT
# [ ?? ] Listen using SSL (yes/no) [no]: yes
# [ ?? ] Listen using both IPv4 and IPv6 (yes/no) [yes]: yes
# [ ?? ] Username (alphanumeric): myuser # this is the admin user
# [ ?? ] Enter password: some_password # It's stored as a hash inside of ~/.znc
# [ ?? ] Nick [myuser]: myuser
# [ ?? ] Alternate nick [myuser_]: myuser_
# [ ?? ] Ident [myuser]: myuser
# [ ?? ] Real name [Got ZNC?]: Me # Whatever you want (visible to others)
# [ ?? ] Bind host (optional): 126.96.36.199 # use your OPENPORTS_IP . If you'd rather use a tunnel, enter 127.0.0.1 instead
# [ ?? ] Set up a network? (yes/no) [yes]: no
# [ ?? ] Launch ZNC now? (yes/no) [yes]: yes
- 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://188.8.131.52:33333/ in a web browser (substituting
184.108.40.206:33333 with your
Accept the (self-signed) SSL certificate and login with your ZNC admin username and password.
I enable the following modules:
Connecting to your ZNC
Set your IRC Client to use:
Server: 220.127.116.11 # use your OPENPORTS_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
28 Dec '11, 22:23