Here… As you can see, I’ve done it, but I’ve only decided to think about it now. Here’s the question. How do I configure the site repositories (farastil and parallaxis), which are located in different dockers, and syncthing itself, which is also located in a separate docker… I have access to the web panel. Here I’ve set it up beautifully, turn on the VPN, and the web panel works, there is no vpn and there is no access to the web panel.
I have a server running multiple Docker containers behind a VPN with double NAT. The structure is:
Nginx on host handles public traffic.
Docker containers for two websites: farastil (port 8080) and parallaxis (port 8081).
A VPN container (amnezia-awg) that creates network 172.29.172.0/24 and provides VPN access to internal services.
A Syncthing container in the same Docker network (172.29.172.3:8384).
VPN clients connect to 10.8.1.0/24 and access Syncthing via port forwarding through the VPN container (10.8.1.0:8384 → 172.29.172.3:8384).
The websites’ files are inside their respective Docker containers at /opt/docker/farastil/html/ and /opt/docker/parallaxis/html/. Syncthing runs in its own container.
I want to use Syncthing to synchronize these website directories between my work and home computers, but the files are inside separate Docker containers while Syncthing runs in another container. The challenge is the double NAT: Docker network plus VPN networking.
How should I set up Syncthing to sync files directly into the website containers’ directories? Should I mount volumes differently, use bind mounts from host, or configure Syncthing differently considering the container isolation?
I’m considering using Git for version control alongside Syncthing for file synchronization. What’s the best practice for this containerized setup where I need to edit files locally and have them update in the live web containers automatically?
The goal is: edit website files on either computer → Syncthing syncs → files update in web containers → Nginx serves updated content.
The complication is each service (websites, Syncthing) runs in separate Docker containers with their own network namespaces, plus VPN access layer.
You should make the files available to Syncthing as a volume. If it also needs to be a volume in another container, it’s probably easiest to have the files in a directory on the host. Mount that directory as a volume in each container that needs to access it.
Your files for your website dockers should be mounted as volumes. Perhaps bind mounts to your docker host’s filesystem. Do the same with syncthing and you should be able to sync them no problem.