Embedded C/C++ web server
C Lua Batchfile CMake HTML C++ Other
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.
Qt Lua data exchange between different Lua states Apr 29, 2018
VisualStudio Update file path in Viusal Studio unit test project Jan 27, 2018
ci Fixed a lot of misspellings in source code and documentation Jan 7, 2018
cmake Try Travis CI fix for OSX Oct 21, 2016
contrib/buildroot Update version number Jan 7, 2017
distribution/arch Update repository link: bel2125/civetweb --> civetweb/civetweb Aug 11, 2015
docs Document some preprocessor defines Jul 19, 2018
examples C++ wrapper: add POST example and add limits for parameter size Jun 16, 2018
include Add new API function mg_send_file_body Jul 2, 2018
resources Document some preprocessor defines Jul 19, 2018
src On the fly compression: Send only chunks with more than 0 bytes Aug 20, 2018
test Format code Aug 20, 2018
unittest build: warning fixes for test executables Jun 15, 2018
.clang-format Modify clang-format according to #207 (see comment) Oct 5, 2015
.gitattributes Add manual language settings for github syntax highlighting Mar 24, 2016
.gitignore Add install targets for headers and libraries. Mar 3, 2018
.travis.yml Travis: No log files for OSX Package build Jan 22, 2018
CMakeLists.txt build: fix invalid gcc compiler flag error Jun 7, 2018
CREDITS.md Update credits Aug 18, 2018
LICENSE.md Add USE_ZLIB define for on-the-fly compression (#199) Feb 26, 2018
Makefile Makefile: Add parameter for stack size Jun 2, 2018
Makefile.deprecated Update Lua to 5.2.3 Jul 30, 2014
Makefile.osx Change OS X package from dmg to zip file to fix hdiutil errors in Travis May 30, 2016
README.md Fixed a lot of misspellings in source code and documentation Jan 7, 2018
RELEASE_NOTES.md Update release notes Jun 10, 2018
_config.yml Set theme jekyll-theme-tactile Jan 4, 2017
appveyor.yml Unit test: add some comments for mcomments for test main Jan 21, 2018
build Build script for Unix systems Jul 9, 2015
build.cmd Fix up log_append in MinGW download script Jul 14, 2015
conanfile.py no asan, and make static default Mar 23, 2018
format.bat Add example for parsing JSON Jun 1, 2018
mingw.cmd Add powershell output to MinGW script log Jul 14, 2015


CivetWeb CivetWeb

The official home of CivetWeb is https://github.com/civetweb/civetweb

License GitHub contributors

Continuous integration for Linux and macOS (Travis CI):

Travis Build Status

Continuous integration for Windows (AppVeyor):

Appveyor Build Status

Test coverage check (coveralls, codecov) (currently in a setup and evaluation phase):

Coveralls Coverage Status


Static source code analysis (Coverity):

Coverity Scan Build Status

Project Mission

Project mission is to provide easy to use, powerful, C/C++ embeddable web server with optional CGI, SSL and Lua support. CivetWeb has a MIT license so you can innovate without restrictions.

CivetWeb can be used by developers as a library, to add web server functionality to an existing application. It can also be used by end users as a stand-alone web server. It is available as single executable, no installation is required.

Where to find the official version?

End users can download CivetWeb releases at SourceForge https://sourceforge.net/projects/civetweb/

Developers can contribute to CivetWeb via GitHub https://github.com/civetweb/civetweb

Trouble tickets should be filed on GitHub https://github.com/civetweb/civetweb/issues

Announcements are at Google Groups https://groups.google.com/d/forum/civetweb. Some older support and discussion threads are there as well. However, recently support questions and discussions are usually GitHub issues.

Source releases can be found on GitHub https://github.com/civetweb/civetweb/releases

A very brief overview can be found on GitHub Pages http://civetweb.github.io/civetweb/

Quick start documentation


CivetWeb keeps the balance between functionality and simplicity by a carefully selected list of features:

  • Liberal, commercial-friendly, permissive, MIT license
  • Free from copy-left licenses, like GPL, because you should innovate without restrictions.
  • Forked from Mongoose in 2013, before it changed the licence from MIT to commercial + GPL. A lot of enchancements have been added since that time, see RELEASE_NOTES.md.
  • Works on Windows, Mac, Linux, UNIX, iPhone, Android, Buildroot, and many other platforms.
  • Scripting and database support (Lua scipts, Lua Server Pages, CGI + SQLite database, Server side javascript). This provides a ready to go, powerful web development platform in a one single-click executable with no dependencies.
  • Support for CGI, HTTPS (SSL/TLS), SSI, HTTP digest (MD5) authorization, Websocket, WEbDAV.
  • Optional support for authentication using client side X.509 certificates.
  • Resumed download, URL rewrite, file blacklist, IP-based ACL, Windows service.
  • Download speed limit based on client subnet or URI pattern.
  • Simple and clean embedding API.
  • The source is in single file to make things easy.
  • Embedding examples included.
  • HTTP client capable of sending arbitrary HTTP/HTTPS requests.
  • Websocket client functionality available (WS/WSS).

Optionally included software








This project is very easy to install and use. Please read the documentation and have a look at the examples. More information may be found on the mailing list.

Note: I do not take any liability or warranty for any linked contents. Visit these pages and try the community support suggestions at your own risk.


Contributions are welcome provided all contributions carry the MIT license.

DO NOT APPLY fixes copied from Mongoose to this project to prevent GPL tainting. Since 2013, CivetWeb and Mongoose are developed independently. By now the code base differs, so patches cannot be safely transferred in either direction.

Some guidelines can be found in docs/Contribution.md.


CivetWeb is based on the Mongoose project. The original author of Mongoose was Sergey Lyubka (Copyright (c) 2004-2013 Sergey Lyubka, MIT license).

However, in August 16, 2013, the license of Mongoose has been changed after writing and distributing the original code this project is based on. The license change and CivetWeb used to be mentioned on the Mongoose Wikipedia page as well, but it's getting deleted (and added again) there every now and then.

CivetWeb has been forked from the last MIT version of Mongoose. Since 2013, CivetWeb has seen many improvements from various authors (Copyright (c) 2013-2017 the CivetWeb developers, MIT license). A list of authors can be found in CREDITS.md.

Using the CivetWeb project ensures the MIT licenses terms are applied and GPL cannot be imposed on any of this code, as long as it is sourced from here. This code will remain free with the MIT license protection.