I recently decided to self host a few services I had in mind. I thought to start with an old rpi 3 I got laying around. First service I setted up was SMB share with docker compose. After that I wanted to implement wg to access SMB from everywhere. I wanted to do that with docker compose aswell so I went with wg-easy. I went with the simple installation but after i run that, connecting to SMB from gio stopped working. I am not expirienced with any of this. I will upload my files here so that if anyone has any idea what I'm doing wrong to advise me.
my docker-compose.yaml for SMB:
services:
samba:
image: dockurr/samba
container_name: samba
# network_mode: host
environment:
NAME: "Cloud"
USER: "samba"
PASS: "<my-pass>"
ports:
- 139:139
- 445:445
volumes:
- /mnt/SSD:/storage
# - ./users.conf:/etc/samba/users.conf
# - ./smb.conf:/etc/samba/smb.conf
restart: always
my docker-compose.yaml for WG:
volumes:
etc_wireguard:
services:
wg-easy:
environment:
# Optional:
# - PORT=51821
# - HOST=0.0.0.0
- INSECURE=false
image: ghcr.io/wg-easy/wg-easy:15
container_name: wg-easy
networks:
wg:
ipv4_address: 10.42.42.42
ipv6_address: fdcc:ad94:bacf:61a3::2a
volumes:
- etc_wireguard:/etc/wireguard
- /lib/modules:/lib/modules:ro
ports:
- "51820:51820/udp"
- "51821:51821/tcp"
restart: unless-stopped
cap_add:
- NET_ADMIN
- SYS_MODULE
# - NET_RAW # ⚠️ Uncomment if using Podman
sysctls:
- net.ipv4.ip_forward=1
- net.ipv4.conf.all.src_valid_mark=1
- net.ipv6.conf.all.disable_ipv6=0
- net.ipv6.conf.all.forwarding=1
- net.ipv6.conf.default.forwarding=1
networks:
wg:
driver: bridge
enable_ipv6: true
ipam:
driver: default
config:
- subnet: 10.42.42.0/24
- subnet: fdcc:ad94:bacf:61a3::/64
when i run gio mount smb://samba@<ip>/Cloud
I now get error: Failed to mount Windows share: Connection refused
And after that if I run docker compose ls smb says it is restarting.
I feel like I kind of went randomly to just set this up since I didn't find a well documented source for my usecase and since I'm no expertise to that I messed everything up. Please If you are able to guide me I would really appreciate it. Thanks in advance.
Edit: I was wrong the smb server after a while says restarting I don't know whats at fault. I tried running smb only again but i still had the same issue. I don't remember changing anything else. I don't know what I f*cked up