Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add "single domain mode" for easier self-hosting #120

Closed
arp242 opened this issue Jan 16, 2020 · 1 comment
Closed

Add "single domain mode" for easier self-hosting #120

arp242 opened this issue Jan 16, 2020 · 1 comment

Comments

@arp242
Copy link
Owner

arp242 commented Jan 16, 2020

Right now self-hosting GoatCounter is a bit more complicated than it needs to be because it assumes you want to run a SaaS, like GoatCounter.com

This doesn't apply to most self-host instances, it should be easier to set this up. For example:

$ goatcounter -singledomain

That will just serve domain ID 1 on any domain (i.e. it won't attempt to check subdomain codes and whatnot). There should also be a command to create a site (goatcounter -init-singledomain).

Depends on #108.

@arp242 arp242 added this to the Version 1.2 milestone Jan 16, 2020
arp242 added a commit that referenced this issue Jan 28, 2020
Basic TLS support based on .pem files. I looked at doing ACME, but it's
rather complicated as this requires dns-01 verification, which requires
setting a "_acme-challenge.domain.com" record.

https://github.com/go-acme/lego includes support for this, but it still
requires giving lego (and thus goatcounter) API access to the domain,
which is rather meh.

I solved this on goatcounter.com using CNAME to an unimportant domain:

- goatcounter.com is managed by TransIP.

- goatcount.com is managed by CloudFlare (it's the only domain on my
  account there)

- _acme-challenge.goatcounter.com is a CNAME to goatcounter.goatcount.com

- In the dns-01 verification we set the goatcount.com address, so we
  only need to have the cloudflare API keys.

I think the best solution is to implement #120 first. With that, we
don't need to muck about with wildcard certs, and can just use http-01
challenge for one domain.
arp242 added a commit that referenced this issue Jan 28, 2020
Basic TLS support based on .pem files. I looked at doing ACME, but it's
rather complicated as this requires dns-01 verification, which requires
setting a "_acme-challenge.domain.com" record.

https://github.com/go-acme/lego includes support for this, but it still
requires giving lego (and thus goatcounter) API access to the domain,
which is rather meh.

I solved this on goatcounter.com using CNAME to an unimportant domain:

- goatcounter.com is managed by TransIP.

- goatcount.com is managed by CloudFlare (it's the only domain on my
  account there)

- _acme-challenge.goatcounter.com is a CNAME to goatcounter.goatcount.com

- In the dns-01 verification we set the goatcount.com address, so we
  only need to have the cloudflare API keys.

I think the best solution is to implement #120 first. With that, we
don't need to muck about with wildcard certs, and can just use http-01
challenge for one domain.
arp242 added a commit that referenced this issue Feb 5, 2020
TODO:

- Manage additional sites (maybe just disable this?)
- Don't display code in Settings, change "custom domain" text.
- Remove help etc. from footer.
- Don't reserve domains.
- Don't show "delete account".

Fixes #120
@arp242
Copy link
Owner Author

arp242 commented Mar 3, 2020

Implemented with goatcounter serve with #173

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant