GGircd is a minimalistic IRC server written in Go with the primary goal of being feature compatible with the zhenya_bot IRC bot and a secondary goal of being easy to configure and deploy.
GGircd currently implements a subset of the IRC protocol as defined in RFC 1459, RFC 2812, and various mailing lists. Notable missing features are any form of server-to-server connections, banning users, and various status messages.
Eventually, there will be two ways of installing GGircd: from source and from a pre-built binary. Pre-built binaries don't currently exist, so you are stuck with building from source.
Installing from source will give you the most up-to-date version of GGircd available. Every effort is made to keep this bug free, but sometimes mistakes are made. :(
These instructions assume you have already installed Go. If you haven't installed Go, you can find easy-to-follow instructions here.
If you already have Go installed, installing GGircd is as easy as:
go get -u github.com/fimad/ggircd/ggircd
go install github.com/fimad/ggircd/ggircd
After installing, the ggircd
binary will be placed in $GOPATH/bin
. This
binary takes the following command line arguments:
-
--config takes a path to the ggircd.conf config file. The default value is
/etc/ggircd/ggircd.conf
. -
--log takes an integer and controls the verbosity of GGircd's logging. The higher the number, the more verbose the logging. The default value is 3.
Before you can run GGircd, you'll need to configure your server.
Configuration is done via a JSON encoded file, the default location of which
is /etc/ggircd/ggircd.conf
.
The ggircd.conf
file at the root of this repository provides the minimal
configuration necessary to get a server up and running.
The following are the possible fields that can appear in the ggircd.conf file along with descriptions and example values.
This is the name of your IRC server.
Example: "ggircd"
This is the name of your IRC network. This field is basically meaningless at the moment because multi-server IRC networks are not supported.
Example: "My IRC Network"
The port that GGircd should listen on.
Example: 6667
The port that GGircd should listen on for SSL connections.
Example: 6697
An object containing the paths for the private key and certificate files (PEM encoded) that are to be used for SSL connections. If this option is empty, then no SSL port will be opened.
Example: {"KeyFile": "./key.pem", "CertFile": "./cert.pem"}
The path to a file containing the message of the day. This file should be line wrapped at 80 columns.
Example: "/etc/ggircd/motd"
This is the default mode all channels will have when they are first created.
Example: "t"
This is the default mode all users will have when they first connect.
Example: "i"
If given, all connected users will be listed as having this host name.
Example: "i.love.plan9.bell-labs.com"
The frequency (in seconds) to send out PING messages to all connected clients. If no value is given, this defaults to 30 seconds.
Example: 30
The maximum latency a client can respond to a PING message with without being forcefully disconnected. If no value is given, this defaults to 5 seconds.
Example: 5
If supplied the port that Prometheus metrics will be exposed on. If zero or unspecified Prometheus metrics will not be collected.
Example: 4000
A path to a directory that the IRC server will write logs files to.
Example: /var/log/irc/
If true, a log file will be created in the log directory for each channel. Each file will contain JSON serialized IRC message.
Example: true