Sign inSign up

davidjosearaujo/onionshare

By davidjosearaujo

•Updated over 2 years ago

onionshare server

Image
Security
Web servers
0

374

davidjosearaujo/onionshare repository overview

⁠OnionShare Docker Image

This Docker image is based on Debian Bookworm and includes the necessary dependencies to run OnionShare CLI for secure and anonymous file sharing over the Tor network. The image installs Tor and OnionShare CLI, allowing you to easily share and receive files through the Tor network.

⁠Key Features:

  • Secure File Sharing: Utilizes OnionShare CLI to share and receive files over Tor, ensuring anonymity and security.
  • Persistent Storage: Maps a local directory to a directory inside the container for storing shared and received files.
  • Customizable Options: Allows optional OnionShare CLI arguments to be passed via the OPTIONS environment variable for flexible usage.
  • Logging: Captures and logs output to /onionshare/stdout.log for monitoring and debugging. (This is where you'll find the URL to the service)

⁠Usage Example:

docker run --rm -it --name onionshare -e OPTIONS="--no-autostop-sharing --public" -v ~/onionshare:/onionshare davidjosearaujo/onionshare

This command runs the OnionShare service with the --no-autostop-sharing and --public options, mapping your local ~/onionshare directory to the container's /onionshare directory.

⁠Important Notes:
  • Security Considerations: Be cautious when adding optional arguments to the OPTIONS environment variable as it may pose a security risk since it allows you to inject shell code.
  • Dependencies: Ensures minimal installation by avoiding unnecessary packages with the --no-install-recommends flag during the package installation.

⁠Dockerfile

FROM debian:bookworm
RUN apt update && \
    apt-get install -yq --no-install-recommends tor python3-pip && \
    pip install --break-system-packages onionshare-cli

ENV OPTIONS=""

VOLUME [ "/onionshare" ]

ENTRYPOINT mkdir onionshare/sent && \
           onionshare-cli ${OPTIONS} -v --data-dir /onionshare/received /onionshare/sent 2>&1 | tee /onionshare/stdout.log

Tag summary

Content type

Image

Digest

sha256:2fa41ee0c…

Size

148.2 MB

Last updated

over 2 years ago

docker pull davidjosearaujo/onionshare