xthursdayx 44 Posted September 26, 2019 Share Posted September 26, 2019 (edited) Application Name: Ferdi-server Application Site: https://github.com/getferdi/server Docker Hub: https://hub.docker.com/r/getferdi/ferdi-server Github: https://github.com/getferdi/server-docker Ferdi is a hard-fork of Franz, a messaging app for WhatsApp, Slack, Telegram, HipChat, Hangouts and many many more. Ferdi-server is an unofficial replacement of the Franz server for use with the Ferdi Client. This is a docker image of Ferdi-server running on Alpine Linux and Node.js (v10.16.3). Configuration After the first run, Ferdi-server's configuration is saved inside the `config.txt` file inside your persistent data directory (`/config` in the container). <port>:80 - will map the container's port 80 to a port on the host, default is 3333 <path to data>:/config - this will store persistent data on the host machine in your appdata folder. <path to database>:/usr/src/app/database - this will be where your database is stored. I recommend a directory below your appdata ferdi-server directory. If you use a cache drive that would be /mnt/cache/appdata/ferdi-server/database. <path to recipes>:/usr/src/app/recipes - this will be where your custom recipes are stored. I recommend a directory below your appdata ferdi-server directory. If you use a cache drive that would be /mnt/cache/appdata/ferdi-server/recipes. NODE_ENV - for specifying Node environment, production or development, default is development. DB_CONNECTION - for specifying the database being used, default is sqlite. DB_HOST - for specifying the database host, default is 127.0.0.1 DB_PORT - for specifying the database port, default is 3306 DB_USER - for specifying the database user, default is root DB_PASSWORD - for specifying the database password, default is empty. DB_DATABASE - for specifying the database to be used, adonis. IS_CREATION_ENABLED - for specifying whether to enable the creation of custom recipes, default is true. CONNECT_WITH_FRANZ - for specifying whether to enable connections to the Franz server, default is true. By enabling the `CONNECT_WITH_FRANZ` option, Ferdi-server can: - Show the full Franz recipe library instead of only custom recipes - Import Franz accounts NGINX Config Block To access Ferdi-server from outside of your home network on a subdomain use this server block: # Ferdi-server server { listen 443 ssl http2; server_name ferdi.my.website; # all ssl related config moved to ssl.conf include /config/nginx/ssl.conf; location / { proxy_pass http://<SERVERIP>:3333; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header Host $host; proxy_set_header X-Forwarded-Proto $scheme; } } Importing your Franz account Ferdi-server allows you to import your full Franz account, including all its settings. To import your Franz account, open `http://[YOUR FERDI-SERVER]/import` in your browser and login using your Franz account details. Ferdi-server will create a new user with the same credentials and copy your Franz settings, services and workspaces. Edited March 10, 2020 by xthursdayx Updated database and recipes directory recommendations. 1 Quote Link to post
DrAg0n141 0 Posted October 9, 2019 Share Posted October 9, 2019 Hi, is it possible to lock the account creation? Now can everyone create accounts on my Ferdi server. Quote Link to post
xthursdayx 44 Posted October 9, 2019 Author Share Posted October 9, 2019 (edited) 3 hours ago, DrAg0n141 said: Hi, is it possible to lock the account creation? Now can everyone create accounts on my Ferdi server. Yes, absolutely. Just edit your container in unRAID Docker and change the ENV setting IS_CREATION_ENABLED to false and then apply. Edited October 9, 2019 by xthursdayx 1 Quote Link to post
sebstrgg 0 Posted October 18, 2019 Share Posted October 18, 2019 Hi, I've just tried to setup this docker container, which seems to fail based on the user permissions for NPM. npm ERR! code EUIDLOOKUP npm ERR! lifecycle could not get uid/gid npm ERR! lifecycle [ 'nobody', 0 ] npm ERR! lifecycle I've tried to set the container variables for PUID/PGID to 99/100 without any luck. Any suggestions on how to proceed? Thanks, Sebastian Quote Link to post
xthursdayx 44 Posted October 18, 2019 Author Share Posted October 18, 2019 Hi Sebastian. Please see this conversation: https://github.com/xthursdayx/ferdi-server-docker/issues/4 Are you using the default template from my unRAID templates repo? If so, you shouldn't have to add the PUID/PGID variables for it to work. This is what my template looks like: Can you try deleting your appdata folder and the container/image and then reinstall with these variables (set to correct settings for your server) and report back? Quote Link to post
sebstrgg 0 Posted October 18, 2019 Share Posted October 18, 2019 (edited) 1 hour ago, xthursdayx said: Hi Sebastian. Please see this conversation: https://github.com/xthursdayx/ferdi-server-docker/issues/4 Are you using the default template from my unRAID templates repo? If so, you shouldn't have to add the PUID/PGID variables for it to work. This is what my template looks like: Can you try deleting your appdata folder and the container/image and then reinstall with these variables (set to correct settings for your server) and report back? Hi again, My setup is identical to yours, except for the IS_CREATION_ENABLED and CONNECT_WITH_FRANZ variables set to true. The reason I did try to add PUID/PGID was only due to the error message I ended up with and I've already fully removed the container, appdata-folder and re-added the container. I could try it again if you believe it would make any difference. Run log (with modified PUID/PGID): https://wl7r.me/TIMnQA Run log (as per standard container setup): https://wl7r.me/iRCmDH Screenshot of container settings: https://wl7r.me/uLT2ou EDIT: So I did it again, I removed the container + image and deleted the appdata-folder agian. I just changed the DB string to correspond with my DB-server. New run log: https://wl7r.me/nkFjoD I don't know if its relevant, but I do run Unraid v6.8.0 rc1, which have a newer docker version. EDIT2: I retried the recreation of the container as I noticed the search path for /config was "/mnt/user/appdata" instead of "/mnt/cache/appdata" like on the the /recipes and /database. No change in the error type though. EDIT3: Same error when changing search path for /config, /recipes, /database to "/mnt/user/appdata" in the beginning of the path. EDIT4: I use your container that is provided in the Unraid CA repo (https://wl7r.me/EJaMD4) Edited October 18, 2019 by sebstrgg Quote Link to post
xthursdayx 44 Posted October 18, 2019 Author Share Posted October 18, 2019 Okay, thanks for the detailed information. This seems to align with the issue reported on Github. I will look into this in more detail and report back. Quote Link to post
xthursdayx 44 Posted October 19, 2019 Author Share Posted October 19, 2019 (edited) It looks like this issue is related to running Node in Docker with the version of NPM that was being installed in this container. With NPM:6 in Docker, UID/GID lookup works on some hosts and not on others. I believe that this has been resolved in later versions of NPM. See: https://github.com/npm/uid-number/issues/7 I have updated the version of NPM used in the container and have also changed the way S6 initializes the application to ensure that it is running with the correct UID/GID. @sebstrgg please remove the container + image and appdata folder and try creating/running it again (without adding the PUID/PGID variables) and report back. I think it will work now (hopefully...). Thanks. Edited October 19, 2019 by xthursdayx Quote Link to post
ICDeadPpl 25 Posted October 19, 2019 Share Posted October 19, 2019 You should edit the template to have the "<Volume type=“appdata”>", so that the volume mapping respects the user's choice of location for appdata: So this: <Data> <Volume> <HostDir>/mnt/cache/appdata/ferdi-server/recipes</HostDir> <ContainerDir>/usr/src/app/recipes</ContainerDir> <Mode>rw</Mode> </Volume> <Volume> <HostDir>/mnt/cache/appdata/ferdi-server</HostDir> <ContainerDir>/config</ContainerDir> <Mode>rw</Mode> </Volume> <Volume> <HostDir>/mnt/cache/appdata/ferdi-server/database</HostDir> <ContainerDir>/usr/src/app/database</ContainerDir> <Mode>rw</Mode> </Volume> <Data> would loook like this: <Data> <Volume type=“appdata”> <HostDir>/mnt/cache/appdata/ferdi-server/recipes</HostDir> <ContainerDir>/usr/src/app/recipes</ContainerDir> <Mode>rw</Mode> </Volume> <Volume type=“appdata”> <HostDir>/mnt/cache/appdata/ferdi-server</HostDir> <ContainerDir>/config</ContainerDir> <Mode>rw</Mode> </Volume> <Volume type=“appdata”> <HostDir>/mnt/cache/appdata/ferdi-server/database</HostDir> <ContainerDir>/usr/src/app/database</ContainerDir> <Mode>rw</Mode> </Volume> <Data> Quote Link to post
Squid 3171 Posted October 19, 2019 Share Posted October 19, 2019 59 minutes ago, ICDeadPpl said: You should edit the template to have the "<Volume type=“appdata”>", so that the volume mapping respects the user's choice of location for appdata: That doesn't actually work. (Note also that the Volume section of the xml is completely ignored, and the system looks at the Config section instead) The way that the system does work is that any container path of /config is automatically remapped over to the user's appdata. Either way, the real problem here is that the default mapping for recipes and database explicitly references /mnt/cache/... instead of /mnt/user/... Not a problem if the user has a cache drive, but since many don't this would wind up getting created into RAM which would then cause some weird issues with unRaid. Quote Link to post
xthursdayx 44 Posted October 19, 2019 Author Share Posted October 19, 2019 7 hours ago, Squid said: Either way, the real problem here is that the default mapping for recipes and database explicitly references /mnt/cache/... instead of /mnt/user/... Not a problem if the user has a cache drive, but since many don't this would wind up getting created into RAM which would then cause some weird issues with unRaid Right, I always mistakenly assume that everyone uses cache drives. Which would be a better solution, updating the template so that recipes and database referent /mnt/user/appdata/... or just leaving host directory location empty in the template so that people can just choose whatever they want? Quote Link to post
Squid 3171 Posted October 19, 2019 Share Posted October 19, 2019 8 minutes ago, xthursdayx said: empty Otherwise, you *may* wind up in a situation where you have /mnt/user/appdata, but the user uses a share "AppData" I would set it as a required field. Quote Link to post
xthursdayx 44 Posted October 19, 2019 Author Share Posted October 19, 2019 2 hours ago, Squid said: I would set it as a required field. Cool, thanks for the guidance. I've updated the template in my Github repo. Do I need to do anything else to update the listing in CA? Quote Link to post
sebstrgg 0 Posted October 19, 2019 Share Posted October 19, 2019 (edited) 17 hours ago, xthursdayx said: It looks like this issue is related to running Node in Docker with the version of NPM that was being installed in this container. With NPM:6 in Docker, UID/GID lookup works on some hosts and not on others. I believe that this has been resolved in later versions of NPM. See: https://github.com/npm/uid-number/issues/7 I have updated the version of NPM used in the container and have also changed the way S6 initializes the application to ensure that it is running with the correct UID/GID. @sebstrgg please remove the container + image and appdata folder and try creating/running it again (without adding the PUID/PGID variables) and report back. I think it will work now (hopefully...). Thanks. Ok, so I just re-did the procedure and ended up with the same error as before, but now with an additional error. Full Run log: https://wl7r.me/KIBh8R (This was tested just now, after your second update if I understood the previous posts correctly) Edited October 19, 2019 by sebstrgg Quote Link to post
xthursdayx 44 Posted October 19, 2019 Author Share Posted October 19, 2019 46 minutes ago, sebstrgg said: Ok, so I just re-did the procedure and ended up with the same error as before, but now with an additional error. Crap, okay. I'll keep working on it and report back. Quote Link to post
xthursdayx 44 Posted October 20, 2019 Author Share Posted October 20, 2019 @sebstrgg would you mind trying it again now with the updated image? Sorry to keep asking you to try it out, but unfortunately I am unable to reproduce this issue on either my workstation or server. Thanks. Quote Link to post
xthursdayx 44 Posted October 22, 2019 Author Share Posted October 22, 2019 @sebstrgg Just to update this, I've heard from someone else who was having the same problem you were that the problem has been fixed. Quote Link to post
sebstrgg 0 Posted October 22, 2019 Share Posted October 22, 2019 3 hours ago, xthursdayx said: @sebstrgg Just to update this, I've heard from someone else who was having the same problem you were that the problem has been fixed. On 10/20/2019 at 10:46 AM, xthursdayx said: @sebstrgg would you mind trying it again now with the updated image? Sorry to keep asking you to try it out, but unfortunately I am unable to reproduce this issue on either my workstation or server. Thanks. Not a problem at all! I'm happy to help You're perfectly right (or rather the other user) and the inital problems with the containers is officially fixed! I got it working right away! Thank you! Quote Link to post
xthursdayx 44 Posted October 23, 2019 Author Share Posted October 23, 2019 9 hours ago, sebstrgg said: You're perfectly right (or rather the other user) and the inital problems with the containers is officially fixed! I got it working right away! Great! I’m glad to hear it! Quote Link to post
zichichi 2 Posted February 9, 2020 Share Posted February 9, 2020 (edited) I have exposed my ferdi server, active on docker, on the internet and I would like to disable the registration of new users. I tried to set the IS_CREATION_ENABLED = false and CONNECT_WITH_FRANZ=false but I can create new users Edited February 9, 2020 by zichichi Quote Link to post
TheDon 0 Posted March 9, 2020 Share Posted March 9, 2020 An idea from a novice unraid user, who wast sure what to do at first for the database and recipes blanks. Since you have the appdata autofilled, you should provide some guidance on how to populate the database and recipes blanks. Maybe something in the overview could help? I filled them in as follows, but couldn't use the drop down menu since the folders didn't exist yet. Also you may want to include an update image of the template with the correct blanks filled in the way Squid suggests, which i think ends up like the way below: /mnt/user/appdata/ferdi-server/recipes /mnt/user/appdata/ferdi-server/database So far it looks like it ran and setup correctly. Quote Link to post
xthursdayx 44 Posted March 10, 2020 Author Share Posted March 10, 2020 (edited) 4 hours ago, TheDon said: Also you may want to include an update image of the template with the correct blanks filled in the way Squid suggests Unfortunately, I think you misunderstood Squid's post. In this post Squid suggested that I leave the host directory location empty in the template, so that the user can select whatever location they want, since a default mapping for recipes and database that assumes the user uses a cache drive will create problems if they don't. My template actually does not have the appdata autofilled. As Squid notes, the way unRAID's Docker system works is that any template container path of /config is automatically remapped over to the user's appdata, which is what you see when you load the template. However, I have updated the first post to clarify that the user will have to select their own Database and Recipes directories and provides some guidance for doing so. I use a cache drive, so I use the following locations for my Database and Recipes directories: /mnt/cache/appdata/ferdi-server/database /mnt/cache/appdata/ferdi-server/recipes If you don't use a cache drive, then the folder paths you listed should be correct. Edited March 10, 2020 by xthursdayx 1 Quote Link to post
TheDon 0 Posted March 10, 2020 Share Posted March 10, 2020 1 hour ago, xthursdayx said: If you don't use a cache drive, then the folder paths you listed should be correct. I don't think this is necessarily true, since using the paths i stated, the locations should be on my cache drive in my appdata share, which i confirmed the directories did get created, but are empty ( i have only run the docker startup, so that might be normal if i have yet to import and account or anything like that). My x2 512 nvme cache drives are pooled and contain all my appdata. I don't recall where, but i think i have read that its better to use the file path /mnt/user/sharename rather than /mnt/cache or /mnt/disk? I still may not be understanding Squid's post 100%. Quote Link to post
xthursdayx 44 Posted March 10, 2020 Author Share Posted March 10, 2020 (edited) 2 hours ago, TheDon said: I don't think this is necessarily true, since using the paths i stated, the locations should be on my cache drive in my appdata share, which i confirmed the directories did get created, but are empty ( i have only run the docker startup, so that might be normal if i have yet to import and account or anything like that). My x2 512 nvme cache drives are pooled and contain all my appdata. I don't recall where, but i think i have read that its better to use the file path /mnt/user/sharename rather than /mnt/cache or /mnt/disk? I still may not be understanding Squid's post 100%. Well, a lot depends on how you've set up your appdata user share. Hoewever, if you have your appdata user share set to anything other than cache "only" and mapped the database and recipes directories to /mnt/user/appdata/ferdi-server/recipes and /mnt/user/appdata/ferdi-server/database as you stated then they will write to your array, not your cache drives. You will still see the directories at /mnt/cache/appdata/ferdi-server/recipes and /mnt/user/appdata/ferdi-server/database, because your appdata file structure is mirrored at both /mnt/user and /mnt/cache, but they won't be written into. If you want your recipes and data base to be on your cache drive you'll need to correct your paths to /mnt/cache/appdata/ferdi-server/recipes and /mnt/cache/appdata/ferdi-server/recipes. You will also want to go to your appdata user share and make sure that the setting "Use cache (for new files/directories)" is set to "Only", if you want it to only exist on your cache, or "Prefer" instead, which can help to avoid problems in the event that you run out of cache disk space. You will want to invoke the mover (on the main page) after making this change. If you find there are still things on your array instead of the cache after the mover runs, it might have been that the data was in use at the time. Stop all your docker containers, the docker itself, any vms, and then try running to mover. Based on everything you've written, including the fact that you're a novice user, it might be worthwhile to continue reading up about using docker on unRAID, cache drives, disk shares vs user shares, and user share settings. Some good places to start are here in the unRAID documentation and here and here on the forum). Edited March 10, 2020 by xthursdayx Quote Link to post
57 posts in this topic Last Reply
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.