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 cli to rotate key #2525

Merged
merged 2 commits into from
Nov 17, 2023
Merged

add cli to rotate key #2525

merged 2 commits into from
Nov 17, 2023

Conversation

dr-bonez
Copy link
Member

No description provided.

@dr-bonez
Copy link
Member Author

start9@dotted-hoof:~$ start-cli package install filebrowser # has no config
start9@dotted-hoof:~$ start-cli package start filebrowser
start9@dotted-hoof:~$ start-cli db dump | jq '.value["package-data"].filebrowser.installed["interface-addresses"]'
{
  "main": {
    "tor-address": "drpcowzromvgtlpijnsvkldltvjntxk7jxg6teciqzpuzdt4p6khhlid.onion",
    "lan-address": "drpcowzromvgtlpijnsvkldltvjntxk7jxg6teciqzpuzdt4p6khhlid.local"
  }
}
start9@dotted-hoof:~$ start-cli net tor list-services
+----------------------------------------------------------------+
| drpcowzromvgtlpijnsvkldltvjntxk7jxg6teciqzpuzdt4p6khhlid.onion |
+----------------------------------------------------------------+
start9@dotted-hoof:~$ start-cli net rotate-key filebrowser main
start9@dotted-hoof:~$ start-cli net tor list-services
+----------------------------------------------------------------+
| gkbsuclkul7bcnt7tkd45d7do2xukw4w7ixzxdhm7yhv3cdjujom3jyd.onion |
+----------------------------------------------------------------+
start9@dotted-hoof:~$ start-cli db dump | jq '.value["package-data"].filebrowser.installed["interface-addresses"]'
{
  "main": {
    "tor-address": "gkbsuclkul7bcnt7tkd45d7do2xukw4w7ixzxdhm7yhv3cdjujom3jyd.onion",
    "lan-address": "gkbsuclkul7bcnt7tkd45d7do2xukw4w7ixzxdhm7yhv3cdjujom3jyd.local"
  }
}
start9@dotted-hoof:~$ start-cli package install vaultwarden # has a config
start9@dotted-hoof:~$ start-cli db dump | jq '.value["package-data"].vaultwarden.installed.status.configured'
false
start9@dotted-hoof:~$ start-cli db dump | jq '.value["package-data"].vaultwarden.installed["interface-addresses"]'
{
  "main": {
    "tor-address": "fbqovthm52p76ad5eocbz4xhluqiz6tuo5lhdxtzhj3vkbcj726zocyd.onion",
    "lan-address": "fbqovthm52p76ad5eocbz4xhluqiz6tuo5lhdxtzhj3vkbcj726zocyd.local"
  }
}
start9@dotted-hoof:~$ start-cli net rotate-key vaultwarden main
start9@dotted-hoof:~$ start-cli db dump | jq '.value["package-data"].vaultwarden.installed.status.configured'
false
start9@dotted-hoof:~$ start-cli db dump | jq '.value["package-data"].vaultwarden.installed["interface-addresses"]'
{
  "main": {
    "tor-address": "c67qeh7qs6dvrr4ex62laynxa6mnr7r7nh6dygo44oz3q5fqww3lrvid.onion",
    "lan-address": "c67qeh7qs6dvrr4ex62laynxa6mnr7r7nh6dygo44oz3q5fqww3lrvid.local"
  }
}
start9@dotted-hoof:~$ echo null | start-cli package config vaultwarden set
start9@dotted-hoof:~$ start-cli package start vaultwarden
start9@dotted-hoof:~$ start-cli net tor list-services
+----------------------------------------------------------------+
| c67qeh7qs6dvrr4ex62laynxa6mnr7r7nh6dygo44oz3q5fqww3lrvid.onion |
+----------------------------------------------------------------+
start9@dotted-hoof:~$ start-cli db dump | jq '.value["package-data"].vaultwarden.installed.status.configured'
true
start9@dotted-hoof:~$ start-cli net rotate-key vaultwarden main
start9@dotted-hoof:~$ start-cli db dump | jq '.value["package-data"].vaultwarden.installed["interface-addresses"]'
{
  "main": {
    "tor-address": "n2usvx7g3x4r62clsos5mqfpqqqe6cru6nu2v4a6env467uzhvq4z3yd.onion",
    "lan-address": "n2usvx7g3x4r62clsos5mqfpqqqe6cru6nu2v4a6env467uzhvq4z3yd.local"
  }
}
start9@dotted-hoof:~$ start-cli net tor list-services
+----------------------------------------------------------------+
| n2usvx7g3x4r62clsos5mqfpqqqe6cru6nu2v4a6env467uzhvq4z3yd.onion |
+----------------------------------------------------------------+
start9@dotted-hoof:~$ start-cli net tor list-services
+----------------------------------------------------------------+
| iz75jqur3mjx4skoi3djv46qejnstu73brsdfyafuaf7ayt4fcr5izid.onion |
+----------------------------------------------------------------+
start9@dotted-hoof:~$ start-cli db dump | jq '.value["server-info"]["tor-address"]'
"https://iz75jqur3mjx4skoi3djv46qejnstu73brsdfyafuaf7ayt4fcr5izid.onion/"
start9@dotted-hoof:~$ start-cli net rotate-key
Server must be restarted for changes to take effect
start9@dotted-hoof:~$ start-cli db dump | jq '.value["server-info"]["tor-address"]'
"https://m7nh3lcemaw7sz2or5skgd7rbaslpz5kcli6fs2kr7bt23aa4xajwiad.onion/"
start9@dotted-hoof:~$ start-cli server restart
start9@dotted-hoof:~$ 
Broadcast message from root@start (Fri 2023-11-17 23:06:35 UTC):

The system will reboot now!

Connection to 192.168.122.166 closed by remote host.
Connection to 192.168.122.166 closed.
Warning: Permanently added '192.168.122.166' (ED25519) to the list of known hosts.

Welcome to

           ███████        
         █    █    █      
       █     █ █     █    
      █     █   █     █   
      █    █     █    █   
       █  █       █  █    
         █         █      
           ███████        

    _____     __ ___  __  __
   (_  |  /\ |__) |  /  \(_
   __) | /  \|  \ |  \__/__)
                            v0.3.5.1

   GNU/Linux (6.1.0-13-amd64 x86_64)
   Git Hash: d03aadb367f47422a4d42a6c19723dd301da462a

 * Documentation:  https://docs.start9.com
 * Management:     https://start.local
 * Support:        https://start9.com/contact
 * Source Code:    https://github.com/Start9Labs/start-os
 * License:        MIT

start9@start:~$ start-cli net tor list-services
+----------------------------------------------------------------+
| m7nh3lcemaw7sz2or5skgd7rbaslpz5kcli6fs2kr7bt23aa4xajwiad.onion |
+----------------------------------------------------------------+

@dr-bonez dr-bonez merged commit 8f23142 into next/patch Nov 17, 2023
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants