{"id":17683193,"url":"https://github.com/nemanjam/wireguard-docker","last_synced_at":"2026-02-12T13:08:22.198Z","repository":{"id":102335018,"uuid":"551345897","full_name":"nemanjam/wireguard-docker","owner":"nemanjam","description":null,"archived":false,"fork":false,"pushed_at":"2022-10-14T18:51:44.000Z","size":3,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-09-02T11:34:44.409Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/nemanjam.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-10-14T08:23:42.000Z","updated_at":"2022-10-14T08:23:42.000Z","dependencies_parsed_at":null,"dependency_job_id":"fecb8674-7cf6-4d8d-b1d8-bbc2e5070d04","html_url":"https://github.com/nemanjam/wireguard-docker","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/nemanjam/wireguard-docker","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nemanjam%2Fwireguard-docker","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nemanjam%2Fwireguard-docker/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nemanjam%2Fwireguard-docker/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nemanjam%2Fwireguard-docker/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nemanjam","download_url":"https://codeload.github.com/nemanjam/wireguard-docker/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nemanjam%2Fwireguard-docker/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29366615,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-12T08:51:36.827Z","status":"ssl_error","status_checked_at":"2026-02-12T08:51:26.849Z","response_time":55,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-24T09:44:38.184Z","updated_at":"2026-02-12T13:08:22.166Z","avatar_url":"https://github.com/nemanjam.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"# Wireguard Docker setup\n\n### Tutorials\n\n- Create your own VPN server with WireGuard in Docker - The Digital Life [Youtube](https://www.youtube.com/watch?v=GZRTnP4lyuo), [Github](https://github.com/xcad2k/videos/tree/main/wireguard-docker)\n- How to add/install Wireguard on Oracle Cloud to create your own VPN - Sauber-Lab UK [Youtube](https://www.youtube.com/watch?v=ocsVUGjVSpI)\n- Run WireGuard VPN Server in Docker Container with Docker Compose [tutorial](https://techviewleo.com/run-wireguard-server-in-docker-container)\n\n\n### Get IP into env var\n\n- get public IP command [stackexchange](https://unix.stackexchange.com/questions/22615/how-can-i-get-my-external-ip-address-in-a-shell-script)\n\n**~/.bashrc**\n\n```bash\n# export server public IP v4\nexport MY_PUBLIC_SERVER_IP_V4=$(dig @resolver4.opendns.com myip.opendns.com +short)\n```\n\n**reload shell and check var**\n\n```bash\nsource ~/.bashrc\nprintenv MY_PUBLIC_SERVER_IP_V4\n```\n\n### Open port in firewall\n\n- add `UDP 51820` as destination port in server firewall\n\n### Create config folder\n\n```bash\nsudo mkdir /opt/wireguard-server\n```\n\n### Run and check Wireguard\n\n```bash\n# check if running and peers\ndocker exec -it wireguard wg\n\n# cd config folder\ncd /opt/wireguard-server/config\nls\n\n```\n\n### Download client credentials\n\n```bash\n# run in LOCAL terminal\n\n# config file for Ubuntu client\nscp ubuntu@amd1:/opt/wireguard-server/config/peer1/peer1.conf  ~/Desktop/peer1.conf\n\n# qr code for Android\nscp ubuntu@amd1:/opt/wireguard-server/config/peer1/peer1.png   ~/Desktop/peer1.png\n\n```\n\n### Display QR code for a client\n\n- better just copy png with scp above\n\n```bash\n# for peer2 ie\ndocker exec -it wireguard /app/show-peer 2\n```\n\n### Install and run client on Ubuntu\n\n```bash\n# install client and dns for wg-quick\nsudo apt install wireguard resolvconf\n\n# copy as wg0.conf to client (run this from client terminal)\nscp ubuntu@amd1:/opt/wireguard-server/config/peer1/peer1.conf  /etc/wireguard/wg0.conf\n\n# start Wireguard on client\nwg-quick up wg0\n\n# check if client is connected\nsudo wg\n\n# check on server\ndocker exec -it wireguard wg\n\n# stop wireguard (or restart)\nwg-quick down wg0\n```\n\n### Restart and recreate if `docker-compose.yml` is edited (peers number)\n\n```bash\ndocker-compose up -d --force-recreate\n```\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnemanjam%2Fwireguard-docker","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnemanjam%2Fwireguard-docker","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnemanjam%2Fwireguard-docker/lists"}