Permalink
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
744 lines (644 sloc) 33.3 KB
---
layout: main
title: Shoko Server - Linux Setup
excerpt: How to install Shoko Server on Linux.
permalink: server/install_linux.html
---
<main class = "main-content">
<div class = "container">
<div class = "row">
<!--
|‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒
| Sidebar
|‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒
!-->
<div class = "col-md-2 col-xl-2 order-last order-md-first">
<hr class = "d-md-none">
<aside class = "sidebar sidebar-sticky sidebar-stick-shadow pr-md-5 br-1">
{% include _sidebar.html %}
</aside>
</div>
<!--
|‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒
| Content
|‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒
!-->
<div class = "col-md-7 col-xl-7 m2-md-auto py-8">
<article>
<h1>{{ page.title }}</h1>
<p class = "lead">This guide is designed to get Shoko Server installed and properly setup so you can start importing and organizing your
anime collection.
</p>
<hr class = "my-6">
<section>
<h2 id = "installing-docker">Installing Docker</h2>
<nav class = "nav nav-tabs" id = "tab1" role = "tablist">
<a class = "nav-item nav-link active" id = "nav-install-linux" data-toggle = "tab" href = "#install-linux" role = "tab"
aria-controls = "nav-linux" aria-selected = "true">Linux</a>
<a class = "nav-item nav-link" id = "nav-install-synology" data-toggle = "tab" href = "#install-synology" role = "tab"
aria-controls = "nav-synology" aria-selected = "false">Synology NAS</a>
</nav>
<div class = "tab-content p-4">
<div class = "tab-pane fade show active" id = "install-linux" role = "tabpanel" aria-labelledby = "docker-tab">
<p>Installing <strong>Docker</strong> will depend on what distribution you are running.</p>
<P>For most users installing docker from their package manager is advised, this way you will keep up with the latest updates and
security updates. On the homepage of <a href = "https://docs.docker.com/install/" target = "_blank" rel = "noopener">Docker</a> you
can find the installation procedure for your distribution of the <strong>Docker Community Edition</strong>.
</p>
</div>
<div class = "tab-pane fade" id = "install-synology" role = "tabpanel" aria-labelledby = "synology-tab">
<div class = "row">
<div class = "col-xl-8 col-sm-12">
<p>Use the Package Center to install Docker.</p>
</div>
<div class = "col-xl-4 col-sm-12">
<a href = "/assets/img/server/Synology-Docker-Install.png" data-lightbox = "image-1"><img
src = "/assets/img/server/Synology-Docker-Install.png" class = "img-fluid" alt = "Synology Docker Install"></a>
</div>
</div>
</div>
</div>
</section>
<section>
<h2 id = "running-shoko-docker">Running Shoko Server</h2>
<nav class = "nav nav-tabs" id = "tab2" role = "tablist">
<a class = "nav-item nav-link active" id = "nav-running-linux" data-toggle = "tab" href = "#running-linux" role = "tab"
aria-controls = "nav-linux" aria-selected = "true">Linux</a>
<a class = "nav-item nav-link" id = "nav-running-synology" data-toggle = "tab" href = "#running-synology" role = "tab"
aria-controls = "nav-synology" aria-selected = "false">Synology NAS</a>
</nav>
<div class = "tab-content p-4">
<div class = "tab-pane fade show active" id = "running-linux" role = "tabpanel" aria-labelledby = "docker-tab">
<h4>Getting the latest Shoko Server Docker Image</h4>
<p>The latest Docker image is available on <a href = "https://hub.docker.com/r/cazzar/shokoserver/" target = "_blank"
rel = "noopener">Docker Hub</a>. To get the image run the following in the command line.
</p>
<pre><code class = "language-bash">docker pull cazzar/shokoserver</code></pre>
<h4>Docker Run</h4>
<p>To run a basic docker container for Shoko Server, you can run the following from the command line.</p>
<pre><code class = "language-bash">docker run -p 8111 cazzar/shokoserver</code></pre>
<p>This command will run a new empty docker instance with Shoko Server installed.
At the same time port <strong>8111</strong> will be made available on the host to reach Shoko Server remotely.
At this point you'll be able to use Shoko Desktop to connect to the server.
</p>
<h4>Advised Docker Options</h4>
<table class = "table table-bordered">
<thead>
<tr>
<th>Command</th>
<th>Purpose</th>
</tr>
</thead>
<tbody>
<tr>
<td>
<pre><code class = "language-bash">-p 8111:8111/tcp</code></pre>
</td>
<td>
<p><a href = "https://docs.docker.com/engine/reference/run/#expose-incoming-ports" target = "_blank" rel = "noopener">Publishes
the containers Ports.</a>
</p>
<p>Simply put, you are binding the port on container to the port on host, otherwise a random port will be chosen on the host.
</p>
<p>TCP is used since UDP is not required.</p>
</td>
</tr>
<tr>
<td>
<pre><code class = "language-bash">-v "/path/to/shoko/settings:/home/shoko/.shoko"</code></pre>
</td>
<td>
<p><a href = "https://docs.docker.com/engine/reference/run/#volume-shared-filesystems" target = "_blank" rel = "noopener">Mounts
volumes.</a></p>
<p>To preserve settings between updates, the settings folder must be remapped to a location outside the container.
</p>
</td>
</tr>
<tr>
<td>
<pre><code class = "language-bash">-v "/path/to/anime:/anime"</code></pre>
</td>
<td>
<p><a href = "https://docs.docker.com/engine/reference/run/#volume-shared-filesystems" target = "_blank" rel = "noopener">Mounts
volumes.</a></p>
<p>In order for Shoko Server to manage your collection, you must map at least one volume to the container.</p>
<p>Note: You can have multiple volumes, and they can be named any way you like (/anime, /tv_shows, /media, etc.)</p>
</td>
</tr>
<tr>
<td>
<pre><code class = "language-bash">-v "/path/to/import:/import"</code></pre>
</td>
<td>
<p><a href = "https://docs.docker.com/engine/reference/run/#volume-shared-filesystems" target = "_blank" rel = "noopener">Mounts
volumes.</a></p>
<p>Optional: You may also map a import volume, there is no difference between this and the previous command - This is just
another example to illustrate how adding additional volumes work.
</p>
<p>Note: You can have multiple volumes, and they can be named any way you like (also try: /downloads, /completed_torrents, etc.)
</p>
</td>
</tr>
<tr>
<td>
<pre><code class = "language-bash">cazzar/shokoserver</code></pre>
</td>
<td>
<p><a href = "https://docs.docker.com/engine/reference/run/" target = "_blank" rel = "noopener">Specifies the Image
to derive the container from.</a></p>
</td>
</tr>
</tbody>
</table>
<p>Putting everything together will get us the following configuration</p>
<pre><code class = "language-bash">docker run -d --name shokoserver --restart always -p 8111:8111/tcp -v "/path/to/shoko/settings:/home/shoko/.shoko" -v "/path/to/anime:/anime" -v "/path/to/import:/import" cazzar/shokoserver</code></pre>
<p>This will provide you a Docker Shoko Server instance that runs in the background with persistent configuration, as well as expose
it on your server to connect with Shoko Desktop / WebUI.
</p>
<p>Note: If you run the Docker container as any other <strong>uid/gid other than the default Shoko user </strong> see the <a
href = "#advanced-settings">Advanced Settings</a> section.
</p>
</div>
<div class = "tab-pane fade" id = "running-synology" role = "tabpanel" aria-labelledby = "running-synology">
<div class = "row">
<div class = "col-xl-8 col-sm-12">
<p>Open Docker from the Main Menu.</p>
</div>
<div class = "col-xl-4 col-sm-12">
<a href = "../assets/img/server/Synology-Running-Docker-Start-Docker.png" data-lightbox = "image-2"><img
src = "../assets/img/server/Synology-Running-Docker-Start-Docker.png" class = "img-fluid"
alt = "Synology Running Docker - Start Docker"/>
</a>
</div>
</div>
<div class = "row">
<div class = "col-xl-8 col-sm-12">
<p>Open the Docker Registry.</p>
</div>
<div class = "col-xl-4 col-sm-12">
<a href = "../assets/img/server/Synology-Running-Docker-Open-Docker-Registry.png" data-lightbox = "image-2"><img
src = "../assets/img/server/Synology-Running-Docker-Open-Docker-Registry.png" class = "img-fluid"
alt = "Synology Running Docker - Open Docker Registry"/>
</a>
</div>
</div>
<div class = "row">
<div class = "col-xl-8 col-sm-12">
<p>Open Docker Registry Settings.</p>
</div>
<div class = "col-xl-4 col-sm-12">
<a href = "../assets/img/server/Synology-Running-Docker-Open-Docker-Registry-Settings.png" data-lightbox = "image-2"><img
src = "../assets/img/server/Synology-Running-Docker-Open-Docker-Registry-Settings.png" class = "img-fluid"
alt = "Synology Running Docker - Open Docker Registry Settings"/>
</a>
</div>
</div>
<div class = "row">
<div class = "col-xl-8 col-sm-12">
<p>By default, Synology's Docker is only configured to allow images downloaded from it's own private registry. Shoko
Server is published to the Docker Hub, and that registry needs to be added to Synology Docker.
</p>
<p>Add a new registry.</p>
</div>
<div class = "col-xl-4 col-sm-12">
<a href = "../assets/img/server/Synology-Running-Docker-Add-A-New-Registry.png" data-lightbox = "image-2"><img
src = "../assets/img/server/Synology-Running-Docker-Add-A-New-Registry.png" class = "img-fluid"
alt = "Synology Running Docker - Add A New Registry"/>
</a>
</div>
</div>
<div class = "row">
<div class = "col-xl-8 col-sm-12">
<p>Enter Docker Hub's registry details</p>
<table class = "table table-bordered">
<thead>
<tr>
<th>Name</th>
<th>Value</th>
</tr>
</thead>
<tbody>
<tr>
<td>Registry Name</td>
<td>Docker Hub</td>
</tr>
<tr>
<td>Registry URL</td>
<td>https://registry.hub.docker.com</td>
</tr>
<tr>
<td>Trust SSL Self-Signed Certificate</td>
<td>&#x2714;</td>
</tr>
</tbody>
</table>
</div>
<div class = "col-xl-4 col-sm-12">
<a href = "../assets/img/server/Synology-Running-Docker-Enter-Registry-Details.png" data-lightbox = "image-2"><img
src = "../assets/img/server/Synology-Running-Docker-Enter-Registry-Details.png" class = "img-fluid"
alt = "Synology Running Docker - Enter Registry Details"/></a>
</div>
</div>
<div class = "row">
<div class = "col-xl-8 col-sm-12">
<p>Click OK to close Synology Docker Registry Settings.</p>
</div>
<div class = "col-xl-4 col-sm-12">
<a href = "../assets/img/server/Synology-Running-Docker-Close-Synology-Docker-Registry-Settings.png"
data-lightbox = "image-2"><img
src = "../assets/img/server/Synology-Running-Docker-Close-Synology-Docker-Registry-Settings.png" class = "img-fluid"
alt = "Synology Running Docker - Close Synology Docker Registry Settings"/></a>
</div>
</div>
<div class = "row">
<div class = "col-xl-8 col-sm-12">
<p>You can now search repositories from the Docker Hub Registry. Enter "cazzar/shokoserver" into the search box above and click
the search button.
</p>
<p>Check to make sure your results are accurate and click on the "cazzar/shokoserver" to chose a release to download.
</p>
</div>
<div class = "col-xl-4 col-sm-12">
<a href = "../assets/img/server/Synology-Running-Docker-Search-for-Shoko-Server.png" data-lightbox = "image-2"><img
src = "../assets/img/server/Synology-Running-Docker-Search-for-Shoko-Server.png" class = "img-fluid"
alt = "Synology Running Docker - Search for Shoko Server"/></a>
</div>
</div>
<div class = "row">
<div class = "col-xl-8 col-sm-12">
<p>Chose the latest release to download.</p>
<div class = "alert alert-primary" role = "alert">
<h4 class = "alert-heading">Note</h4>
<p>At this time there are only two releases available - 'Latest' and 'Daily'. There is no difference between the two builds.
However they are updated frequently. A seperate stable release will become available soon.
</p>
</div>
</div>
<div class = "col-xl-4 col-sm-12">
<a href = "../assets/img/server/Synology-Running-Docker-Select-Release.png" data-lightbox = "image-2"><img
src = "../assets/img/server/Synology-Running-Docker-Select-Release.png" class = "img-fluid"
alt = "Synology Running Docker - Select Release"/></a>
</div>
</div>
<div class = "row">
<div class = "col-xl-8 col-sm-12">
<p>After selecting the release, a notification under images will appear and Shoko Server download will begin.</p>
</div>
<div class = "col-xl-4 col-sm-12">
<a href = "../assets/img/server/Synology-Running-Docker-Download-Started.png" data-lightbox = "image-2"><img
src = "../assets/img/server/Synology-Running-Docker-Download-Started.png" class = "img-fluid"
alt = "Synology Running Docker - Download Started"/></a>
</div>
</div>
<div class = "row">
<div class = "col-xl-8 col-sm-12">
<p>Wait for the download to complete, then click Launch to create a container for Shoko Server (download size may differ).
</p>
</div>
<div class = "col-xl-4 col-sm-12">
<a href = "../assets/img/server/Synology-Running-Docker-Launch-Image.png" data-lightbox = "image-2"><img
src = "../assets/img/server/Synology-Running-Docker-Launch-Image.png" class = "img-fluid"
alt = "Synology Running Docker - Launch Image"/></a>
</div>
</div>
<div class = "row">
<div class = "col-xl-8 col-sm-12">
<p>Click on Advanced Settings.</p>
</div>
<div class = "col-xl-4 col-sm-12">
<a href = "../assets/img/server/Synology-Running-Docker-Advanced-Settings.png" data-lightbox = "image-2"><img
src = "../assets/img/server/Synology-Running-Docker-Advanced-Settings.png" class = "img-fluid"
alt = "Synology Running Docker - Advanced Settings"/></a>
</div>
</div>
<div class = "row">
<div class = "col-xl-8 col-sm-12">
<p>OPTIONAL: <a href = "https://docs.docker.com/engine/admin/start-containers-automatically/" target = "_blank" rel = "noopener">Enable
Auto Restart.</a></p>
<p>Click on 'Volume' to continue.</p>
</div>
<div class = "col-xl-4 col-sm-12">
<a href = "../assets/img/server/Synology-Running-Docker-Enable-Auto-Restart.png" data-lightbox = "image-2"><img
src = "../assets/img/server/Synology-Running-Docker-Enable-Auto-Restart.png" class = "img-fluid"
alt = "Synology Running Docker - Enable Auto Restart"/></a>
</div>
</div>
<div class = "row">
<div class = "col-xl-8 col-sm-12">
<p>Here you will mount volumes to folders on the host. This is done to preserve your settings between updates and to grant the
container access to your shared folders.
</p>
<p>Click on 'Port Settings' to continue.</p>
</div>
<div class = "col-xl-4 col-sm-12">
<a href = "../assets/img/server/Synology-Running-Docker-Add-Volumes.png" data-lightbox = "image-2"><img
src = "../assets/img/server/Synology-Running-Docker-Add-Volumes.png" class = "img-fluid"
alt = "Synology Running Docker - Add Volumes"/></a>
</div>
</div>
<div class = "row">
<div class = "col-xl-8 col-sm-12">
<p>Bind Local TCP Port 8111 to Container TCP Port 8111.</p>
</div>
<div class = "col-xl-4 col-sm-12">
<a href = "../assets/img/server/Synology-Running-Docker-Bind-Ports.png" data-lightbox = "image-2"><img
src = "../assets/img/server/Synology-Running-Docker-Bind-Ports.png" class = "img-fluid"
alt = "Synology Running Docker - Bind Ports"/></a>
</div>
</div>
<div class = "row">
<div class = "col-xl-8 col-sm-12">
<p>Click Next to review your settings.</p>
</div>
<div class = "col-xl-4 col-sm-12">
<a href = "../assets/img/server/Synology-Running-Docker-Review-Container-Settings.png" data-lightbox = "image-2"><img
src = "../assets/img/server/Synology-Running-Docker-Review-Container-Settings.png" class = "img-fluid"
alt = "Synology Running Docker - Review Container Settings"/></a>
</div>
</div>
<div class = "row">
<div class = "col-xl-8 col-sm-12">
<p>Review your settings and, if everything is correct, click Apply.</p>
</div>
<div class = "col-xl-4 col-sm-12">
<a href = "../assets/img/server/Synology-Running-Docker-Create-Container.png" data-lightbox = "image-2"><img
src = "../assets/img/server/Synology-Running-Docker-Create-Container.png" class = "img-fluid"
alt = "Synology Running Docker - Create Container"/></a>
</div>
</div>
<div class = "row">
<div class = "col-xl-8 col-sm-12">
<p>Click on container to view your newly created Shoko Server.</p>
</div>
<div class = "col-xl-4 col-sm-12">
<a href = "../assets/img/server/Synology-Running-Docker-View-Containers.png" data-lightbox = "image-2"><img
src = "../assets/img/server/Synology-Running-Docker-View-Containers.png" class = "img-fluid"
alt = "Synology Running Docker - View Containers"/></a>
</div>
</div>
</div>
</div>
</section>
<section>
<h2 id = "manage-shoko-docker">Managing Shoko Docker</h2>
<nav class = "nav nav-tabs" id = "tab3" role = "tablist">
<a class = "nav-item nav-link active" id = "nav-manage-linux" data-toggle = "tab" href = "#manage-linux" role = "tab"
aria-controls = "nav-home" aria-selected = "true">Linux</a>
<a class = "nav-item nav-link" id = "nav-manage-synology" data-toggle = "tab" href = "#manage-synology" role = "tab"
aria-controls = "nav-profile" aria-selected = "false">Synology NAS</a>
</nav>
<div class = "tab-content p-4">
<div class = "tab-pane fade show active" id = "manage-linux" role = "tabpanel" aria-labelledby = "linux-tab">
<h4 id = "docker-compose">Docker Compose</h4>
<p>To make management easier, we can combine all the previous items in a docker compose file.</p>
<p>In order to make this work, install <strong>docker-compose</strong>, a guide how to can be found <a
href = "https://docs.docker.com/compose/install/" target = "_blank" rel = "noopener">here</a> on the Docker website. Once
docker-compose is installed create a docker-compose.yml file anywhere on your system. Open the file and put the following inside.
</p>
<pre><code class = "language-bash">version: "3"
services:
Shoko Server:
container_name: shokoserver
image: cazzar/shokoserver
restart: always
ports:
- "8111:8111/tcp"
volumes:
- "/path/to/config:/home/shoko/.shoko"
- "/path/to/anime:/anime"
- "/path/to/import:/import"</code></pre>
<p>This combines all of our previous configuration in an easy to read and edit format, and will allow you to create a powerful
startup script that could (for example) include a MySQL server, a download client, and anything else you can think off
that's available in a docker format.
</p>
</div>
<div class = "tab-pane fade" id = "manage-synology" role = "tabpanel" aria-labelledby = "synology-tab">
<div class = "row">
<div class = "col-xl-8 col-sm-12">
<p>While viewing the Docker panel in the Synology web interface, click on container to view the running containers.</p>
<p>If everything was set up correctly, Shoko Server should be automatically running and the details button will become
available. Select the container and then Push the details button.
</p>
</div>
<div class = "col-xl-4 col-sm-12">
<a href = "../assets/img/server/Synology-Manage-Docker-View-Details.png" data-lightbox = "image-2"><img
src = "../assets/img/server/Synology-Manage-Docker-View-Details.png" class = "img-fluid"
alt = "Synology Manage Docker - View Details"/></a>
</div>
</div>
<div class = "row">
<div class = "col-xl-8 col-sm-12">
<p>Here you can view and verify the Port settings and volume settings, as well as other information.</p>
<div class = "alert alert-primary" role = "alert">
<h4 class = "alert-heading">Note</h4>
<p>Please take a moment to check out the 'MONO_VERSION' enviroment variable. When requesting support, please mention the
'MONO_VERSION' you are using.
</p>
</div>
<p>Press the Terminal tab to continue.</p>
</div>
<div class = "col-xl-4 col-sm-12">
<a href = "../assets/img/server/Synology-Manage-Docker-Details-Overview.png" data-lightbox = "image-2"><img
src = "../assets/img/server/Synology-Manage-Docker-Details-Overview.png" class = "img-fluid"
alt = "Synology Manage Docker - Details Overview"/></a>
</div>
</div>
<div class = "row">
<div class = "col-xl-8 col-sm-12">
<p>The terminal view gives you the output of the Shoko Server session. It is a useful aid in quickly determining if there is an
issue.
</p>
<div class = "alert alert-primary" role = "alert">
<h4 class = "alert-heading">Note</h4>
<p>The terminal view displays work being performed by the Shoko Server in real time. However, the web interface may not be able
to handle the amount of information being displayed at once. In addition, there is no way to pause the display and the
terminal window does not scroll. It is a useful tool to check the status of your server without webui - but for detailed
logging information, please see the logs located in Shoko's log folder.
</p>
</div>
</div>
<div class = "col-xl-4 col-sm-12">
<a href = "../assets/img/server/Synology-Manage-Docker-Terminal.png" data-lightbox = "image-2"><img
src = "../assets/img/server/Synology-Manage-Docker-Terminal.png" class = "img-fluid"
alt = "Synology Manage Docker - Terminal"/></a>
</div>
</div>
</div>
</div>
</section>
<section>
<h2 id = "advanced-settings">Advanced Settings</h2>
<p>Running shoko via docker has some additional features / options that might be useful some users.</p>
<h4 id = "uid-gid">UID / GID</h4>
<p>In order to run the docker as a specific UID / GID you can specify it in the environment variables.</p>
<p>By default shoko runs with UserID 1000 and GroupID 100.</p>
<table class = "table table-bordered">
<thead>
<tr>
<th>Command</th>
<th>Purpose</th>
</tr>
</thead>
<tbody>
<tr>
<td>
<pre><code class = "language-bash">-e PUID=xxx -e PGID=xxx</code></pre>
</td>
<td>
<p><a href = "https://docs.docker.com/compose/environment-variables/" target = "_blank" rel = "noopener">Set Environment
Variables.</a></p>
<p>To make docker run as a certain user/group you can define this through the ENV variables.</p>
<p>This makes working with permissions a lot easier since you can match your docker with the local accounts on your machine without
doing much work
</p>
<p>If you getting errors with Denied folder access then the wrong PUID and PGID could be the cause.</p>
<p>PGID 101 should be your admin group.</p>
<p>To find the PUID on any user, login with said user with SSH or Telnet with <a href = "https://www.putty.org/" target = "_blank"
rel = "noopener">Putty</a> or something similar with the <code class = "language-bash">ID</code> command.
</p>
</td>
</tr>
</tbody>
</table>
</section>
<section>
<h4 id = "create-config">Creating settings.json</h4>
<p>The default settings.json is stored within the image. When Shoko Server for Linux is started for the first time, it checks for the
presence of settings.json and if it does not exist, then it copies the one from the image.
</p>
<p>If at any time you need to reset the configuration back to the default settings, shut down Shoko Server for Linux and delete the
settings.json file.
</p>
<p>To create the settings.json file, start Shoko Server for Linux.</p>
<table class = "table table-bordered">
<thead>
<tr>
<th>Default Setting</th>
<th>Options</th>
<th>Notes</th>
</tr>
</thead>
<tbody>
<tr>
<td>/home/shoko/.shoko/Shoko.CLI/settings.json</td>
<td>Volume can be mounted to relocate files.</td>
<td>Default Location for settings.json<br>Please note that this is the location as seen within the container.<br>Depending on your
installation, the actual location for settings.json may be in an alternate location.
</td>
</tbody>
</table>
</section>
<section>
<h4 id = "modify-settings">Modify settings.json</h4>
<p>Since Shoko Server for Linux runs without a graphical interface configurations must be made to the configuration file directly.
Please note that the configurations shown below are the minimum required configurations needed to start the server. Not all
configurable options are defined below. The default settings.json is stored within the image. When Shoko Server for Linux is started
for the first time, it checks for the presence of settings.json. If it does not exist, it will copy the default one from the image.
If at any time you need to reset the configuration back to the default settings, shut down Shoko Server for Linux and delete the
settings.json file. To create the settings.json file, start Shoko Server for Linux.
</p>
<div class = "alert alert-primary" role = "alert">
<h4 class = "alert-heading">Concerning MySQL and SQL Server</h4>
<p>Previously, Shoko did support both MySQL and SQL Server as possible database options due to an issue regarding some issues when
using SQLite with a large collection. Starting with <strong>Version 3.6</strong>, we've been steadily making improvements to
address this issue that the benefits once provided by MySQL and SQL Server are negligible. To that end support for MySQL and SQL
Server as a database option has been deprecated.
</p>
<p>Users who are currently using either MySQL or SQL Server can still edit their database information by directly editing <strong>settings.json</strong>
located in the configuration folder defined in the docker run command.
</p>
</div>
<table class = "table table-bordered">
<thead>
<tr>
<th>Default Setting</th>
<th>Options</th>
<th>Notes</th>
</tr>
</thead>
<tbody>
<tr>
<td>"DatabaseType": "SQLite",</td>
<td>"SQLite", "SQLServer", "MySQL"</td>
<td>By default it should be <strong>SQLite</strong>.</td>
</tr>
<tr>
<td>"SQLServer_DatabaseServer": "localhost",</td>
<td>"localhost", "xxx.xxx.xxx.xxx"</td>
<td>SQLServer ONLY: This is the IP Address of the SQL Server</td>
</tr>
<tr>
<td>"SQLServer_DatabaseName": "",</td>
<td>"Shoko Server", "my_existing_name"</td>
<td>SQLServer ONLY: This is the name of the SQL Server Database. If the database does not exist then it will be created.
</td>
</tr>
<tr>
<td>"SQLServer_Username": "",</td>
<td>"sa","my_existing_username"</td>
<td>SQLServer ONLY: This is username for the SQL Server Database.</td>
</tr>
<tr>
<td>"SQLServer_Password": "",</td>
<td>"my_sql_password"</td>
<td>SQLServer ONLY: This is the password for the user account above, to be used for the SQL Server Database.
</td>
</tr>
<tr>
<td>"MySQL_Hostname": "localhost",</td>
<td>"localhost", "xxx.xxx.xxx.xxx"</td>
<td>MySQL ONLY: This is the IP Address of the MySQL Server</td>
</tr>
<tr>
<td>"MySQL_SchemaName": "",</td>
<td>"Shoko Server", "my_existing_name"</td>
<td>MySQL ONLY: This is the name of the MySQL Server Schema. If the schema does not exist then it will be created.
</td>
</tr>
<tr>
<td>"MySQL_Username": "",</td>
<td>"root","my_existing_username"</td>
<td>MySQL ONLY: This is the username for the MySQL Server Database.</td>
</tr>
<tr>
<td>"MySQL_Password": "",</td>
<td>"my_mysql_password"</td>
<td>MySQL ONLY: This is the password for the user account above, to be used for the MySQL Server Database.
</td>
</tr>
<tr>
<td>"AniDB_Username": "",</td>
<td>"","my_AniDB_Username"</td>
<td>OPTIONAL: This is your AniDB username. It is recommended to add your username if you are using an existing database.
</td>
</tr>
<tr>
<td>"AniDB_Password": "",</td>
<td>"","my_AniDB_Password"</td>
<td>OPTIONAL: This is your AniDB password. It is recommended to add your username if you are using an existing database.
</td>
</tr>
</tbody>
</table>
</section>
{% include _github_callout.html %}
</article>
</div>
<div class = "col-md-2 col-xl-2 right-sidebar">
<hr class = "d-md-none">
<aside class = "sidebar sidebar-sticky">
<nav class = "nav nav-toc-2 mt-3" data-accordion = "true">
<a class = "nav-link sidenav-title">Getting Started</a>
<a class = "nav-link" href = "#installing-docker">Installing Docker</a>
<a class = "nav-link" href = "#running-shoko-docker">Running Shoko Server</a>
<a class = "nav-link" href = "#manage-shoko-docker">Managing Shoko Docker</a>
<a class = "nav-link sidenav-title">Advanced Settings</a>
<a class = "nav-link" href = "#uid-gid">UID / PGID</a>
<a class = "nav-link" href = "#create-config">Creating settings.json</a>
<a class = "nav-link" href = "#modify-settings">Modify settings.json</a>
</nav>
</aside>
</div>
</div>
</div>
</main>