29 Installation
Anurag Bhatia edited this page 2021-08-30 16:23:31 +05:30

You can install Semaphore via snap by command:

sudo snap install semaphore

Get it from the Snap Store

Dependencies

  • MySQL >= 5.6.4/MariaDB >= 5.3 or PostgreSQL (Optional, Semaphore supports embedded DB)
  • ansible in $PATH
  • git >= 2.x in $PATH

Dependency installation with Docker

docker run -d --name=mysql -p 127.0.0.1:3306:3306 -e MYSQL_ROOT_PASSWORD=my-secret-pw mysql:5.6

Install instructions

  1. Copy download link for your OS from Releases page
  2. (linux) curl -L <link> > /usr/bin/semaphore
  3. Run semaphore -setup or semaphore setup for v2.7.6+
  4. Continue setup (see below for more detail)

Setup

  • Mysql credentials, format for host is: ip:port (defaults to 127.0.0.1:3306)
  • Playbook path - semaphore will store playbooks there

All parameters are required, setup will ask you if they are correct and if so, write them to playbook-path/semaphore.json which you can edit at any time. Playbook path defaults to /tmp/semaphore which will be auto-created. The setup script will also test all mysql connections to see whether they work. It will also create the database if it doesn't exist, perform migrations and set up the initial user for you.

Running

The PORT environment variable can be used to change the port on which semaphore listens. Defaults to 3000.

HTTPs and security

Semaphore uses http and you have a few options to secure your installation:

  • use semaphore in a VPN or in your office
  • set up a reverse proxy like nginx or Caddy with HTTPs. See nginx example config
  • use plain http. (NOT ADVISED, unless you do not care about the contents being exposed)

Ansible

Alternatively some third party ansible roles are available on ansible galaxy to set up Semaphore. However these are not supported directly by us, so please address questions about them directly to the authors