{"id":13558707,"url":"https://github.com/dobbs/wiki-tls","last_synced_at":"2026-01-20T04:30:42.650Z","repository":{"id":139513886,"uuid":"78443675","full_name":"dobbs/wiki-tls","owner":"dobbs","description":"local federated wiki farm with TLS and security_type=friends","archived":false,"fork":false,"pushed_at":"2019-03-28T04:33:21.000Z","size":29,"stargazers_count":5,"open_issues_count":0,"forks_count":2,"subscribers_count":5,"default_branch":"master","last_synced_at":"2024-11-04T09:37:33.494Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dobbs.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}},"created_at":"2017-01-09T15:51:53.000Z","updated_at":"2021-10-20T06:21:25.000Z","dependencies_parsed_at":"2023-05-14T09:30:36.988Z","dependency_job_id":null,"html_url":"https://github.com/dobbs/wiki-tls","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dobbs%2Fwiki-tls","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dobbs%2Fwiki-tls/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dobbs%2Fwiki-tls/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dobbs%2Fwiki-tls/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dobbs","download_url":"https://codeload.github.com/dobbs/wiki-tls/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247009694,"owners_count":20868592,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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-08-01T12:05:06.743Z","updated_at":"2026-01-20T04:30:42.640Z","avatar_url":"https://github.com/dobbs.png","language":"Shell","readme":"# wiki.localtest.me: a local Wiki farm and TLS proxy\n\nSee wiki site: https://local-farm.wiki.dbbs.co\n\nAssuming you already have a local docker machine, and that you're\nconnected to The Internet...\n\n### 1. launch the docker composition\n\n``` bash\n# launch the services\ncp .env.example .env\ndocker-compose up -d\n\n# find the password you'll need to edit pages\ndocker-compose run --rm farm \\\n  jq -r .admin .wiki/config.json\n```\n\n### 2. claim your first local wiki\n\nPoint your browser to https://localtest.me.  Your browser will present\na security warning because this is using a self-signed TLS\ncertificate.  Proceed with caution and then click the lock icon around\nthe bottom left corner to authenticate.  Use the admin password you\nfound in the logs from step 1.\n\n### 3. create a few pages\n\nSome really helpful places to start here: http://hello.ward.bay.wiki.org/\n\n### 4. expand your farm\n\nPoint your browser to https://homestead.localtest.me and notice that\nthis is a new wiki, and already claimed by you, The Owner.  There are\nseveral parts of this example which combine to make it extremely easy\nto create new plots in the wiki farm:\n\n* [localtest.me](http://readme.localtest.me) is a public domain name\n  which is configured so that all sub-domains point at `127.0.0.1`,\n  the loopback address of your own computer.\n* the `Caddyfile` we use also accepts requests for all domains and\n  sub-domains and directs those to our `web` service where federated\n  wiki runs.\n* the `config.json` sets the wiki into farm mode and accepts requests\n  for all sub-domains of localtest.me.\n\nThese three things together allow the creation of new wikis by simply\nchoosing a new sub-domain in our web browser.\n\n### 5. experiment with plugins\n\nThe `admin` value in `config.json` is pre-configured to match the site\nowner's secret.  With this in place, you can use [plugmatic] to\ninstall plugins in your local wiki farm.  As of this writing the\nplugins do not get installed in a persistent location in the\ncontainer.  The next reboot of the `farm` service will reset the\ncontainer to its original state without the plugins installed.\n\n[plugmatic]: http://plugins.fed.wiki.org/about-plugmatic-plugin.html\n\n### 6. experiment with image-transporter\n\nThis example also includes a copy of the [image-transporter] running\nin an adjacent container: https://image-transporter.localtest.me.\nCreating a wiki page that uses this transporter is left as an exercise\nfor the reader.\n\n[image-transporter]: http://ward.asia.wiki.org/home.c2.com:4010/welcome-visitors\n\n### 7. rename the generic owner\n\nWhen you feel inclined, I've included a script in the docker image to\nchange the owner's name:\n\n``` bash\ndocker-compose run --rm farm bin/set-owner-name YOUR NAME\n# restart web to pick up these config changes\ndocker-compose restart web\n```\n\n### other admin tricks\n\n#### backup the wiki\n\n``` bash\ndocker-compose run --rm --no-deps -T farm \\\n  tar cz .wiki \u003e wiki.localtest.me.$(date +%a).tgz\ncp wiki.localtest.me.$(date +%a).tgz wiki.localtest.me.$(date +%b).tgz\ncp wiki.localtest.me.$(date +%a).tgz wiki.localtest.me.$(date +%Y).tgz\n```\n\nThe naming convention for backup files reduces risk of consuming disk\nspace.  This Thursday's backup will overwrite last Thursday's.  This\nmonth's backup will overwrite the same month from last year.\n\n#### restore a backup\n\n``` bash\nTARBALL=wiki.localtest.me.Jun.tgz\ndocker-compose run --rm --no-deps -T farm \\\n  tar zxf /dev/stdin \u003c $TARBALL\n```\n\n#### One-time changes\n\nIf you are upgrading your local wiki, please refer to the following notes.\n\n##### On 28 June 2018 the volume was renamed where wiki pages are saved.\n\n``` bash\n./migration/2018-06-28-rename-volumes\n```\n\n#### update all the related packages\n\n``` bash\ndocker-compose exec farm npm install -g --prefix . wiki\ndocker-compose restart farm\n```\n\nThese changes will survive a restart of the container, but if you stop\nand remove the container, newly created containers will not include\nthese updates.\n\n# Notes that maybe only apply to me\n\nI have [The Docker Toolbox] installed on an older Mac which does not\nhave the necessary processor to run [Docker for Mac].  That means my\ndocker processes run in a virtual machine which is not `localhost` nor\n`127.0.0.1` (nor `::1` for that matter).  And _that_ means the simple\nbrilliance of [localtest.me] needs a little extra fiddling to work\nwith my containerized experiments.\n\nI set up an ad hoc reverse proxy to listen on `127.0.0.1` ports `:80`\nand `:443` and forward the requests to the local virtual machine.  I\nrun the following commands in a separate window:\n\n``` bash\nbrew install caddy # only need to do this once\nIP=$(docker-machine active | xargs docker-machine ip)\nprintf \"%s\\n\" :80, :443 'log stdout' 'errors stdout' 'tls self_signed' \\\n  \"proxy / $IP { transparent }\" | sudo caddy -conf stdin\n```\n\n[The Docker Toolbox]: https://www.docker.com/products/docker-toolbox\n[Docker for Mac]: https://docs.docker.com/docker-for-mac/\n[localtest.me]: https://http://readme.localtest.me/\n","funding_links":[],"categories":["Shell","others"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdobbs%2Fwiki-tls","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdobbs%2Fwiki-tls","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdobbs%2Fwiki-tls/lists"}