Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Guide for Synology #5

Open
Wgsem opened this issue Dec 27, 2021 · 22 comments
Open

Guide for Synology #5

Wgsem opened this issue Dec 27, 2021 · 22 comments

Comments

@Wgsem
Copy link

Wgsem commented Dec 27, 2021

Could it be possible to provide a step-by-step guide on how to get this running in Docker on Synology.

I downloaded the image but I can't get it to work, because of my habbit of messing this up I've learned to ask now. I've searched the web but I can't find a guide, that's why I'm creating this issue.

@jlesage
Copy link
Owner

jlesage commented Jan 1, 2022

It's hard for me to provide a step-by-step guide since I don't have a Synology myself. But it should not be hard to setup. You can share what you have done and I can help to provide what you are missing.

@rubenvarela
Copy link

I can help with this, but first I have an issue.

I tried it on my laptop under macOS machine and it works fine, but on Synology I'm seeing that /storage is owned by root and permissions are set to 700. This means that the app user can't see it. On macOS the permissions are set to 755

/config is setup correctly.

@jlesage would you have any insight into what I could check to debug this?

@mdovero
Copy link

mdovero commented Feb 18, 2022

Hello!
Same issue for me.
My run command is :

sudo docker run -d --name=czkawka -p 5800:5800 -v /volume1/Famille:/storage:rw -v /tmp/pipo:/config:rw --env USER_ID=1026 --env GROUP_ID=100 jlesage/czkawka
($HOME usage cannot solve the problem)

In a bash acces with a root user /storage is ok but app user cannot read it because /storage are set to 700.
--env SUP_GROUP_IDS=0 in a command line change nothing.

If i can help to solve the issue it's pleasure.

Thanks

@jlesage
Copy link
Owner

jlesage commented Feb 23, 2022

You probably need to adjust the USER_ID and GROUP_ID environment variables.

You can check ownership on the host side, i.e. on Synology itself.

If we take the example of @mdovero, what ls -ld /volume1/Famille is showing ?

@mdovero
Copy link

mdovero commented Feb 23, 2022 via email

@rubenvarela
Copy link

@mdovero
What ended up working for me was

  1. Not using a share as a volume mount.
  2. Share individual folders in the share.
  3. On DSM, on each folder
    • right click
    • go to Properties
    • under the General tab
    • go to Owner on the bottom
    • Select the user from which you copied the UID and GID from
    • check the option "Apply to this folder, sub-folders and files"

Could you try this?

@mdovero
Copy link

mdovero commented Feb 23, 2022 via email

@rubenvarela
Copy link

@mdovero screenshots are not coming through

@jlesage
Copy link
Owner

jlesage commented Feb 23, 2022

@mdovero yes I'm from Quebec, living near Montreal :)

Your USER_ID and GROUP_ID variables looks good. What you didn't mention is how you mapped your folders to the container. As @rubenvarela pointed, you cannot map /volume1 directory to the container. You need to map individual shares.

@mdovero
Copy link

mdovero commented Feb 24, 2022 via email

@jlesage
Copy link
Owner

jlesage commented Feb 24, 2022

Yeah mapping /storage to /volume1 is not a good idea. It would work at first, but/storage will eventually become empty from the point of view of the container. So you are better to do mappings like that:

/volume1/Famille -> /storage/Famille
...

Or create and edit the container via the Synology UI. This way you are sure to never do anything "illegal".

@Praneet-Srivastav
Copy link

Here is the step by step guide for Synology
1- Installed Docker pkg from package center
2- Create a shared folder called docker if its already not there.
3- In the docker folder create a folder called "czkawka"
4- Inside czkawka folder .. create another folder called "config"
5- Make sure all folder names are not in small letters (no CAPS)
6- Go to Control Panel / Task Scheduler / Create / Scheduled Task / User-defined script.
7- General: In the Task field type in “Install czkawka“. Uncheck the “Enabled” option and select your current NAS user from the drop-down menu.
8- Schedule: Select Run on the following date then select “Do not repeat“.
9- Copy paste the code below in the Run command area. After that click OK.
(Update the USER_ID, GROUP_ID as per NAS User selected above in step 7 and your photo location accordingly )

docker run -d \
    --name=czkawka \
    -p 5800:5800 \
    -e USER_ID=**1026** \
    -e GROUP_ID=**101** \
    -v /volume1/docker/czkawka/config:/config:rw \
    -v **<relplace here your photos folder location>**:/storage/photos:rw \
    jlesage/czkawka

