Starting a Self-Hosted Server
This tutorial assumes that you've already installed ak
.
There are several ways to start a self-hosted ak
server. Choose the optimal
one, depending on your needs and constraints:
-
"Dev" mode: the quickest way to start a local server without installing or configuring any dependencies
-
Docker: includes some prepackaged dependencies and configurations that make AutoKitteh more robust
-
"Prod" mode: requires configuring and tuning, to tailor it to your reliability and performance needs
Dev Mode
Simply run this command:
ak up --mode dev
Under the hood
"Dev" mode does the following when the server starts:
- Check whether a Temporal server is ready - if not, start a Temporal dev server as a subprocess
- Initialize an in-memory SQLite database
(
file::memory:
) - Initialize an in-memory Miniredis cache
The downside of this mode is that it's less reliable, less efficient, and doesn't have failover or load-balancing options.
It exists mainly for personal experimentation purposes.
Docker
Run these commands:
git clone https://github.com/autokitteh/autokitteh.git
cd autokitteh
docker-compose up -d
The default compose file starts AutoKitteh in "dev" mode.
See the comments in the default compose file for examples of optional customizations of Temporal, using a PostgreSQL database, etc.
Prod Mode
For the ak up
command to work without the --mode dev
flag, ak
requires
at least a Temporal server - see the
configuration page for details.
See also other pages in the configuration section, to productionize and tune the AutoKitteh server, especially:
- Persistent storage with a relational database
- Caching with a Redis server
- HTTP tunneling - to enable OAuth-based integrations, and incoming events