Skip to content

Manual Docker install

Raphaël Brogat edited this page Nov 25, 2021 · 2 revisions

Manual Install of SELKS on docker

If the easy-setup.sh script failed, we suggest you try installing SELKS manually. Don't worry, It won't be long

Prerequisites

Make sure that git and curl are installed on your system

1. Install Docker

How to install docker

Test docker

sudo docker run --rm hello-world

2. Installing Docker-Compose

How to install docker-compose

3. Install Portainer (optional)

sudo docker volume create portainer_data
sudo docker run -d -p 9443:9443 --name=portainer --restart=always -v /var/run/docker.sock:/var/run/docker.sock -v portainer_data:/data portainer/portainer-ce --logo "https://www.stamus-networks.com/hubfs/stamus_logo_blue_cropped-2.png"

4. Install SELKS

Download SELKS

git clone https://github.com/StamusNetworks/SELKS.git
cd SELKS/docker/

Prepare environement variables for docker-compose

echo "COMPOSE_PROJECT_NAME=SELKS" > .env
echo "INTERFACES= -i eth0 -i eth1" >> .env

replace the interfaces name with whatever interface(s) you want to listen on

Generate django key and add it to env variables

output=$(sudo docker run --rm -it python:3.8.6-slim-buster /bin/bash -c "python -c \"import secrets; print(secrets.token_urlsafe())\"")
echo "SCIRIUS_SECRET_KEY=${output}" >> .env

Generate SSL certificates

sudo docker run --rm -it -v ./containers-data/nginx/ssl:/etc/nginx/ssl nginx openssl req -new -nodes -x509 -subj "/C=FR/ST=IDF/L=Paris/O=Stamus/CN=SELKS" -days 3650 -keyout /etc/nginx/ssl/scirius.key -out /etc/nginx/ssl/scirius.crt -extensions v3_ca && echo "SUCCESS" || echo "ERROR"

Pulling docker images

sudo docker-compose pull

Starting SELKS

sudo docker-compose up -d
Clone this wiki locally