SmartPhoneLover Posted February 2, 2022 Share Posted February 2, 2022 (edited) This docker template was created based on an already available docker image GitHub: https://github.com/root-gg/plik DockerHub: https://hub.docker.com/r/rootgg/plik My Repository: https://github.com/SmartPhoneLover/unraid-docker-templates DESCRIPTION Plik is a scalable & friendly temporary file upload system (Wetransfer like) in golang. Features: - Powerful command line client - Easy to use web UI - Multiple data backend: File, OpenStack Swift, S3, Google Cloud Storage - Multiple metadata backend: Sqlite3, PostgreSQL, MySQL - OneShot: Files are destructed after the first download - Stream: Files are streamed from the uploader to the downloader (nothing stored server side) - Removable: Give the ability to the uploader to remove files at any time - TTL: Custom expiration date - Password: Protect upload with login/pasgisword (Auth Basic) - Comments: Add custom message (in Markdown format) - User authentication: Local / Google / OVH - Upload restriction: Source IP / Token - Administrator CLI and web UI - Server side encryption (with S3 data backend) - ShareX Uploader: Directly integrated into ShareX - plikSharp: A .NET API client for Plik - Filelink for Plik: Thunderbird Addon to upload attachments to Plik Live demo: https://plik.root.gg/ Support (Telegram) https://t.me/plik_rootgg (group) https://t.me/plik_root_gg (channel) NOTES • Run the following cmds before building the container: 'mkdir -m777 /mnt/user/appdata/plik', 'curl https://raw.githubusercontent.com/SmartPhoneLover/unraid-docker-templates/main/templates/dependencies/plik/plikd.cfg' --output /mnt/user/appdata/plik/plikd.cfg'. • Plik uses an embbeded database (SQLite) by default, but you can use an external database (MySQL/MariaDB, PostgreSQL) if you like. Check the 'plikd.cfg' file to know more. • Plik has an HTTP API to manage the upload and get files. Check the GitHub repo to know more. VERSION 1.1 (2022-05-22) If you are going to report a bug or request something to be added/modified, please, take into consideration that I will only be able to apply changes for the work I own only. For example, if I create a docker template for an already existing docker image (not created by me), I won't be able to do more for that image than forward your report or request to the owner of the project. Edited May 22, 2022 by SmartPhoneLover Quote Link to comment
deano_southafrican Posted February 2, 2022 Share Posted February 2, 2022 Hey, thanks for this, excited to get it up and running. I'm having trouble unzipping the file... "End-of-central-directory signature not found. Either this file is not a zipfile, or it constitutes one disk of a multi-part archive. In the latter case the central directory and zipfile comment will be found on the last disk(s) of this archive. unzip: cannot find zipfile directory in one of plik_db.zip or plik_db.zip.zip, and cannot find plik_db.zip.ZIP, period." Not sure if the file is corrupt or perhaps an error on my side? Quote Link to comment
SmartPhoneLover Posted February 2, 2022 Author Share Posted February 2, 2022 (edited) Hi @deano_southafrican Very sorry about that. It was my mistake. I forgot to change what was added in the NOTES section here, compared to what I have wrote in the NOTES from the template. Now it's fixed. Please, follow the instructions now and let me know if it works for you. For me, tested and working properly. Edited February 2, 2022 by SmartPhoneLover Quote Link to comment
smaster Posted May 22, 2022 Share Posted May 22, 2022 Hey, Great container, however I'm getting a "Bad Parameter" error when trying to run it. Here is the config I have in unRAID: Thank you. Quote Link to comment
SmartPhoneLover Posted May 22, 2022 Author Share Posted May 22, 2022 @sergio.calheno I couldn't replicate your error, as 'Bad Parameter'. But another error appeared instead: docker: Error response from daemon: failed to create shim: OCI runtime create failed: container_linux.go:380: starting container process caused: process_linux.go:545: container init caused: rootfs_linux.go:75: mounting "/mnt/user/appdata/plik/plikd.cfg" to rootfs at "/home/plik/server/plikd.cfg" caused: mount through procfd: not a directory: unknown: Are you trying to mount a directory onto a file (or vice-versa)? Check if the specified host path exists and is the expected type. This appeared because I forgot to add the last part of the 'curl' cmd in the NOTES section, because the CFG files that contains the configuration of the container was missing (not downloaded), so the container couldn't be started. I already fixed it. Now the NOTES show the correct (full) sets of cmds that need to be executed before building the container. Also, I have updated the CFG file content, because the original one was modified several times (last changes just 5 days ago). Try rebuilding the container again, and let me know if it works for you now. Don't forget to delete all possibles files and dirs that could exist under '/.../appdata/plik/*' before. 1 Quote Link to comment
SmartPhoneLover Posted May 22, 2022 Author Share Posted May 22, 2022 UPDATE v1.1 (2022-05-22) - Fix: The container would not start after building it, because the 'curl' cmd was incomplete. Sorry about that! - Other: Updated the plikd.cfg file with latest changes. - Other: Other minor changes in the template. 1 Quote Link to comment
smaster Posted May 22, 2022 Share Posted May 22, 2022 I can confirm it's now working correctly. Thank you for your quick response and solution, it is much appreciated. Cheers. 1 Quote Link to comment
Kalla Posted October 6, 2022 Share Posted October 6, 2022 Hi all, in my case i get a note 404 page not found . Do you have a hint for me ? Quote Link to comment
DerEchte Posted December 2, 2022 Share Posted December 2, 2022 [12/02/2022 01:15:30][CRITICAL] failed to initialize database, got error unable to open database file: no such file or directory unable to start Plik server : unable to initialize metadata backend : Unable to open database : unable to open database file: no such file or directory 1 Quote Link to comment
mp3 Posted January 11, 2023 Share Posted January 11, 2023 Also seeing the same issue as @DerEchte where the database is failing to initialize. Any update on why this may be happening? Quote Link to comment
Vazelinko Posted January 14, 2023 Share Posted January 14, 2023 (edited) @DerEchte @mp3 not sure if you managed to fix it, but this is what I did. I had the same issue right out of the box, so I tinkered a bit with plikd.cfg. I created a database with mariadb, then edited the Driver value under MetadataBackendConfig section in plikd.cfg from sqlite3 to mysql. I also changed ConnectionString value, according to this here, from /data/plik.db to user:pass@tcp(db_IP:port)/dbname?charset=utf8mb4&parseTime=True&loc=Local. So now it looks like this: [MetadataBackendConfig] Driver = "mysql" ConnectionString = "plik_user:plik_password@tcp(serverIP:3306)/plik_db_name?charset=utf8mb4&parseTime=True&loc=Local" With real values, instead of placeholder ones, of course. However, I stumbled upon another issue once I got Plik up and running. Whenever I tried to upload a file, I got "error 500: unable to save file : unable to create upload directory". I went to check permissions of ./plik/data, and it turns out even though I followed instructions on creating the dir before installing the Plik image, /data didn't have the right permissions. I changed it to 777 and that fixed the issue. In hindsight, incorrect /data permissions were probably what blocked Plik from creating its database, hence the "failed to initialize database" error. Edited January 14, 2023 by Vazelinko Quote Link to comment
nadoteg Posted April 28, 2023 Share Posted April 28, 2023 Kind of new to this, but I had the same problem, noticed there was no plik.db file in the data directory, so I created one and now I have a new error: unable to start Plik server : unable to initialize metadata backend : unable to set wal mode : attempt to write a readonly database Quote Link to comment
nadoteg Posted April 28, 2023 Share Posted April 28, 2023 On 1/14/2023 at 1:06 PM, Vazelinko said: However, I stumbled upon another issue once I got Plik up and running. Whenever I tried to upload a file, I got "error 500: unable to save file : unable to create upload directory". I went to check permissions of ./plik/data, and it turns out even though I followed instructions on creating the dir before installing the Plik image, /data didn't have the right permissions. I changed it to 777 and that fixed the issue. In hindsight, incorrect /data permissions were probably what blocked Plik from creating its database, hence the "failed to initialize database" error. This fixed it for me. Had to look it up but chmod -R 777 /(path to data directory) let me run the docker Thanks @Vazelinko! Quote Link to comment
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.