linuxserver / docker-snapdrop Goto Github PK
View Code? Open in Web Editor NEWLicense: GNU General Public License v3.0
License: GNU General Public License v3.0
Hi, from the discord chat i am opening an issue here as requested
"hi, i want to ask for snapdrop it says on the guide "If you intend to expose Snapdrop to the internet, edit /config/nginx/site-confs/default.conf and uncomment the real_ip settings" but when i go to this file, it doesn't have anything with real_ip in it. I run it on ubuntu 22.10 with docker compose on portainer if that matters, is it in another file?"
Kind regards,
George
To isolate the site to local sharing and not internet sharing
Install docker compose
Install portainer
Deploy snapdrop as docker compose
make a domain in NPM and make it FQDN
visit that url from various locations and you will see all devices connected there instead of the local ones
- OS: Ubuntu 22.10 server
- How docker service was installed:
curl -fsSL https://get.docker.com/ -o get-docker.sh
chmod +x get-docker.sh
sh get-docker.sh
x86-64
version: "2.1"
services:
snapdrop:
image: lscr.io/linuxserver/snapdrop:latest
container_name: snapdrop
environment:
- PUID=1000
- PGID=1000
- TZ=Europe/Athens
volumes:
- /opt/snapdrop:/config
restart: unless-stopped
Logo
Home
local
Dashboard
App Templates
Stacks
Containers
Images
Networks
Volumes
Events
Host
Settings
Users
Environments
Registries
Licenses
Authentication logs
Notifications
Settings
©
Portainer Business Edition
2.17.0
Containers>snapdrop>Logs
Container logs
admin
Logs
Search...
Filter search results
Auto refresh
Fetch
All logs
Lines
1000
Show timestamp
Show line numbers
Wrap line
To support LSIO projects visit:
https://www.linuxserver.io/donate/
-------------------------------------
GID/UID
-------------------------------------
User uid: 1000
User gid: 1000
-------------------------------------
Setting resolver to 127.0.0.11
Setting worker_processes to 4
generating self-signed keys in /config/keys, you can replace these with your own keys if required
..........+........+....+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*...........+.....+......+.+...+.....+.+.....+.+......+..+...+.......+...+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*..+.......................+.+..................+..+........................+.........+................+.....+............+....+...+.....+............+....+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
...+.........+..+....+.....+.........+.+.....+...+.+.................+...+....+..+.+............+.................+...+......+.......+...+..+.......+...+..+.+...........+.............+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*...+...+.....+...+...+....+..+...+......+......+...+.......+...+..+.............+......+.....+....+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*....+...+..+...+.+.....+.+..............+.+...+......+...........+....+..+....+...+.................+......+.........+.+.................+..................+....+...+...........+.+........+.......+.....+.........+......+.+.....+............+.+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-----
[custom-init] No custom files found, skipping...
Running the docker container when ipv6 is disabled by the kernel gives: nginx: [emerg] socket() [::]:80 failed (97: Address family not supported by protocol)
.
Specifically ipv6 was disabled by sudo grubby --args=ipv6.disable=1 --update-kernel=ALL
on Fedora 39.
It should work just like when ipv6 is enabled.
sudo grubby --args=ipv6.disable=1 --update-kernel=ALL
on Fedora 39 and in docker daemon via {"ipv6": false}
in /etc/docker/daemon.json
then rebootdocker compose up snapdrop
given the compose file below- OS: Fedora 39
- How docker service was installed: sudo dnf install docker
x86-64
From my docker-compose.yml
:
snapdrop:
image: "lscr.io/linuxserver/snapdrop:latest"
container_name: "snapdrop"
restart: always
ports:
- 1180:80
environment:
- PUID=${SNAPDROP_UID}
- PGID=${SNAPDROP_GID}
- TZ=${USER_TZ}
volumes:
- ${CONFIG}/snapdrop:/config
Where ${CONFIG}/snapdrop
is a valid path on my host system
$ docker compose up snapdrop
[+] Running 1/0
✔ Container snapdrop Created 0.0s
Attaching to snapdrop
snapdrop | [migrations] started
snapdrop | [migrations] 01-nginx-site-confs-default: skipped
snapdrop | [migrations] 02-default-location: skipped
snapdrop | [migrations] done
snapdrop | usermod: no changes
snapdrop | ───────────────────────────────────────
snapdrop |
snapdrop | ██╗ ███████╗██╗ ██████╗
snapdrop | ██║ ██╔════╝██║██╔═══██╗
snapdrop | ██║ ███████╗██║██║ ██║
snapdrop | ██║ ╚════██║██║██║ ██║
snapdrop | ███████╗███████║██║╚██████╔╝
snapdrop | ╚══════╝╚══════╝╚═╝ ╚═════╝
snapdrop |
snapdrop | Brought to you by linuxserver.io
snapdrop | ───────────────────────────────────────
snapdrop |
snapdrop | To support LSIO projects visit:
snapdrop | https://www.linuxserver.io/donate/
snapdrop |
snapdrop | ───────────────────────────────────────
snapdrop | GID/UID
snapdrop | ───────────────────────────────────────
snapdrop |
snapdrop | User UID: 1006
snapdrop | User GID: 1006
snapdrop | ───────────────────────────────────────
snapdrop |
snapdrop | using keys found in /config/keys
snapdrop | [custom-init] No custom files found, skipping...
snapdrop | [ls.io-init] done.
snapdrop | nginx: [emerg] socket() [::]:80 failed (97: Address family not supported by protocol)
snapdrop | Snapdrop is running on port 3000
snapdrop | nginx: [emerg] socket() [::]:80 failed (97: Address family not supported by protocol)
snapdrop | nginx: [emerg] socket() [::]:80 failed (97: Address family not supported by protocol)
snapdrop | nginx: [emerg] socket() [::]:80 failed (97: Address family not supported by protocol)
snapdrop | nginx: [emerg] socket() [::]:80 failed (97: Address family not supported by protocol)
the php-fpm
is up with the container.
drop the php-fpm
service.
---
version: "2.1"
services:
snapdrop:
image: lscr.io/linuxserver/snapdrop:latest
container_name: snapdrop
restart: always
environment:
- PUID=1000
- PGID=1000
- TZ=Etc/UTC
docker compose up -d
docker compose exec snapdrop ps -aux
No response
arm64
---
version: "2.1"
services:
snapdrop:
image: lscr.io/linuxserver/snapdrop:latest
container_name: snapdrop
restart: always
environment:
- PUID=1000
- PGID=1000
- TZ=Etc/UTC
USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND
root 1 0.1 0.0 200 64 ? Ss 06:24 0:00 /package/admi
root 15 0.0 0.0 204 68 ? S 06:24 0:00 s6-supervise
root 17 0.0 0.0 192 4 ? Ss 06:24 0:00 /package/admi
root 38 0.0 0.0 204 68 ? S 06:24 0:00 s6-supervise
root 39 0.0 0.0 204 68 ? S 06:24 0:00 s6-supervise
root 40 0.0 0.0 204 64 ? S 06:24 0:00 s6-supervise
root 41 0.0 0.0 204 64 ? S 06:24 0:00 s6-supervise
root 42 0.0 0.0 204 68 ? S 06:24 0:00 s6-supervise
root 43 0.0 0.0 204 68 ? S 06:24 0:00 s6-supervise
root 51 0.0 0.0 180 48 ? Ss 06:24 0:00 /package/admi
abc 235 2.0 0.2 243780 49760 ? Ssl 06:24 0:00 /usr/bin/node
root 236 0.2 0.0 33732 14796 ? Ss 06:24 0:00 php-fpm: mast
root 239 0.0 0.0 1692 984 ? Ss 06:24 0:00 /usr/sbin/cro
root 241 0.1 0.0 18100 6328 ? Ss 06:24 0:00 nginx: master
abc 251 0.0 0.0 18548 2608 ? S 06:24 0:00 nginx: worker
abc 252 0.0 0.0 18548 2608 ? S 06:24 0:00 nginx: worker
abc 253 0.0 0.0 18548 2608 ? S 06:24 0:00 nginx: worker
abc 254 0.0 0.0 18548 2236 ? S 06:24 0:00 nginx: worker
abc 265 0.0 0.0 33740 3504 ? S 06:24 0:00 php-fpm: pool
abc 266 0.0 0.0 33740 3504 ? S 06:24 0:00 php-fpm: pool
root 277 33.3 0.0 3200 2280 pts/0 Rs+ 06:24 0:00 ps -aux
to get the program working stable you need some settings for a (nginx) reverse proxy. maybe they are usefull for other users.
proxy_pass http://localhost:port; # adjust ip instead of localhost and port
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "Upgrade";
proxy_set_header Host $host;
proxy_set_header X-Forwarded-for $remote_addr;
Be able to define specific external ports for the container and have devices be able to see each other when they have navigated to the snapdrop page.
Have never been able to see another device. I originally pulled this back at the beginning of 2021. The logs below are from the latest container pull after clearing the contents of the '/config' data locally. It doesn't matter if devices are both wired, wireless, or any combination thereof. There is absolutely nothing unusual or unique about the basic home network I'm trying to use this on. As others have noted, I can open a second browser or tab on the same host and see the additional 'device name' there and successfully send a file to the other instance of that device.
Also reported in discord here and a few other places: https://discord.com/channels/354974912613449730/506925392603512839/925594810075738134
OS: Raspberry Pi OS (uname -a: Linux raspberrypi 5.10.63-v7l+ #1496 SMP Wed Dec 1 15:58:56 GMT 2021 armv7l GNU/Linux)
CPU architecture: arm32
How docker service was installed: From the official repo, following the official instructions. Currently installed version of docker-ce: 5:20.10.123-0raspbian-buster
Using the same compose output as described in the readme.md save for my own port mapping:
snapdrop:
image: ghcr.io/linuxserver/snapdrop
container_name: snapdrop
environment:
- PUID=1000
- PGID=1000
- TZ=America/New_York
volumes:
- /mnt/storage/docker/appdata/snapdrop:/config
ports:
- 8091:80
- 8092:443
restart: unless-stopped
pi@raspberrypi:~ $ docker logs snapdrop
[s6-init] making user provided files available at /var/run/s6/etc...exited 0.
[s6-init] ensuring user provided files have correct perms...exited 0.
[fix-attrs.d] applying ownership & permissions fixes...
[fix-attrs.d] done.
[cont-init.d] executing container initialization scripts...
[cont-init.d] 01-envfile: executing...
[cont-init.d] 01-envfile: exited 0.
[cont-init.d] 10-adduser: executing...
usermod: no changes
-------------------------------------
_ ()
| | ___ _ __
| | / __| | | / \
| | \__ \ | | | () |
|_| |___/ |_| \__/
Brought to you by linuxserver.io
-------------------------------------
To support LSIO projects visit:
https://www.linuxserver.io/donate/
-------------------------------------
GID/UID
-------------------------------------
User uid: 1000
User gid: 1000
-------------------------------------
[cont-init.d] 10-adduser: exited 0.
[cont-init.d] 20-config: executing...
[cont-init.d] 20-config: exited 0.
[cont-init.d] 30-keygen: executing...
generating self-signed keys in /config/keys, you can replace these with your own keys if required
Generating a RSA private key
........................+++++
...+++++
writing new private key to '/config/keys/cert.key'
-----
[cont-init.d] 30-keygen: exited 0.
[cont-init.d] 50-config: executing...
[cont-init.d] 50-config: exited 0.
[cont-init.d] 90-custom-folders: executing...
[cont-init.d] 90-custom-folders: exited 0.
[cont-init.d] 99-custom-files: executing...
[custom-init] no custom files found exiting...
[cont-init.d] 99-custom-files: exited 0.
[cont-init.d] done.
[services.d] starting services
[services.d] done.
Snapdrop is running on port 3000
pi@raspberrypi:~ $
I get the following error now:
_Upgrade Required!
The application inside this image has been moved to a new folder.
You will need to update your /config/nginx/nginx.conf and /config/nginx/site-confs/default.conf in order for the application to work.
New config samples are located at /config/nginx/nginx.conf.sample and /config/nginx/site-confs/default.conf.sample
Please review our announcement: Significant changes to nginx based images_
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.