Manual install using Docker Compose

1. Download the stserver-install.tar.gz file, which contains docker-compose.yml and accompanying configuration files, and save it to a local folder (for example, ~/stserver/).

Create a new folder for the server:

mkdir stserver
cd stserver

If you must use root, create a new folder, change its ownership to your user, and then enter the directory you created.

sudo mkdir stserver
sudo chown -R yourUser:yourGroup stserver
cd stserver

Download the stserver-install.tar.gz file from the Stanag On Demand Server GitHub repository or use the following command:

wget https://github.com/impleotv/stserver-release/releases/download/v3.0.6/stserver-install.tar.gz

Extract files:

tar -xvf stserver-install.tar.gz

2. Edit .env file, if needed.

Warning
In the .env file, there are some directories where the content will be stored, like ~/videos/ and ~/licenses. Create the directories and make sure the server (Docker) has the permission to write to these directories.

For example:

cd ..
mkdir videos
mkdir licenses
cd stserver

Note: if you do not create the directories, the server will do so automatically on the first run. It may create them as root, and the service will not be able to access them. You'll need to change the ownership to your user.

3. Start all the services by running docker-compose:

docker compose up -d

or, if you have an old version of Docker Compose, run

docker-compose up -d

When you run this for the first time, Docker will download the required images and start the containers.

After Docker finishes downloading and the containers have started, restart the server.

docker compose down
docker compose up -d

That's it! the server should be running now!

To run as non-root, you can set UID environmental variable or run export UID before calling docker-compose

Remote Docker deployment.

4. Open your browser at http://localhost:8080 or at the server IP, port 8080 (or the port you configured in the .env file) and check that everything starts up correctly.

Note, we use network_mode: host so the server could receive udp multicast. In this case container’s network stack is not isolated from the Docker host (the container shares the host’s networking namespace). In production, you should put a reverse proxy in front of the server.

To stop the services, run:

docker-compose down