This repository has been archived by the owner. It is now read-only.
Git Review Tool. Pages
Scala JavaScript Shell
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.


If you want to have something like github but on your own server (and you have no 5000$) you can use this application.

What it can

  • Manage users. User registration, collaborators on repos
  • Manage ssh public keys. You can add any number of keys for yourself or only for one repo
  • Repositories. Can be public or private. You can add collaborator to repository.
  • Forking. You can fork any visible for you repository and make pull requests for owner
  • Ssh read+write access, http read+write access (use HTTPS!!!), git protocol read access
  • Mail notification about push (in practice it is not difficult to add other)


Assume you already have a server with any java web server (i use jetty) and mongodb 2.0 (yes as storage it uses mongo).

The easiest way

$ git clone git://
$ cd luna
$ ./sbt package

Now use ./target/{VERSION}.war. Default settings help you to start an app. Check that your application server has javax.transaction api (you can take it here -


All configuration are optional. If one setting depends from others it will be written. Next / in filepath means root of war package. web.xml means /WEB-INF/web.xml. and props means /WEB-INF/classes/props/default.props.

Check that props file uses ASCII encoding

User Registration


users.registration.enabled (true) - enable or disable user registration.

At first time luna check existence of user with admin rights. If noone will be found then it creates one admin/admin (login with this credentials and change its name, password, add other users).



run.mode (development) - set it to production.

Session timeout

To change default session timeout you need to add to (or change) web.xml:

	<session-timeout>!!!time in minutes!!!</session-timeout>


In development i use version 2.0, but at 1.8 it works too.

Props settings: (localhost) - hostname of server where mongo located;

dp.port (27017) - port where mongo listen connections; (grt) - database name;

db.user - user for Depends on db.password;

db.password - password of db.user. Depends on db.user.

Stored paths

This is path in host fs where luna store own things.

Props settings:

repository.dir (./repo/) - where is user repositories is located. Make sure that this ends with /.

Git transport

Settings for luna supported transports:

daemon.sshd.cert.path (./) - where is sshd store it keys. Make sure that this ends with /.

daemon.sshd.port (22) - sshd port

daemon.gitd.port (9418) - gitd port

For http transport it uses web server port. If you want to use http make sure use HTTPS.


For mail notifications luna uses additional services.

notification.url - this is where luna-services listen connections. E.g. http://localhost:8081/luna/services

For notification service need to install other web app (luna-services). And you must have SMTP server. In luna-services/WEB-INF/applicationContext.xml see 2 places:

    <from uri="jetty:"/>
    <unmarshal ref="gsonPushDataFormat"/>
    <bean ref="recipientListBean"/>
    <to uri="seda:pushEvents"/>

You need to set uri attr of from tag to be relevant that use set for notification.url.

Second is a email settings for gmail. You can do this for your own smtp.

    <from uri="seda:emailOutput"/>
    <to uri=";username=USERNAME&amp;mail.smtp.starttls.enable=true&amp;mail.smtp.auth=true&amp;mapMailMessage=false"/>

Fs repo deleter

This daemon delete repositories one time at day from filesystem of server.

It store trigger settings in /WEB-INF/classes/quartz/job.xml.

<repeat-interval>There is time in millis</repeat-interval>


Luna tested on windows and linux. There are my recomendations:


  • Dont use in user repos not ASCII filenames (i mean local characters) will be a crash
  • Install Mongo and Jetty as windows services

Linux (for jetty):

  • If u use jetty dont use in repos (it is very outdated). Use 7 or 8. Install it by hands, add as daemon.
  • If you want to use port numbers < 1024. Read this ( how to do this.
  • Use something for reverse proxy (i use nginx)

Both (for jetty):


  • Check out the latest master to make sure the feature hasn't been implemented or the bug hasn't been fixed yet
  • Check out the issue tracker to make sure someone already hasn't requested it and/or contributed it
  • Fork the project
  • Start a feature/bugfix branch
  • Commit and push until you are happy with your contribution (make sensitive changes)
  • Discuss with me, if your changes are big
  • Please try not to mess with the build files, version, or history. If you want to have your own version, or is otherwise necessary, that is fine, but please isolate to its own commit so I can cherry-pick around it.
  • By default i suppose that contributor agreed with Apache License and Individual Contributor License Agreement (


Copyright (c) 2011 Bardadym Denis. See LICENSE.txt for further details.