Skip to content
View in the app

A better way to browse. Learn more.

Unraid

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

[SUPPORT] SmartPhoneLover - Plik

Featured Replies

plik.png

 

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 by SmartPhoneLover

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?

 

  • Author

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 by SmartPhoneLover

  • 3 months later...

Hey,

Great container, however I'm getting a "Bad Parameter" error when trying to run it.

Here is the config I have in unRAID:

 opera_3Q46Crunbl.thumb.png.b583a4b4b192b5e989cd3ce97bc2c996.png

 

Thank you.

  • Author

@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.

  • Author

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.

I can confirm it's now working correctly.

Thank you for your quick response and solution, it is much appreciated.

 

Cheers.

  • 4 months later...

Hi all,

in my case i get a note 404 page not found . Do you have a hint for me ?

  • 1 month later...

[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 month later...

Also seeing the same issue as @DerEchte where the database is failing to initialize. Any update on why this may be happening?  

@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 by Vazelinko

  • 3 months later...

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

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!

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.

Guest
Reply to this topic...

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.