kentonv changed the topic of #sandstorm to: Welcome to #sandstorm: home of all things sandstorm.io. Say hi! | Have a question but no one is here? Try asking in the discussion group: https://groups.google.com/group/sandstorm-dev
wings has joined #sandstorm
wings has quit [Remote host closed the connection]
frigginglorious1 has joined #sandstorm
frigginglorious has quit [Ping timeout: 246 seconds]
frigginglorious1 is now known as frigginglorious
frigginglorious has quit [Read error: Connection reset by peer]
frigginglorious has joined #sandstorm
frigginglorious has quit [Ping timeout: 246 seconds]
JacobWeisz[m] has quit [Ping timeout: 260 seconds]
frigginglorious has joined #sandstorm
frigginglorious1 has joined #sandstorm
frigginglorious has quit [Ping timeout: 260 seconds]
frigginglorious1 is now known as frigginglorious
TMM has joined #sandstorm
<TMM>
Hi all, I have a question: My sandcats.io certificate expired today I read a blogpost that the certificates are supposed to be migrating to letsencrypt
<TMM>
but that appears to not have happened on my install
<TMM>
Can I do this from the command line? Due to HTST I can't get at the web interface at all anymore
<kentonv>
TMM, check /opt/sandstorm/sandstorm.log to see if there's any hints what went wrong. If you restart sandstorm, it should immediately retry getting a cert...
<kentonv>
err
<kentonv>
/opt/sandstorm/var/log/sandstorm.log
<TMM>
It doesn't, it says it'll retry the renewal, but it's not
<kentonv>
I think it retries something like every 6 hours, but should retry immediately if you do `sudo sandstorm restart`
<kentonv>
I'd try that and then watch the log to see what happens
<kentonv>
if it fails to get a cert and the reason why isn't obvious from the log, then it would help if you could e-mail the log to kenton@sandstorm.io so I can try to decipher it
<TMM>
Give me a sec
<TMM>
Are the certs still on the filesystem?
<kentonv>
new certs will only be stored in mongo, not placed on the filesystem
<TMM>
Ah, that may be my problem then
<kentonv>
oh... uh oh, are you using some separate server to terminate TLS, pulling the certs from the sandcats directory? I guess I didn't consider that case when implementing ACME support.
<TMM>
yeah
<TMM>
that's exactly what I do
<TMM>
Because otherwise sandstorm would require its own IP address on my box
<TMM>
Can I move an existing sandstorm install to a different domain?
<TMM>
I can just disable https on sandstorm itself and get a wildcard cert from letsencrypt for my own subdomain
<kentonv>
doh, ok... so as a quick-but-temporary fix, you can revert to globalsign
<kentonv>
do `sudo sandstorm mongo` to get to the mongo prompt
<kentonv>
then run the mongo command: db.settings.remove({_id: "acmeAccount"})
<kentonv>
hmmm
<kentonv>
actually, I guess it's going to try to create a new account basically right away, ugh
<kentonv>
ok, never mind that
<kentonv>
you can extract the tls keys from mongo
<kentonv>
db.settings.findOne({_id: "tlsKeys"})
<TMM>
no, that did work :)
<TMM>
it said 'planning to migrate to acme' but didn't on the first run
<kentonv>
ah, well... ok, then you have a certificate good for a few days
<kentonv>
I probably should have suggested pulling out the let's encrypt certificate in the first place, since that'd be good for three months. Oops.
<TMM>
I like the idea of just extracting the keys from mongo
<TMM>
I didn't see your suggestion for going into mongo until after I had alreadt deleted the acmeaccount
<TMM>
sorry :-/
<kentonv>
my fault, but it's fine
<TMM>
I could just do a new install of sandstorm I guess?
<TMM>
Can I just save all my grains and import them in a new install?
<kentonv>
nah just go with the globalsign cert for now and you'll get a new LE cert again in a week
<kentonv>
this hacky terminal command should work for extracting the key: echo 'db.settings.findOne({_id: "tlsKeys"})' | sudo sandstorm mongo
<kentonv>
so if you had a cron job that does that once a day and saves the output to the right places you should be good
<TMM>
OK yeah, that would work just fine
<TMM>
Maybe worth documenting, I can't imagine I'm the only person running sandstorm like this
<kentonv>
and yes, you can move sandstorm to a new domain without reinstalling. You'd need to edit /opt/sandstorm/sandstorm.conf to change the config there, and then you'll need to use an admin token to reconfigure your login mechanisms (since OAuth login is tied to the domain)
<TMM>
Yeah, this together with some jq will work fine
<kentonv>
oh if you change the `findOne` to just `find` it might be easier to parse the output
<TMM>
My setup is otherwise prooobably pretty odd, but I don't think that matters. I run sandstorm in a systemd nspawn container
<TMM>
But that shouldn't matter for this I think
<digitalcircuit>
kentonv: Low priority update from a week ago or so, ACME account auto-created successfully here. I'll find out tomorrow after renew if the automatic certificate switchover was successful :)
<TMM>
Hmm, it doesn't seem to include the intermediate certs there or maybe I'm just not looking at it right
<kentonv>
TMM, `certChain` should include intermediates
<kentonv>
you should see multiple BEGIN CERTIFICATE / END CERTIFICATE blocks all concatenated together under `certChain`
<TMM>
kentonv: thank you! I'll write a script to extract these into a format nginx can read then
<TMM>
kentonv: and I'm sorry the whole sandstorm thing didn't work out financially :( My company could probably pay for some kind of support contract on a self hosted version if that's something that exists?
<kentonv>
not really. I certainly wouldn't have time to offer reliable support, so can't in good conscience sell support contracts. If you're looking for somewhere to throw money, though, https://github.com/zenhack does a lot of Sandstorm work and accepts sponsorship via github sponsors. :)
<TMM>
Alright! I'll see how I can have my company do sponsorship on GitHub then
<TMM>
My accountant always has... Questions. :P
isd has joined #sandstorm
frigginglorious has quit [Read error: Connection reset by peer]
frigginglorious has joined #sandstorm
<TimMc>
TMM: It's good for them. Builds character. :-)
<isd>
I think I'm going to send a pr for the cgroups stuff without actually adding any policy. It will make the backup thing easy to fix.
frigginglorious1 has joined #sandstorm
frigginglorious has quit [Ping timeout: 246 seconds]
frigginglorious1 is now known as frigginglorious
frigginglorious has quit [Read error: Connection reset by peer]
frigginglorious has joined #sandstorm
frigginglorious1 has joined #sandstorm
frigginglorious has quit [Ping timeout: 240 seconds]
frigginglorious1 is now known as frigginglorious
frigginglorious has quit [Read error: Connection reset by peer]
frigginglorious has joined #sandstorm
frigginglorious1 has joined #sandstorm
frigginglorious has quit [Ping timeout: 260 seconds]
frigginglorious1 is now known as frigginglorious
frigginglorious has quit [Read error: Connection reset by peer]
frigginglorious has joined #sandstorm
frigginglorious has quit [Remote host closed the connection]