Self-hosting with Docker and Docker Compose.
Docker is the easiest way to deploy a self-hosted instance of Fonoster. This guide will walk you through deploying the Fonoster services using Docker and Docker Compose.
The only prerequisite for Fonoster is to have Docker installed on the host machine.
Prepare the environment
Follow the next few steps to prepare the environment:
Create a new directory
Create a new directory in your preferred location and change it. The root directory we will use in the guide is fonoster.
Download the example configuration
Copy the .env.example
from the repository to the current directory and rename it to .env.
This file contains all the environment variables that the services need to run.
You can use the following commands to copy all the necessary files:
Update the configuration
Then, open the .env
file with your favorite editor and update the following variables:
ASTERISK_SIPPROXY_HOST
: Set this variable to the IP address of the host machine.
ROUTR_EXTERNAL_ADDRS
: Set this variable to the IP address of the host machine.
ROUTR_RTPENGINE_HOST
: Set this variable to the IP address of the host machine.
The integrations.json file contains the credentials for the integrations (stt, tts, etc). You must update this file with the correct credentials for the integrations you want to use.
In addition to the previous variables, you should update all the secrets and ensure the .env
file is safely stored.
Generate keys
Next, generate a set of public and private keys for the server. You can use the following command to generate the keys:
Confirm the directory structure
Your directory structure should look like this:
If it looks different, go back and review your steps.
Start the server
Finally, run the following command to start the application:
After a few moments, you can interact with Fonoster using the API or SDK.