Installation manual

Requirements:

  1. 1Ghz CPU, 2Gb RAM, 500 MB of disk space
  2. Docker (community edition) installed on a Linux machine (we recommend Ubuntu 16.04 or newer)
  3. Free account at hub.docker.com — you have to tell us your username in order to get access to Shotty image.
  4. To use SHOTTY you need a modern web-browser. We recommend latest versions of Chrome. However, most features will work properly with any modern blink/webkit-compatible browser like Safari, Opera, etc.

Setup

Once you have Docker installed on your Linux machine type this:

# Sign in with Docker Hub credentials
docker login
# Download Shotty image
docker pull shotty/main:generic

Next step is to choose the storage path. SHOTTY database and everything you upload into SHOTTY is stored in there. Therefore, be sure you have enough space for your needs.

This is how you launch SHOTTY server:

docker run -d \
--name shotty \
--net=host \
--restart=always \
-v /etc/localtime:/etc/localtime:ro \
-v [/path/to/storage]:/media/shotty \
-h shotty.local shotty/main:generic

First, replace [/path/to/storage]with the path of your choice (we often use /media/shotty outside of the container as well).
If you’re going to use SHOTTY outside of your local network, replace shotty.local with your domain name accessible from the Internet.
Also, we recommend to save this code snippet as a script file, so you wouldn’t need to type it or look for it in your shell history every time you want to restart SHOTTY.

Let’s Encrypt SSL keys

In case you want to use free SSL keys issued by Let’s Encrypt, we’ve included some special tools to make it easy. Notice, that you need your SHOTTY to be accessible from the Internet in order to get the keys.

First, copy self-signed keys somewhere outside of SHOTTY container:

# Here we're copying keys into `[/path/to/keys-storage]/keys` 
docker cp shotty:/home/config/ssl/keys/ [/path/to/keys-storage]

Next, change the launch command adding a new mount point:

docker run -d \
--name shotty \
--net=host \
--restart=always \
-v /etc/localtime:/etc/localtime:ro \
-v [/path/to/storage]:/media/shotty \
-v [/path/to/keys-storage]/keys:/home/config/ssl/keys \
-h shotty.local shotty/main:generic

Then stop SHOTTY:

docker stop shotty && docker rm shotty

Then launch it again with the new launch command.
Once it’s up run command to get keys from Let’s Encrypt:

docker exec -it shotty /home/config/le/update-key [domain-name]

Replace [domain-name] with the domain name accessible from the Internet

The process should take a few seconds, while Let’s Encrypt servers will try to contact your server using your domain name. 
If anything goes wrong, first ensure your server’s ports 80 and 443 are actually accessible from the Internet, then try again. Still something wrong? Don’t hesitate to contact us!

SHOTTY Health

Right after you launch SHOTTY container, you can take a look at Monit dashboard. It displays how SHOTTY is feeling itself.
To see it, visit https://[your server domain or ip]:8888 and sign in with shotty as username and password.

When everything is green, type this to launch SHOTTY initial setup script:

docker exec -it shotty /home/config/utils/setup

You’ll be asked a number of simple questions. Then your SHOTTY will be initialized.

SHOTTY is ready!

You can access SHOTTY visiting https://[your server domain or ip]

Updating

# stop and remove container (this won't destroy any data)
docker stop shotty && docker rm shotty
# update shotty image
docker pull shotty/main:generic
# and run shotty again
docker run [...]

Backup

The only thing you need to back up is your [/path/to/storage]. If you have Let’s Encrypt keys, it’s worth to backup them as well.