10- Select your “Install czkawka” Task then click the “Run” tab. You will be asked to run Install czkawka – click Yes.
11- If everything was setup properly you can access it by Open your browser and type in http://Synology-ip-address:5800/

@benoittgt
Copy link

Hello
The issue for me was that the GID provided by id command was wrong.

From https://community.synology.com/enu/forum/1/post/152255

I fixed it by set PGID to 101 rather than 100.
101 means admin and 100 means user.

@somnath427
Copy link

can you help me in installing czkwaka deduplication in container. I am unable to setup the mount folder even with the wizard as well as with user defined script command. I am missing something. It is asking for permission denied. 

uid=1026(SOM-ADMIN) gid=100(users) groups=100(users),101(administrators)
Error is >>> docker: Got permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock: Post "http://%2Fvar%2Frun%2Fdocker.sock/v1.24/containers/create?name=czkawka": dial unix /var/run/docker.sock: connect: permission denied.
See 'docker run --help'.

I want to mount the home photos folder to remove similar iamges with duplicate ones.

docker run -d
--name=czkawka
-p 5800:5800
-e USER_ID=1026
-e GROUP_ID=101
-v /docker/czkawka/config:/config:rw
-v /home/gg:/storage:rw
jlesage/czkawka

@jlesage
Copy link
Owner

jlesage commented Oct 12, 2023

Looks like you need to run the docker command with sudo: sudo docker run ....

@Pinki0529
Copy link

Pinki0529 commented May 28, 2024

Docker Compose for Portainer

version: '3.9'
services:
    czkawka:
        image: jlesage/czkawka
        volumes:
            - "/volume1/photo:/storage/photos"
            - "/volume1/docker/czkawka:/config:rw"
        ports:
            - 5800:5800
        container_name: czkawka
        environment:
            LANG: pl_PL # or fr_FR or en_US
            USER_ID: 1026
            GROUP_ID: 101
            TZ: Europ/Warsaw
            DARK_MODE: 1
        restart: on-failure:5

Make sure to adjust according to your needs.

@vixius
Copy link

vixius commented Jun 22, 2024

Here is the step by step guide for Synology 1- Installed Docker pkg from package center 2- Create a shared folder called docker if its already not there. 3- In the docker folder create a folder called "czkawka" 4- Inside czkawka folder .. create another folder called "config" 5- Make sure all folder names are not in small letters (no CAPS) 6- Go to Control Panel / Task Scheduler / Create / Scheduled Task / User-defined script. 7- General: In the Task field type in “Install czkawka“. Uncheck the “Enabled” option and select your current NAS user from the drop-down menu. 8- Schedule: Select Run on the following date then select “Do not repeat“. 9- Copy paste the code below in the Run command area. After that click OK. (Update the USER_ID, GROUP_ID as per NAS User selected above in step 7 and your photo location accordingly )

docker run -d \
    --name=czkawka \
    -p 5800:5800 \
    -e USER_ID=**1026** \
    -e GROUP_ID=**101** \
    -v /volume1/docker/czkawka/config:/config:rw \
    -v **<relplace here your photos folder location>**:/storage/photos:rw \
    jlesage/czkawka

10- Select your “Install czkawka” Task then click the “Run” tab. You will be asked to run Install czkawka – click Yes. 11- If everything was setup properly you can access it by Open your browser and type in http://Synology-ip-address:5800/

Hi there,

I'm trying to make it work following your step but no way. Installed docker in registry (container manager)
following your step

docker run -d
--name=czkawka
-p 5800:5800
-e USER_ID=1026
-e GROUP_ID=101
-v /volume1/docker/czkawka/config:/config:rw
-v </volume1/homes/Vix/Photos>:/storage/photos:rw
jlesage/czkawka

no idea where I make a mistake.

Could you help me

@jlesage
Copy link
Owner

jlesage commented Jun 25, 2024

Make sure to use /volume1/homes/Vix/Photos, not </volume1/homes/Vix/Photos> (invalid path).

@somnath427
Copy link

somnath427 commented Jun 25, 2024 via email

@Pinki0529
Copy link

#5 (comment)

@Pinki0529
Copy link

https://mariushosting.com/synology-find-uid-userid-and-gid-groupid-in-5-seconds/

@vixius
Copy link

vixius commented Jan 1, 2025

someone knows why it ask me credential? Don0t remember to did set a password to access.

Any Ideas?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

9 participants