Skip to content

Tip: Running Local Crypton Server

Ken Manheimer edited this page Jun 24, 2014 · 7 revisions

Using a public crypton server is a hassle for development, because e.g. you don't have the option to clear it at will. Running a local crypton server used to be more complicated, but still has deserves some guidance. Here's some tips on getting it going:

Prerequisites

  • Local crypton clone, fetched and built - follow the instructions in the README.md
  • Redis installed locally (or remote access to a redis server, but then you're depending again)
  • Postgresql installed locally (or remote access to a postgresql server, but...)

Starting the whole shebang

  • Start the redis server: /usr/local/bin/redis-server &
  • Start postegresql. (I use it on the mac, start it using spotlight.)
  • To start the crypton server:
    • You should first install the crypton-server command in /usr/local/bin, via:

      make install

    • Then:

      crypton-server run - run the server as a foreground command

      Alternately,

      crypton-server start - launches server as a daemon

      Then, crypton-server tail tails the logs, use crypton-server logs to review the accumulated logs... Use crypton-server --help to see the list of all available commands.

Clearing state for sparkling fresh crypton server sessions

  • Stop the crypton server process - cleaning the test db fails if the crypton server is running
  • Make sure the postgresql server is running
  • From the crypton clone root dir, clear the test db: make reset

(At time of writing, this doesn't clear the redis db, but that's not necessary. At time of writing, use of the redis is half-implemented, and it's intended just for the peer messaging feature. If it ever becomes useful/necessary, you can clear those keys using the redis-cli, like this: redis-cli keys "crypton.*" | xargs redis-cli del.)

Clone this wiki locally