Installing Kitsu through Docker on Synology

August 17th, 2022

To install Kitsu on your synology nas, follow these instructions:

  1. Go to your synology and make sure SSH is enables. I also highly recommend changing the port from 22 to something else for security.

  2. Install Docker on your synology.

  3. If you have multiple volumes on your synology, open File Station, right click on the docker volume, open Properties and check what volume the folder is located in under Location

  4. Go to the docker folder and create a Kitsu folder. Inside that folder, create these folders: Docker (with a big D), postgres, previews, redis and tmp.

  5. Download Mathieus's kitsu docker script: https://gitlab.com/mathbou/docker-cgwire/

  6. Unzip and place all files in the Docker folder you just created.

  7. Open the env file in a text editor and change change these:

    - PORT to what port you want to enter Kitsu from. 80 is occupied by Synology so you have to pick something else. Example: 8800
    - DB_PASSWORD to something only you know.
  8. To make emailing work (invites, reset password, notifications) add these to your env file and edit as wanted (I have my gmail smtp server setup):

    MAIL_SERVER=smtp.gmail.com
    MAIL_PORT=587
    MAIL_USERNAME="YOUR EMAIL"
    MAIL_PASSWORD="YOUR PASSWORD (I HIGHLY recommend using an app-password as if compromised you just need to remove the app. Google it to know more.)"
    MAIL_DEFAULT_ENDER=no-reply@"YOUR EMAIL DOMANI"
    MAIL_USE_TLS=True
    DOMAIN_NAME="THE URL TO KITSU" 
  9. Save and close the env file. Now open docker-compose.yml and edit these lines:

    On line 14 change 'previews:${PREVIEWFOLDER:?}' to '/volume1/docker/kitsu/previews:${PREVIEWFOLDER:?}'
    On line 15 change 'tmp:${TMPDIR:-/tmp/zou}' to '/volume1/docker/kitsu/tmp:${TMPDIR:-/tmp/zou}'
    On line 60 change 'db:/var/lib/postgresql/data' to '/volume1/docker/kitsu/postgres:/var/lib/postgresql/data'
    On line 70 change 'redis:/data' to '/volume1/docker/kitsu/redis:/data'
    Remove everything under the volumes: tag (line 72-80)
  10. Open CMD/Terminal and enter: ssh "Your Synology Username"@"Your synology ip/URL" -p "Your port". Example: ssh jacob@synology -p 1234

  11. Enter your password when asked. You won't see what you're typing but that's just a security thing.

  12. Enter: sudo su - and enter your password again.

  13. Go to your Docker folder by entering: 'cd /volume1/docker/kitsu/Docker' and hit enter (you might have to change volume1 to what volume number you saw in step 3)

    Tip: Arrive faster to your folder by pressing tab after the first letter of a folder: cd /v [tab] d [tab] k [tab] D [tab] would result in cd /volume1/docker/kitsu/Docker

  14. Enter bash build.sh. Kitsu will now be installed.

  15. When everything is doen, open kitsu by entering your synology ip/local url + the port number you entered in the env. Example: synologynas:8800

    Default credentials:
    login: admin@example.com
    password: mysecretpassword