[GH-ISSUE #129] Question about .env Files #82

Closed
opened 2026-02-27 10:15:38 +03:00 by kerem · 5 comments
Owner

Originally created by @MickLesk on GitHub (Mar 6, 2025).
Original GitHub issue: https://github.com/matze/wastebin/issues/129

Hey,

Im the maintainer of community-scripts.
You have published yesterday the v.3.0.0 😄

We get an Issue with the Script, because you doesnt serve the tar.gz (https://github.com/community-scripts/ProxmoxVE/issues/2881)
Basically, this is not a problem, I have already fixed it quickly. (not pushed yet)

Old:
wget -q https://github.com/matze/wastebin/releases/download/${RELEASE}/wastebin_${RELEASE}x86_64-unknown-linux-musl.tar.zst
tar -xf wastebin
${RELEASE}_x86_64-unknown-linux-musl.tar.zst

New:
wget -q https://github.com/matze/wastebin/releases/download/${RELEASE}/wastebin_${RELEASE}_x86_64-unknown-linux-musl.zip -O $temp_file
unzip -q $temp_file


To my question:
Now I have read that there are now a relatively large variety of .env values. Is there a specific default? Which ones should be defined and is it sufficient to define them in the service with “EnvironmentFile=/opt/wastebin/.env”?

Thanks 4 Feedback! 👍🏻

Originally created by @MickLesk on GitHub (Mar 6, 2025). Original GitHub issue: https://github.com/matze/wastebin/issues/129 Hey, Im the maintainer of community-scripts. You have published yesterday the v.3.0.0 😄 We get an Issue with the Script, because you doesnt serve the tar.gz (https://github.com/community-scripts/ProxmoxVE/issues/2881) Basically, this is not a problem, I have already fixed it quickly. (not pushed yet) **Old:** wget -q https://github.com/matze/wastebin/releases/download/${RELEASE}/wastebin_${RELEASE}_x86_64-unknown-linux-musl.tar.zst tar -xf wastebin_${RELEASE}_x86_64-unknown-linux-musl.tar.zst **New:** wget -q https://github.com/matze/wastebin/releases/download/${RELEASE}/wastebin_${RELEASE}_x86_64-unknown-linux-musl.zip -O $temp_file unzip -q $temp_file ---- To my question: Now I have read that there are now a relatively large variety of .env values. Is there a specific default? Which ones should be defined and is it sufficient to define them in the service with “EnvironmentFile=/opt/wastebin/.env”? Thanks 4 Feedback! 👍🏻
kerem closed this issue 2026-02-27 10:15:38 +03:00
Author
Owner

@matze commented on GitHub (Mar 6, 2025):

Yes, sorry for the change of released artifacts.

Which ones should be defined

To run the software, none of the environment variables have to be defined, they all have some default. However, to persist data you want to set at least WASTEBIN_DATABASE_PATH to some filename otherwise all pastes will be wiped on restart. On top of that you likely want to adjust WASTEBIN_CACHE_SIZE according to system resource availability. Note that the number is in cached items not bytes because bytes cannot be predicted. To let users delete their pastes after a system restart you also want to set the WASTEBIN_SIGNING_KEY to some fixed value and depending on how slow your machine is you might want to bump WASTEBIN_HTTP_TIMEOUT.

<!-- gh-comment-id:2703796195 --> @matze commented on GitHub (Mar 6, 2025): Yes, sorry for the change of released artifacts. > Which ones should be defined To run the software, none of the environment variables _have to_ be defined, they all have some default. However, to persist data you want to set at least `WASTEBIN_DATABASE_PATH` to some filename otherwise all pastes will be wiped on restart. On top of that you likely want to adjust `WASTEBIN_CACHE_SIZE` according to system resource availability. Note that the number is in cached items not bytes because bytes cannot be predicted. To let users delete _their_ pastes after a system restart you also want to set the `WASTEBIN_SIGNING_KEY` to some fixed value and depending on how slow your machine is you might want to bump `WASTEBIN_HTTP_TIMEOUT`.
Author
Owner

@MickLesk commented on GitHub (Mar 6, 2025):

All right, that sounds good.

We use LXC (also designed for weak hardware) with Debian 12 on 1024 MB / 1 core. So no hardcore performance, but enough should still be possible.

What do you think of this basic configuration?
(By the way, is the .db file generated, or do I have to touch it once?

cat <<EOF >/opt/wastebin-data/.env
WASTEBIN_DATABASE_PATH=/opt/wastebin-data/wastebin.db
WASTEBIN_CACHE_SIZE=64
WASTEBIN_HTTP_TIMEOUT=10
WASTEBIN_SIGNING_KEY=$(openssl rand -hex 32)
WASTEBIN_PASTE_EXPIRATIONS=0,600,3600=d,86400,604800,2419200,29030400
EOF
<!-- gh-comment-id:2703816247 --> @MickLesk commented on GitHub (Mar 6, 2025): All right, that sounds good. We use LXC (also designed for weak hardware) with Debian 12 on 1024 MB / 1 core. So no hardcore performance, but enough should still be possible. What do you think of this basic configuration? (By the way, is the .db file generated, or do I have to touch it once? ```env cat <<EOF >/opt/wastebin-data/.env WASTEBIN_DATABASE_PATH=/opt/wastebin-data/wastebin.db WASTEBIN_CACHE_SIZE=64 WASTEBIN_HTTP_TIMEOUT=10 WASTEBIN_SIGNING_KEY=$(openssl rand -hex 32) WASTEBIN_PASTE_EXPIRATIONS=0,600,3600=d,86400,604800,2419200,29030400 EOF ```
Author
Owner

@matze commented on GitHub (Mar 6, 2025):

Note, that wastebin requires very little resources. Right now, https://bin.bloerg.net uses just ~11MB of RSS RAM, so you can definitely bump the cache size to something like 1024 items or so.

<!-- gh-comment-id:2703910478 --> @matze commented on GitHub (Mar 6, 2025): Note, that wastebin requires _very_ little resources. Right now, https://bin.bloerg.net uses just ~11MB of RSS RAM, so you can definitely bump the cache size to something like 1024 items or so.
Author
Owner

@matze commented on GitHub (Mar 6, 2025):

(By the way, is the .db file generated, or do I have to touch it once?

The file is created if it does not exist.

<!-- gh-comment-id:2703912476 --> @matze commented on GitHub (Mar 6, 2025): > (By the way, is the .db file generated, or do I have to touch it once? The file is created if it does not exist.
Author
Owner

@MickLesk commented on GitHub (Mar 6, 2025):

Thx, all fine, Script is updated 😄

<!-- gh-comment-id:2704069733 --> @MickLesk commented on GitHub (Mar 6, 2025): Thx, all fine, Script is updated 😄
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/wastebin-matze#82
No description provided.