The CCSO nameserver was an early form of database search on the Internet. In its most common form, it was used as an electronic "Phone Book" to lookup information such as telephone numbers and email addresses. Today, this service has largely been replaced by LDAP. 
This repository contains a working version of the original CCSO nameserver (aka "Qi") developed by Steven Domer at University of Illinois in '93. I salvaged the source code off a long forgotten FTP server, stuck it into a CentOS Docker Container, and smashed it with a hammer until gcc cried uncle and compiled without errors.
The fruits of this labor can be seen here:
There are less than a handful of CCSO servers still running on the open web. This is probably the first new nameserver to go live in over a decade! More information about CCSO, including a list of active domains, can be found at:
gopher://mozz.us:70/1/ccso (http proxy)
Table of Contents
git clone https://github.com/michael-lazar/ccso-nameserver.git && cd ccso-nameserver ./ccso build ./ccso initdb ./ccso qi
This will build the docker container, initialize a new CCSO database using the built-in seed data, and launch an interactive Qi command line prompt. The only dependency is Docker.
Using this Repository
I have included a bash script that contains aliases for my commonly used docker commands:
||Build the CCSO docker image|
||Setup the CCSO database files inside of a persistant docker volume|
||Launch a shell into the docker container|
||Launch the ph client|
||Run the qi server in local "hero" mode|
||Run the qi server in silent daemon mode|
||Install a systemd service that exposes the qi server|
Running Qi as a Daemon
Qi was originally designed to run behind an inetd service. The
qi binary itself has very straightforward behavior: Read one or more commands from stdin, write its response to stdout, and exit. Inetd handles running the actual TCP server and managing the incoming socket connections.
Inetd is not very popular anymore and has been largely supplanted by other services. For my implementation, I decided to use systemd sockets instead. Systemd binds to port 105 on the host machine, and everytime there's an incoming connection it launches an ephemeral docker container that executes the
qi binary. The container runs for the duration of the connection and shuts down once the connection closes.
Here's what the systemd service looks like:
# /etc/systemd/system/ccso.socket [Unit] Description=CCSO Nameserver [Socket] ListenStream=105 Accept=yes [Install] WantedBy=sockets.target
# /etc/systemd/system/ccso@.service [Unit] Description=CCSO Service Requires=ccso.socket [Service] Type=simple # Assumes the repository was cloned into /var/ccso/ ExecStart=/var/ccso/ccso daemon StandardInput=socket StandardError=journal [Install] WantedBy=multi-user.target
Customizing the Database
You can customize the fields in your CCSO database by editing the following files:
|util/db/prod-new.cnf||Defines all of the fields and indices that will be available to the nameserver|
|util/db/qi.input||Defines seed data that will be added when the database is created|
|util/db/initdb||Shell script used to construct the database files|
See the CSO Nameserver FAQ for more information on how these files are structured.
You can re-initialize the database at any time with the following commands, but beware that it will overwrite any existing data saved in the CCSO server. Migrating data from an old format appears to be a painful process, and I have not yet attempted it.
./ccso build ./ccso initdb
There are a ton of tools for qi and ph that are bundled with the source code but that I haven't documented here. A great place to start is by launching a shell into the docker container and poking around the /opt/nameserv/ directory.
CCSO's simple, plaintext ASCII protocol lends itself to work with a wide range of terminal clients. Some are more sophisticated than others.
Ph (stands for "Phonebook") was the original CCSO client that was developed
alongside the Qi server by University of Illinois. The source code is bundled
with Qi, and it gets built and installed inside of the docker image. I've included
a shortcut command to launch Ph from the docker container. Use the
to specify a server host.
Lynx (the curses web browser) supports CCSO links using the
When you open a cso link, lynx will present you with a form that contains all of
the fields that are indexed and searchable by the CCSO server. Pretty neat!
$ lynx cso://mozz.us
Lynx also recognizes gopher URLs with item type 2, and will parse everything
? as a CCSO query.
$ lynx "gopher://mozz.us:105/2?name=adams clay"
Good ol' Telnet. Is there anything it can't do?
A series of reference documents were published by the University of Illinois between 1988 and 1992. These cover everything from the motivations for creating the CCSO Nameserver, to a retrospective of what worked and what didn't. These are a great place to start if you're looking for some historical context:
- The CCSO Nameserver - A Description
- The CCSO Nameserver - Guide to Installation
- The CCSO Nameserver - Programmer's Guide
- The CCSO Nameserver - Why?
- The CCSO Nameserver - An Introduction
- The CCSO Nameserver - Server Client Protocol
An RFC memo was later published in 1998 that formally describes the CCSO protocol:
Other miscellaneous documentation: