Home / GIS and Open Map Data for Beginners

QGIS Server: Publish a Desktop Project as WMS, WFS, and WCS Services

Rows of server racks in a data center corridor

Photo: Brett Sayles / Pexels

There is a fact about QGIS Server that surprises people who meet it late: the server is the desktop. Not a reimplementation, not an export, but the same rendering engine reading the same project file, so a map styled in QGIS Desktop, with its rule-based symbology, its labels, its print layouts, is the map the server draws for the web. That identity is the whole proposition. Other map servers ask you to restyle your data in their own configuration language and accept the drift between the author's map and the served one; QGIS Server removes the translation step entirely. What it asks in return is an understanding of its moving parts: a FastCGI binary behind a web server, a project prepared with service metadata, and the OGC service standards, WMS, WFS, and WCS, through which the world asks it for maps and data. This guide assembles those parts in order. If running your own server turns out to be more machinery than your map needs, the hosted alternative is assessed in the QGIS Cloud guide linked below, and the pair is meant to be read as a decision.

Interactive tool

Serve the Project Itself: The QGIS Server Checklist

Check off each step as you finish it. Your progress stays on this page.

0 of 7 complete

0% done

The Architecture in One Pass

A request arrives at a web server, Apache or nginx, which passes it to the QGIS Server binary, qgis_mapserv.fcgi, running as a FastCGI application. The binary opens the project file named in the request, reads the layers and styles from it, renders or extracts what the request asks for, and returns it through the web server to the client. Three consequences follow. First, the project file is the configuration: there is no separate server-side style file to keep in sync, and republishing a map means saving the project. Second, the server's data access is the project's data access, so the paths and connections inside the project must resolve on the server machine, the classic deployment trap discussed below. Third, performance and behavior scale with the project itself: a project that opens slowly on the desktop serves slowly, and a tidy project serves well. Everything else in this guide is a refinement of those three facts.

Preparing the Project: The OWS Server Tab

A desktop project becomes a service through its Project Properties, on the OWS Server tab, and the settings there are the article's core checklist. You declare the service metadata a capabilities document will advertise: title, abstract, and the contact and access information that make a service citable rather than anonymous. You set the CRS restrictions, the list of coordinate reference systems the service will answer in, which keeps clients from demanding projections your data serves badly. For WFS, a published-layer table decides which layers are exposed as downloadable features and which stay rendering-only, a distinction with real consequences: everything in a WMS response is a picture, while a WFS response is the data itself, and not every layer in a project should be handed out as data. WMS settings govern how layers are advertised and grouped. None of these settings changes how the project behaves on the desktop; they are the project's publishing face, stored inside the same file, which is why a served project should be treated as a publication artifact and versioned like one.

A high-tech server rack with network cables in an enclosure
A high-tech server rack with network cables in an enclosure

The Services: WMS, WFS, WCS

The three headline services answer three different questions. WMS, the Web Map Service, answers what does it look like: a client sends a GetMap request naming layers, a bounding box, an image size, and a CRS, and receives a rendered image, drawn by QGIS's own engine, so labels, blending, and rule-based styles survive intact. WFS, the Web Feature Service, answers give me the features: clients receive the actual vector data, geometry and attributes, for the layers you marked as published, and can filter and query rather than merely view. WCS, the Web Coverage Service, answers give me the raster values: coverage data such as elevation, delivered as data rather than as a picture of data. All three begin with the same handshake, a GetCapabilities request that returns the service's self-description: what it offers, in which CRSs, under what metadata. Reading a capabilities document is the professional's first diagnostic for any service, your own included, because it shows your publication exactly as the world's clients will see it. QGIS Server also exposes print layouts through the WMS GetPrint request, so a layout designed on the desktop, with its scale bar and legend, can be rendered to PDF by a web client, the desktop's cartography delivered through the server unchanged.

Deployment Traps and Honest Limits

Four traps account for most failed first deployments. Paths: a project referencing data by a path that exists only on the author's machine fails on the server; store data in paths the server can resolve, ideally relative to the project or in a shared data directory. Fonts and symbols: labels render with the server's fonts, so a label styled in a font the server lacks falls back silently and the served map drifts from the desktop one. Project hygiene: every layer in the project loads on every request's project open, so a served project should contain what the service publishes, not your whole working archive. Permissions: the web server's user, not yours, reads the project and data, and file permissions that work interactively fail silently under the server's account. The honest limit to state alongside the traps: QGIS Server serves the projects you give it, one project per service endpoint in the classic setup, and it is a publishing engine, not a portal; catalogs, user management, and multi-tenant hosting are layers you add or buy, which is exactly the gap the hosted services exist to fill.

