Koha Solutions

Cataloging & MARC

Adding a Z39.50 target to Koha for copy cataloging

Add a remote catalog once and your catalogers stop typing records by hand. Here are the settings, a target that definitely works, and why a search returns nothing.

Updated 2026-08-09 · Tested against Koha 26.05

Z39.50 targets are added in Administration → Additional parameters → Z39.50/SRU servers. A target needs five things to work: hostname, port, database name, record syntax and character encoding. Get the database name or the syntax wrong and searches return nothing at all — with no error, which is why most broken targets look like network problems.

Start with one target you know works

Configure the Library of Congress first and prove the feature end to end. Only then add the targets you actually want — so a failure is unambiguously the new target, not your firewall.

Step 1Add the target

Go to Administration → Z39.50/SRU servers → New Z39.50 server and fill in the following. These values are the ones Koha ships in its own optional sample data.

FieldValue for the Library of Congress
Server nameLIBRARY OF CONGRESS
Hostnamelx2.loc.gov
Port210
DatabaseLCDB
Userid / PasswordBlank — the target is open
SyntaxUSMARC
Encodingutf8
Record typeBibliographic
Checked by defaultTick, so it is searched without being selected each time

The same host serves authority files on different databases: NAF for names and SAF for subjects, both with record type Authority. Add them as separate rows — a target is one database, not one server.

  1. 1Go to Cataloging → New from Z39.50/SRU.
  2. 2Tick the target you just added in the list on the right.
  3. 3Search by ISBN first — it is the least ambiguous field and the fastest way to prove the connection.
  4. 4Click Import on a result to open it in the MARC editor, then edit and save it as your own record.

An imported record is a starting point

Copy cataloging saves the typing, not the judgement. Check the framework fields your library requires, fix the classification to your scheme, and remove holdings data that belongs to the source library — a 952 from someone else's catalog is not your item.

SRU targets, which are the same thing over HTTP

Set Server type to SRU and the target speaks HTTP instead of the binary Z39.50 protocol. That matters when a firewall allows web traffic but not port 210, which is common on a university network.

An SRU target additionally needs SRU search fields mapping — Koha's internal field names mapped to the indexes that target actually publishes. Without it, every search is sent against an index the server does not have and returns zero results. Koha's sample SRU entry for the Library of Congress uses:

SRU search fields mapping
title=dc.title,isbn=bath.isbn,srchany=cql.anywhere,author=dc.author,issn=bath.issn,subject=dc.subject,stdid=bath.standardIdentifier

Every SRU server publishes its own index list in its explain response, and they differ. Copying another server's mapping is the most common reason a correctly configured SRU target finds nothing.

Why a target returns nothing

Z39.50 has almost no error reporting a user ever sees. A wrong database name, an unsupported syntax and a blocked port all produce the same screen: a search that completes with no results. So diagnose by elimination rather than by reading the message, because there is no message.

What you seeWhat it usually is
Every target returns nothing, including LCOutbound port 210 is blocked. Test with nc -vz lx2.loc.gov 210 from the server itself, not from your laptop.
One target returns nothing, others workWrong database name, or the target moved. There is no discovery — the value has to come from the provider.
Results appear but import produces garbled charactersEncoding mismatch. Try MARC-8 instead of utf8; older North American targets still send MARC-8.
Results appear but import failsSyntax mismatch. A target sending UNIMARC into a MARC21 catalog will not map — see MARC21 or UNIMARC.
Searches take 30 seconds then return nothingThe target is down or the timeout is too low. Raise Timeout to 30 seconds before concluding the settings are wrong.

Test the connection from the Koha server directly when you want a definite answer:

Terminal
nc -vz lx2.loc.gov 210 Connection to lx2.loc.gov 210 port [tcp/*] succeeded!

If that succeeds and Koha still finds nothing, the network is fine and the problem is one of the five settings above.

Why copy cataloging is worth the setup

A full original record takes a trained cataloger fifteen to thirty minutes. The same record downloaded from a national library and corrected takes two or three. For a library adding a few thousand titles a year, that is the difference between a backlog and a catalog that is current.

It is also the difference between records that follow a standard and records that follow local habit. A downloaded record carries proper authority-controlled headings and a classification number somebody argued about, which is exactly the part that is hardest to produce well in-house.

Share this article

Would rather not do this yourself? We do it as a service — and if you would rather it were already done, it is on Koha Cloud before you log in.