Persisted Data Volume
Ceetrox opened this issue · 3 comments
I've been trying to create a persistent volume of data for quite some time now. No matter what I try, after a container restart or a new installation, I start at the beginning. I would like to run it over Amazon ECS. Is there a possibility of a persistent configuration?
docker run -d --cap-add NET_ADMIN -p 500:500/udp -p 4500:4500/udp -p 1701:1701/tcp -p 1194:1194/udp -p 5555:5555/tcp -e SPW=abcdefgh -e HPW= abcdefgh -v /test3/vpn_server.config:/opt/vpn_server.config siomiz/softethervpn
I trying this command and copy paste (docker cp) the config file. But after a Relaunch my Hubs are gone...
Yes, and your syntax for the mount seems correct. The entrypoint script skips configuration if the config file is mounted (valid or not).
Make sure the config file you're mounting is the one with your settings. (The container log for the server you're cp'ing config file from should say [initial setup OK]
.)
Run these commands to create and retrieve config file first:
# run to create /opt/vpn_server.config (ignore iptables error)
docker run -d --rm --name vpn siomiz/softethervpn
# copy the config file out to current dir
docker cp vpn:/opt/vpn_server.config .
# stop to delete this temporary server
docker stop vpn
Then run your command.
Amazon ECS has its own volume management; you need to refer to their manual.
Hi and thx for the answer....
unfortunatly it does not work... did you have another idea? the server is perfect for me but i need to fix this... otherwise i cant use that...
Thx for your Help!
If you're using the admin GUI you definitely need to specify the SPW
and HPW
at the first config write or you'll lose access to the server after restart:
docker run -d --rm --name vpn -e SPW=serverpasswd -e HPW=hubpasswd siomiz/softethervpn
Also, by default the VPN server (only) auto-saves the config file every 300 seconds.
Make sure your changes are saved... check the config file locally and see if your changes appear in it (ex. look for declare Test
under declare VirtualHub
if you create a Test
hub).
Execute the second run without -d
and see if it generates any log; if it's not logging anything it should be using the mounted config file correctly.