No Server Required
Fossil does not require a central server. Data sharing and synchronization can be entirely peer-to-peer. Fossil uses conflict-free replicated data types to ensure that (in the limit) all participating peers see the exact same content.
But, A Server Can Be Useful
Fossil does not require a server, but a server does make collaboration easier. A Fossil server also works well as a complete website for a project. For example, the https://www.fossil-scm.org/ website, including the page you are now reading, is just a Fossil server displaying the content of the self-hosting repository for Fossil.This article is a guide for setting up your own Fossil server.
See "How CGI Works In Fossil" for background information on the underlying CGI technology. See "The Fossil Sync Protocol" for information on the wire protocol used for client/server communication.
Methods
There are basically four ways to set up a Fossil server:Fossil's HTTP server can be used standalone or you can put it behind many different pieces of software via various proxying schemes: Apache, nginx, HAProxy, stunnel (proxy mode), IIS... We cover some of those options below.
The CGI option works with many different web servers: Apache, IIS, lighttpd, althttpd... Where CGI doesn't work, SCGI usually does instead, such as in nginx.
Regardless of the method you choose, all can serve either a single repository or a directory hierarchy containing many repositories with names ending in ".fossil".
We've broken the configuration for each method out into a series of sub-articles, some of which are OS-specific:
Fossil Front-End Program | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Host OS | none | inetd | xinetd | stunnel | CGI | SCGI | althttpd | nginx | Apache | IIS | OS service |
Any | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ | ❌ | ❌ | ❌ |
Debian/Ubuntu | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ | ❌ | ❌ |
Windows | ❌ | ❌ | ❌ | ✅ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | ✅ |
Where there is a check mark in the "Any" row, the method for that is generic enough that it works across OSes that Fossil is known to work on. The check marks below that usually just link to this generic documentation.There are several widely-deployed socket listener schemes besides the inetd, xinetd, and stunnel schemes with documents linked above: Apple’s launchd, Linux’s systemd, Solaris’ SMF, etc. We would welcome contributions to cover these as well. We also welcome contributions to fill gaps (❌) in the table above.