Bitbucket is a code hosting site with unlimited public and private repositories. We're also free for small teams!


This is the source distribution of the NaviServer, a versatile
multiprotocol (httpd et al) server written in C/Tcl.  It can 
be easily extended in either language to create interesting 
web sites and services. 

    1. Introduction
    2. Documentation
    3. Compiling and installing
    4. Mailing lists

1. Introduction

NaviServer is maintained, enhanced, and distributed freely by the
open source community.  The home for NaviServer downloads and bug/patch
database is located on the SourceForge site:

Source code is available from the BitBucket site:

Another resource is the Tcl wiki:

NaviServer is a freely available open source package.  See the file
"license.terms" for complete information.

2. Documentation

Documentation is available in the "doc" subdirectory. At this
point it is incomplete and is considered to be a work in progress.
Once done, it will be distributed in Unix nroff format (suitable
for viewing with Unix "man" command) and HTML format (suitable
for viewing with any HTML-compatible browser).

The latest development version is available online:

3. Compiling and installing

The server is known to compile and run on FreeBSD, Linux, Solaris, 
Mac OS/X 10.2+ and Windows. To compile and install:

3a. Download, configure, build and install Tcl 8.4 or better

    You may use the version of Tcl already installed on your machine
    if it was built with threads enabled. The configure step below
    will complain if this is not the case.

    You can download the latest Tcl release from and follow
    the instructions in the included README. You may install Tcl within the
    directory you intend to install the server (e.g., /usr/local/ns) or
    in some other location. The following should work:

    $ gunzip < tcl8.5.15-src.tar.gz | tar xvf -
    $ cd tcl8.5.15/unix
    $ ./configure --prefix=/usr/local/ns --enable-threads --enable-symbols
    $ make install

3b. If you don't have GNU make (Linux make is GNU make), install
    it, as the server's makefiles require it.  If you're not sure
    if you have GNU make, try "make -v" to check.  You can get
    GNU make at

3c. Download, configure, build, and install NaviServer.

    Official releases:

    Latest development source code:

    The following should work for official releases:

        $ gunzip < naviserver-4.99.5.tar.gz | tar xvf -
        $ cd naviserver-4.99.5
        $ ./configure --prefix=/usr/local/ns --with-tcl=/usr/local/ns/lib --enable-symbols
        $ make
        $ su -c 'make install'

    The server's configure script takes the following options:


        Path to library installation directory of Tcl where
        configure can find the script.  Without
        this option, configure will search around for, perhaps finding it in ../tcl8.4.12/unix.


        You will need the zlib compression library headers available.
        e.g. $ yum install zlib-devel, for Fedora Linux. If the headers
        are not located in the usual places where the compiler looks,
        you can tell configure where to find them with the --with-zlib


        Compile with debug symbols enabled. Recommended.


        Set the installation directory for the server.  All
        program, man page, and runtime files (e.g., log
        files) will be install or updated within this

        To compile with Purify tool, set the variable $PURIFY to 
        your Purify executable along with any options you desire, e.g.,

        make PURIFY="purify -cache-dir=/home/joe/my-cache-dir" install

    If you checked out the source directly from bitbucket, replace
    "./configure" in the example above with "./" to get the
    initial makefiles created.

    You will need recent versions of autoconf and automake installed.
    You will need 'dtplite' which is part of 'tcllib' installed if you
    want to build the documentation.

    See: 'make help' for more help in the build process.

3d. Create and edit a config file (nsd.tcl, by convention)

    A couple of samples are provided to get you started:

    $ cd /usr/local/ns
    $ cp sample-config.tcl nsd.tcl
    $ vi nsd.tcl

    sample-config.tcl contains every possible configuration option and
    it's default value. Remove the ones you don't need.

    simple-config.tcl contains a basic set of the important configuration
    options you are likely to need. Add to it as necessary. 

3e. Try running the server in a shell window:

    $ cd /usr/local/ns
    $ ./bin/nsd -f -t conf/nsd.tcl

    The '-f' option runs the server in the foreground with important
    log messages directed to your terminal.

3f. To download and install additional modules:

    You will need the Mercurial version control system installed. It is
    included in most Linux distributions: e.g. yum install mercurial. For
    Windows and Mac OSX see:

        $ hg clone
        $ cd nsfoo
        $ make install NAVISERVER=/usr/local/ns

    See: for a full list of modules.

3g. To compile for Windows, you need Msys + Mingw


    The Msys + Mingw download above is the minimal environment needed
    to build Naviserver under Windows. It includes a shell environment and

    To install, you just download the zip file and extract the
    files into a directory. The README.TXT file describes how to launch
    the msys shell.

    You then run the configure script in the naviserver directory. The
    Msys based configure/build process works just like the UNIX one. 

    Example of building naviserver.exe:

    Run dos prompt or cmd.exe, assuming is unpacked in the root of drive c:

        c:>cd msys
        c:\msys> msys.bat

        $ cd /c/naviserver-4.99.5
        $ ./configure --prefix=c:/naviserver --with-tcl=c:/naviserver/lib
        $ make install

    Example above assumes Tcl is also built using mingw with prefix c:/naviserver

4. Mailing lists

There are mailing lists for NaviServer to discuss anything from
configuration, development, and future direction. To join visit:

Thank you for your interest in NaviServer.  We hope you find it
useful and look forward to hearing from you on our mailing list.


Recent activity


gustafn pushed 3 commits to naviserver/naviserver

5b5a1db - - defined new macro NS_GNUC_DEPRECATED_FOR() to be able to provide
832d01c - - fix typos
945c807 - - mark ns_tmpnam as deprecated since it uses an desprecated C-library function

gustafn pushed 1 commit to naviserver/naviserver

1debfe3 - Make Ns_CacheUnsetValue() more robust against code, where the freeProc calls a ns_cache operation (such as e.g. nsdbipg). Before that modification, double free operations were possible ...

gustafn pushed 3 commits to naviserver/naviserver

81d7c8c - - added addtional parameter "-decompress" for "ns_http wait" to compress
b9dfc6b - - use uplevel method instead of uplevel tcl cmd (to skip mixins layers)
786d71d - - provide a default value

gustafn pushed 1 commit to naviserver/naviserver

459dfee - - make place explicit, where loading magic is required (this fixes as well startup problems with some configs)
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.