Closed ocdtrekkie closed 9 months ago
To be clear: I am happy to make a first pass at assembling this, but I wanted to propose it first.
Yes it's a bit steep. It's also still very much in flux. Right now I'm working on negating the need for a wildcard cert and instead automatically obtain each subdomain as needed (although you could still use a wildcard if you wanted).
It would be great to have something that helps tinkerers get going faster. If you're willing to take a stab at a vagrant file I'd like to see it. For now let's leave dropserver.org out of it. We can use dropserver.devel or something like that.
Thanks!
I have an existing domain I can use for testing, I will let you know what I accomplish.
Do also note that through services like https://crt.sh not using a wildcard can actually leak information about what subdomains are accessible on a given domain, so wildcards are probably preferable for obscurity+security purposes.
Yes sadly I know about that. DNS and TLS are just not good for personal servers. It definitely is a tradeoff, but self-hosters can make their own choice (you'll be able to do either one or some combination with multiple domains).
So I got it to build, and when running, I got this streaming endlessly until I killed it:
default: Admin Email: Key: '' Error:Field validation for '' failed on the 'required' tag
default: Admin Email: Key: '' Error:Field validation for '' failed on the 'required' tag
default: Admin Email: Key: '' Error:Field validation for '' failed on the 'required' tag
You can see my work so far here: https://github.com/ocdtrekkie/Dropserver/commit/7009b5175990063b2909c4363fc87603dc77cbb1
/dropsrv/dist/bin/ds-host -config=/home/dev/ds-config.json -migrate
That command is interactive. It asks for admin's email and password. I do it this way because I don't want admin credentials in any config files or CLI arguments.
Is there a way for vagrant to deal with interactive prompts? If not I'm open to other ways of setting the initial password for the admin so that non-interactive installs are possible.
I don't think there's any good way to do an interactive CLI command. I can ssh into the VM and run it manually so I can try out Dropserver for now, but telling people they need to ssh into the VM before trying to run it to run a command is non-ideal.
Our solution for production use entails a setup wizard within the web interface, and we give the user a randomly-generated URL in the CLI which has permission to access it. For development mode, we autogenerate some accounts like Alice (admin account), Bob, and Dave, which have no password at all.
I like the idea of a randomly generated url to set up the system. Will work on that.
So first of all... -migrate doesn't appear to be the interactive step!
Second, Field validation is still failing on me, for non-specific reasons.
vagrant@localhost:~$ sudo /dropsrv/dist/bin/ds-host -config=/home/dev/ds-config.json -migrate
ds-host version: v0.8.0
GetSchema num table is 0
Completed migration step: up 1905-fresh-install
Completed migration step: up 2203-sandboxusage
schema after migration: 2203-sandboxusage
vagrant@localhost:~$ sudo /dropsrv/dist/bin/ds-host -config=/home/dev/ds-config.json
ds-host version: v0.8.0
There are currently no admin users, please create one.
Admin Email: test@test.com
Password: Password
Key: '' Error:Field validation for '' failed on the 'min' tag
Password: Password2
Key: '' Error:Field validation for '' failed on the 'min' tag
Password:
AH! Made the password longer, probably should be more clear about that requirement:
Password: PasswordPasswordPassword
Please confirm password: PasswordPasswordPassword
Created user.
Made user an admin.
Had to run ds-host
a third time before it bound to port 5050, but I'm getting a 404 Not Found there now.
So first of all... -migrate doesn't appear to be the interactive step!
Ah bummer sorry. I haven't done a clean install of ds-host in a long time and was going on memory.
but I'm getting a 404 Not Found there now.
Have you tried [dropid.local.sandstorm.io:5050]()?
Ah, that works! I assumed there would be something at the root domain.
Hola, should you get back into this, here are a few things that have changed:
$ /usr/local/bin/ds-host -config=/etc/dropserver.json -migrate
Hope that helps. Thank you!
The entire list under
Running ds-host takes a bit more work:
is a bit steep, and I'd like to just kinda spin it up to play. I am not sure if I'd be able to assemble this myself (maybe!), but it would probably be really useful if there was a Vagrantfile I could run that would setup ds-host at a localhost:5050 URL for me to try out.We hit some weird issues with using .localhost, and it might make sense to make local.dropserver.org and .local.dropserver.org point to 127.0.0.1 so people could use http://local.dropserver.org:5050 and the wildcard DNS to still work. (I could use one of these that's already stood up for testing this, but if this was something you found useful or interesting, it would probably make sense to have a Dropserver-branded address.)