Skip to content

Setup

Hardware & Network requirements

To run SingleJump, you need to have a physical server or a virtual machine with the following minimum hardware requirements:

  • 2 CPUs
  • 4GB of RAM
  • 60GB of disk space

Additionally, it is recommended that you have a static public IP address so that this IP address can be the one accepted in the firewalls of your devices.

If you are planing to generate Let’s Encrypt certificates to secure the web access, the TCP port 80 should be opened.

Prepare your system

Install docker & docker compose

curl -sSL https://get.docker.com/ | CHANNEL=stable sh
systemctl enable --now docker

Create directory structure

SingleJump will persist data in the directories that you specify in the .env file, but you also need to create the directory structure for those volumes. For example:

mkdir -p /opt/singlejump/data/mysql/ /opt/singlejump/data/keys/ /opt/singlejump/data/recordings/ /opt/singlejump/data/logs/ /opt/singlejump/data/certs/ /opt/singlejump/data/letsencrypt/etc/ /opt/singlejump/data/letsencrypt/var/ /tmp/letsencrypt

DNS setup

It is recommended to choose a subdomain to access your SingleJump instance, as this will allow for the installation of an SSL certificate. For example: login.yourdomain.com

To do this, point the subdomain using an A record to the IP address you have chosen for your SingleJump instance.

Install SingleJump

Authentication

SingleJump utilizes a private Docker repository to store the Docker images (web_server and ssh_server). To access these images, authentication with our repository is required.

To authenticate, follow these steps:

docker login docker.singlejump.com

And provide your credentails (domain and license_secret)

Create Compose File

Navigate to the directory where you are setting up SingleJump, such as /opt/singlejump, create a new file called docker-compose.yml with the following content:

services:
  web_server:
    container_name: web_server
    image: docker.singlejump.com/web-server:2.0
    environment:
      - TIMEZONE=${TIMEZONE}
      - DB_DATABASE=${DB_DATABASE}
      - DB_USERNAME=${DB_USERNAME}
      - DB_PASSWORD=${DB_PASSWORD}
      - DB_KEY=${DB_KEY}
      - DOMAIN=${DOMAIN}
      - LICENSE_SECRET=${LICENSE_SECRET}
    ports:
      - ${HTTPS_PORT}:443
      - 80:80
    volumes:
      - ${VOLUME_KEYS}:/home/singlejump/webapp/storage/app/keys
      - ${VOLUME_RECORDINGS}:/home/singlejump/recordings
      - ${VOLUME_LOGS}:/home/singlejump/webapp/storage/logs
      - ${VOLUME_CERTS}:/home/singlejump/webapp/storage/app/certs
    restart: unless-stopped
  ssh_server:
    container_name: ssh_server
    image: docker.singlejump.com/ssh-server:2.0
    environment:
      - DB_DATABASE=${DB_DATABASE}
      - DB_USERNAME=${DB_USERNAME}
      - DB_PASSWORD=${DB_PASSWORD}
      - DB_KEY=${DB_KEY}
    ports:
      - ${SSHD_PORT}:2222
    volumes:
      - ${VOLUME_KEYS}:/home/singlejump/keys
      - ${VOLUME_RECORDINGS}:/home/singlejump/recordings
      - ${VOLUME_LOGS}:/home/singlejump/logs
    restart: unless-stopped
  database_server:
    container_name: database_server
    image: mysql:latest
    volumes:
      - ${VOLUME_MYSQL_DATA}:/var/lib/mysql
    environment:
      - MYSQL_RANDOM_ROOT_PASSWORD=yes
      - MYSQL_DATABASE=${DB_DATABASE}
      - MYSQL_USER=${DB_USERNAME}
      - MYSQL_PASSWORD=${DB_PASSWORD}
    restart: unless-stopped

Now we need to configure our docker-compose environment variables. To do that, we need to generate a key that will be used to secure some user information into the database. You can generate it with the following command:

dd if=/dev/urandom bs=32 count=1 2>/dev/null | base64

Please take note of the output and use that string to set the variable DB_KEY in your .env file.

Also, ensure to set a secure password in the DB_PASSWORD variable.

Create the environment variables file .env in the same directory of your docker-compose.yaml fle and populate it with your configuration:

# Enviroment variables for running docker instances
TIMEZONE=America/Chicago
DB_DATABASE=singlejump
DB_USERNAME=singlejump
DB_PASSWORD=(random_password)

# License secret provided
LICENSE_SECRET=

# You can generate this key with the following command: dd if=/dev/urandom bs=32 count=1 2>/dev/null | base64, do not change it after set
DB_KEY=(database_password_please_change)

HTTPS_PORT=443
SSHD_PORT=2222
DOMAIN=login.yourdomain.com

VOLUME_KEYS=/opt/singlejump/data/keys
VOLUME_RECORDINGS=/opt/singlejump/data/recordings
VOLUME_LOGS=/opt/singlejump/data/logs
VOLUME_CERTS=/opt/singlejump/data/certs
VOLUME_MYSQL_DATA=/opt/singlejump/data/mysql

🚀 Get Started

Launch your SingleJump:

  • Database initialization
  • Requirements for SSL and Let’s Encrypt
  • Preparing your environment and users

Go to Get Started.