Public | Automated Build

Last pushed: 3 months ago
Short Description
Open-source self-hosted session management service, written in Go.
Full Description



Mnemosyne is an open-source self-hosted session management service.
It's written in Go, making it easy to build and deploy as a static binary.

It provides two ways for communication:

Quick Start

To install and run service:

$ go get -d
$ cd $GOPATH/src/
$ glide install
$ go install ./cmd/mnemosyned
$ mnemosyned -log.format=humane -storage.postgres.address='postgres://localhost/example?sslmode=disable'

Simpliest implementation could looks like that:

package main

import (


func main() {
    mnemo, err := mnemosyne.New(mnemosyne.MnemosyneOpts{
        Addresses: []string{""},
        Block: true,
    if err != nil {
        // ...
    defer mnemo.Close()

    ses, err := mnemo.Start(context.Background(), "subject-id", "subject-client", map[string]string{
        "username": "",
        "first_name": "John",
        "last_name": "Snow",
    if err != nil {
        // ...


Storage Engine

Goal is to support multiple storage's, like PostgreSQL, Redis or MongoDB. Nevertheless currently supported is only PostgreSQL.

Remote Procedure Call API

For communication, Mnemosyne is exposing RPC API that uses protocol buffers, Google’s mature open source mechanism for serializing structured data.

  • Create
  • Get
  • List
  • Exists
  • Abandon
  • SetData
  • Delete


Mnemosyne can be installed in one way, from source.
Or can be used as a container using docker image.

From source

To install from source both go tools and glide is required.

$ go get -d
$ cd $GOPATH/src/
$ glide install
$ go install ./cmd/mnemosyned


mnemosyned accepts command line arguments to control its behavior. Possible options are is listed below.

Name Flag Default Type
host -host string
port -port 8080 int
time to live -ttl 24m duration
time to clear -ttc 1m duration
logger format -log.format json enum(json, humane, logfmt)
logger adapter -log.adapter stdout enum(stdout)
namespace -namespace string
subsystem -subsystem mnemosyne string
monitoring -monitoring false boolean
storage engine -storage.engine postgres enum(postgres)
storage postgres address -storage.postgres.address postgres://postgres:postgres@postgres/postgres?sslmode=disable string
storage postgres table name -storage.postgres.table session string
tls -tls false boolean
tls certificate file -tls.certfile string
tls key file -tls.keyfile string


As we know, mnemosyne can be configured in many ways. For the beginning we can start simple:

$ mnemosyned -namespace=acme -storage.postgres.address="postgres://localhost/test?sslmode=disable"

Mnemosyne will automatically create all required tables/indexes for specified database.



  • [ ] Client library
    • [x] Go
    • [ ] Python
  • [ ] Engines
    • [x] PostgreSQL
      • [x] Get
      • [x] List
      • [x] Exists
      • [x] Create
      • [x] Abandon
      • [x] SetData
      • [x] Delete
      • [x] Setup
      • [x] TearDown
    • [ ] RAM
    • [ ] Redis
Docker Pull Command
Source Repository