{"id":16208310,"url":"https://github.com/sejongk/openspa-docker","last_synced_at":"2026-04-30T14:37:18.013Z","repository":{"id":122788121,"uuid":"454262256","full_name":"sejongk/openspa-docker","owner":"sejongk","description":"Unofficial OpenSPA Dockerfiles","archived":false,"fork":false,"pushed_at":"2022-02-09T14:38:00.000Z","size":16,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-07T20:34:16.665Z","etag":null,"topics":["docker","dockerfile","openspa","single-packet-authorization"],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/sejongk.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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-02-01T04:35:24.000Z","updated_at":"2022-02-06T15:20:46.000Z","dependencies_parsed_at":null,"dependency_job_id":"a473d522-28bc-4664-9e28-e3c6d1bf5ec6","html_url":"https://github.com/sejongk/openspa-docker","commit_stats":{"total_commits":8,"total_committers":2,"mean_commits":4.0,"dds":0.25,"last_synced_commit":"507097b8bdb98179ef34391088380fc08543eb84"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/sejongk/openspa-docker","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sejongk%2Fopenspa-docker","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sejongk%2Fopenspa-docker/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sejongk%2Fopenspa-docker/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sejongk%2Fopenspa-docker/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sejongk","download_url":"https://codeload.github.com/sejongk/openspa-docker/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sejongk%2Fopenspa-docker/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32468009,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-30T13:12:12.517Z","status":"ssl_error","status_checked_at":"2026-04-30T13:12:06.837Z","response_time":57,"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":["docker","dockerfile","openspa","single-packet-authorization"],"created_at":"2024-10-10T10:16:24.116Z","updated_at":"2026-04-30T14:37:17.972Z","avatar_url":"https://github.com/sejongk.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# OpenSPA-docker\n* Git repo of the unofficial docker image for [OpenSPA](https://github.com/greenstatic/openspa)\n* OpenSPA images help you to follow [OpenSPA official tutorial](https://github.com/greenstatic/openspa/blob/master/docs/OpenSPA%20Server%20Installation%20with%20iptables.md) easily\n\n# How  to pull from Docker hub\n    docker pull sepaper/openspa-server\n    docker pull sepaper/openspa-client\n# How to build\n1. Clone openspa-docker repo and initialize submodules\n    ```bash\n    git clone https://github.com/sepaper/openspa-docker.git\n    \n    cd openspa-docker\n    git submodule init --update\n    \n    cd openspa\n    git checkout master # dev branch is under development\n    go mod init github.com/greenstatic/openspa\n    go mod tidy\n    ```\n2. Run build-server.sh to build OpenSPA server\n    ```bash\n    # To build for Linux (amd64) explicitly\n    ./build-server.sh linux amd64 openspa-server 1.0.0\n    \n    # To build for MacOS (arm64) explicitly \n    ./build-server.sh darwin arm64 openspa-server 1.0.0\n    ```\n3. Run build-client.sh to build OpenSPA client\n    ```bash\n    # To build for Linux (amd64) explicitly\n    ./build-client.sh linux amd64 openspa-client 1.0.0\n    \n    # To build for MacOS (arm64) explicitly \n    ./build-cient.sh darwin arm64 openspa-client 1.0.0\n    ```\n    \n# How to run for the tutorial\n1. Run echo ipv4 server in host\n    ```bash\n    # In host\n    docker run --name echoip -d greenstatic/echo-ip # this server returns an echo response like {\"success\":true,\"ip\":\"172.17.0.3\",\"isIpv6\":false,\"datetime\":\"2022-02-02T08:23:15Z\",\"ipDetails\":{\"remoteIP\":\"172.17.0.3\",\"forwardedForIP\":\"\"},\"service\":\"echo-ip\",\"version\":\"1.2.0\",\"srcUrl\":\"https://github.com/greenstatic/echo-ip\"}\n    ```\n2. Check the built images\n    ```bash\n    # In host\n    docker images\n    ```\n3. Create directories used by OpenSPA server to store server key pair and client public keys\n    ```bash\n    # In host\n    mkdir server\n    mkdir server/server-keys\n    mkdir server/client-keys # used for user(client) directory service\n    ```\n4. Create a directory used by OpenSPA client to store client public key and config\n   ```bash\n    # In host\n    mkdir clients\n    ```\n5. Copy OpenSPA server public key to the clients directory\n   ```bash\n    # In host\n    cp server/server-keys/server.pub clients/.\n    ```\n6. Generate OpenSPA server key pair using OpenSSL\n    ```bash\n    # In host\n    openssl genrsa -out server/server-keys/server.key 2048\n    openssl rsa -in server/server-keys/server.key -outform PEM -pubout -out server/server-keys/server.pub\n    ```\n7. Run OpenSPA server\n   ```bash\n    # In host\n    # NET_ADMIN capability is necessary to set iptables\n    docker run --name openspa-server --cap-add=NET_ADMIN -v $(pwd)/server/server-keys:/openspa/keys -v $(pwd)/server/client-keys:/openspa/es/public_keys openspa-server:1.0.0 --echo-ipv4-server http://\u003cecho ipv4 server ip\u003e:\u003cport\u003e\n\n8. Run OpenSPA client\n    ```bash\n    # In host\n    docker run --name openspa-client -v $(pwd)/clients:/openspa/clients -it openspa-client:1.0.0 /bin/bash\n    ```\n9. Generate client key pair and config using OpenSPA tools\n    ```bash\n    # In host\n    docker exec -it openspa-client /bin/bash\n    # In OpenSPA client\n    cd openspa\n    ./openspa-tools gen-client clients/pub -o clients # you can press enter for all to set as default\n    ls clients # find out client device id in a name of created directory\n    ```\n10. Register OpenSPA client public key to OpenSPA server\n    ```bash\n    # In host\n    cp clients/0195e956-....-ef2er/0195e956-....-ef2er.pub server/client-keys/.\n    ```\n11. Send OpenSPA request and ping to OpenSPA server in OpenSPA client\n    ```bash\n    # In OpenSPA client\n    ./openspa-client request clients/0195e956-....-ef2er/client.ospa --protocol icmp -p 1 --echo-ipv4-server http://\u003cecho ipv4 server ip\u003e:\u003cport\u003e --server-ip \u003cOpenSPA server ip\u003e\n    ping \u003cOpenSPA server ip\u003e\n    ```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsejongk%2Fopenspa-docker","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsejongk%2Fopenspa-docker","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsejongk%2Fopenspa-docker/lists"}