Reading Your Own Service Like a Client

The discipline that separates a publication from an installation is verification from the client's side. Fetch your own GetCapabilities document and read it as a stranger would: is the title meaningful, are the layers named for humans, do the advertised CRSs match your restriction list? Issue a GetMap for a small bounding box and compare the image against the desktop canvas at the same extent; they should be indistinguishable, and where they are not, fonts and paths are the first suspects. Request one layer through WFS and confirm the features that return are the ones you intended to publish, and no others. Then make a change on the desktop, a color, a label, save the project, and watch the service change without a restart of anything but the request. That moment, the desktop and the server moving as one, is the system's promise kept, and the reason teams accept the FastCGI machinery as the price of it.

More Than One Project, and the Question of Scale

A single project per endpoint is the classic arrangement, not the ceiling. The server resolves which project to serve from the request, so one installation can serve many projects as many services, each with its own capabilities document, its own published layers, and its own audience; a small organization typically grows from one served project to a shelf of them, organized by the same discipline as the projects themselves. Scale, when it comes, is mostly the scale of rendering: each GetMap is a drawing job, so concurrent audiences are served by the ordinary web remedies, multiple FastCGI processes, sensible caching of tile-like requests in front of the server, and projects kept lean enough to open fast. The honest boundary is worth restating in this context: QGIS Server gives you services, not a geoportal. Search catalogs, user accounts, access dashboards, and upload workflows are separate layers, and an organization that needs them is shopping for a platform that embeds a server, or for the hosted route, rather than for a bigger server. Knowing which of those you need, services or platform, is the real architecture decision; the binary itself is the easy part.

Security Posture: Publish Deliberately

A served project is a public surface, and three habits keep it deliberate. First, the WFS published-layer table is a security control, not a convenience: a layer left published is downloadable by anyone who finds the endpoint, in full, attributes included, so the table deserves the same review you would give a shared folder's permissions. Second, serve a copy, not your working project: the publication project should be a maintained artifact whose layers are the ones you mean to expose, reading from data locations chosen for the purpose, because the project file itself enumerates every path and connection it touches. Third, remember the capabilities document is public by design: it advertises layer names, titles, and extents to any client that asks, which is the standard working as intended, and one more reason layer naming for strangers, from the OWS settings, is a professional habit rather than cosmetics. None of this makes QGIS Server unusually exposed; it makes it a server, with a server's ordinary obligations, and the teams that treat publication as an act with an audience are the ones whose services stay boring in the best way.

The Project File as a Publication Artifact

Because the project is the configuration, serving changes how a disciplined team treats the file itself. A served project deserves version control: keep it in git or its equivalent, so every change to the publication is a diff someone can read, review, and roll back, because a service whose styling changed mysteriously is a service whose file changed unrecorded. It deserves a change ritual: edit on the desktop, review the map at publication extents, save, then verify through the service's own capabilities and a test GetMap, the client-side check this guide teaches, rather than trusting the desktop's rendering as proof. And it deserves separation from working files: the project you serve should not be the project you experiment in, because the server's audience inherits every layer and half-finished style the file contains. Teams that adopt those three habits find that QGIS Server's central design, the project as the service, stops being a risk to manage and becomes what it was designed to be: one artifact, authored once, true in both places at once.

Related Guides

If this page answered part of the question, these GIS guides cover the rest of the same ground:

Frequently Asked Questions

Is QGIS Server the same software as QGIS Desktop?

It is the same rendering engine and the same project format. A project styled on the desktop is served by QGIS Server without restyling, so the WMS output matches the desktop map, including labels and rule-based symbology.

How is QGIS Server deployed?

As a FastCGI binary, qgis_mapserv.fcgi, behind a web server such as Apache or nginx. The web server passes OGC requests to the binary, which opens the named project and renders or extracts the response.

What is the OWS Server tab for?

It holds the project's publishing face: service title and abstract, CRS restrictions, WMS layer advertisement, and the WFS published-layer table that decides which layers are exposed as downloadable features.

Can QGIS Server print layouts?

Yes. Print layouts defined in the project are exposed through the WMS GetPrint request, so web clients can render the desktop's designed layout, legend, and scale bar to a document such as PDF.

What breaks most often in a first deployment?

Data paths that only exist on the author's machine, fonts the server lacks, oversized projects carrying unpublished layers, and file permissions set for the author's account rather than the web server's.

Photo credits: Brett Sayles (Pexels); Sergei Starostin (Pexels). Photos are served from this site; follow the credit to the library page for the original.