Cloudron makes it easy to run web apps like WordPress, Nextcloud, GitLab on your server. Find out more or install now.


  • Categories
  • Recent
  • Tags
  • Popular
  • Bookmarks
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse

Cloudron Forum

Apps | Demo | Docs | Install

Changing root account email in fresh Discourse install

Scheduled Pinned Locked Moved Solved Discourse
discourse
9 Posts 6 Posters 581 Views
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • CaptainCalliopeC Offline
    CaptainCalliopeC Offline
    CaptainCalliope
    wrote on last edited by girish
    #1

    Hiya! I just installed Discourse, and am trying to change my root user's email and password. However I first need to change it from root@cloudron.local to a mailbox I actually can access.

    I found these instructions in the Cloudron docs but when I follow the "Changing root account email" directions, the second command

    irb(main):001:0> u = User.find_by_username("root")
    

    gives me this error

    bash: syntax error near unexpected token `main'
    

    Am I doing something wrong? Are the directions wrong? Is there something I might have done in the cloudron dashboard that changes the command I need to use? Halp! πŸ™€

    1 Reply Last reply
    0
  • girishG Offline
    girishG Offline
    girish Staff
    wrote on last edited by
    #2

    I tried this now in a fresh install and it seems to work.

    Please note that you are supposed to run the commands in the app's web terminal (i.e Click the gear button in the cloudron dashboard app -> Console -> Terminal). And then you must put in sudo -E -u cloudron bundle exec script/rails console in the shell. Like below:

    5c71c01d-4b8e-449d-9708-c46e356a4a04-image.png

    A 1 Reply Last reply
    1
  • A Offline
    A Offline
    arpad
    replied to girish on last edited by
    #3

    @girish
    When I run sudo -E -u cloudron bundle exec script/rails console from the Web terminal, I get the following error (fresh Discourse installation):

     `/root` is not writable.
    Bundler will use `/tmp/bundler20210630-751-12unu01751' as your home directory temporarily.
    Loading production environment (Rails 6.1.3.2)
    bundler: failed to load command: script/rails (script/rails)
    Traceback (most recent call last):
            50: from /usr/local/bin/bundle:23:in `<main>'
            49: from /usr/local/bin/bundle:23:in `load'
            48: from /usr/local/lib/ruby/gems/2.7.0/gems/bundler-2.2.20/exe/bundle:37:in `<top (required)>'
            47: from /usr/local/lib/ruby/gems/2.7.0/gems/bundler-2.2.20/lib/bundler/friendly_errors.rb:128:in `with_friendly_errors'
            46: from /usr/local/lib/ruby/gems/2.7.0/gems/bundler-2.2.20/exe/bundle:49:in `block in <top (required)>'
            45: from /usr/local/lib/ruby/gems/2.7.0/gems/bundler-2.2.20/lib/bundler/cli.rb:24:in `start'
            44: from /usr/local/lib/ruby/gems/2.7.0/gems/bundler-2.2.20/lib/bundler/vendor/thor/lib/thor/base.rb:485:in `start'
            43: from /usr/local/lib/ruby/gems/2.7.0/gems/bundler-2.2.20/lib/bundler/cli.rb:30:in `dispatch'
            42: from /usr/local/lib/ruby/gems/2.7.0/gems/bundler-2.2.20/lib/bundler/vendor/thor/lib/thor.rb:392:in `dispatch'
            41: from /usr/local/lib/ruby/gems/2.7.0/gems/bundler-2.2.20/lib/bundler/vendor/thor/lib/thor/invocation.rb:127:in `invoke_command'
            40: from /usr/local/lib/ruby/gems/2.7.0/gems/bundler-2.2.20/lib/bundler/vendor/thor/lib/thor/command.rb:27:in `run'
            39: from /usr/local/lib/ruby/gems/2.7.0/gems/bundler-2.2.20/lib/bundler/cli.rb:474:in `exec'
            38: from /usr/local/lib/ruby/gems/2.7.0/gems/bundler-2.2.20/lib/bundler/cli/exec.rb:28:in `run'
            37: from /usr/local/lib/ruby/gems/2.7.0/gems/bundler-2.2.20/lib/bundler/cli/exec.rb:63:in `kernel_load'
            36: from /usr/local/lib/ruby/gems/2.7.0/gems/bundler-2.2.20/lib/bundler/cli/exec.rb:63:in `load'
            35: from script/rails:8:in `<top (required)>'
            34: from /app/code/vendor/bundle/ruby/2.7.0/gems/bootsnap-1.7.5/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:31:in `require'
            33: from /app/code/vendor/bundle/ruby/2.7.0/gems/bootsnap-1.7.5/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:22:in `require_with_bootsnap_lfi'
            32: from /app/code/vendor/bundle/ruby/2.7.0/gems/bootsnap-1.7.5/lib/bootsnap/load_path_cache/loaded_features_index.rb:92:in `register'
            31: from /app/code/vendor/bundle/ruby/2.7.0/gems/bootsnap-1.7.5/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in `block in require_with_bootsnap_lfi'
            30: from /app/code/vendor/bundle/ruby/2.7.0/gems/bootsnap-1.7.5/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in `require'
            29: from /app/code/vendor/bundle/ruby/2.7.0/gems/railties-6.1.3.2/lib/rails/commands.rb:18:in `<main>'
            28: from /app/code/vendor/bundle/ruby/2.7.0/gems/railties-6.1.3.2/lib/rails/command.rb:50:in `invoke'
            27: from /app/code/vendor/bundle/ruby/2.7.0/gems/railties-6.1.3.2/lib/rails/command/base.rb:69:in `perform'
            26: from /app/code/vendor/bundle/ruby/2.7.0/gems/thor-1.1.0/lib/thor.rb:392:in `dispatch'
            25: from /app/code/vendor/bundle/ruby/2.7.0/gems/thor-1.1.0/lib/thor/invocation.rb:127:in `invoke_command'
            24: from /app/code/vendor/bundle/ruby/2.7.0/gems/thor-1.1.0/lib/thor/command.rb:27:in `run'
            23: from /app/code/vendor/bundle/ruby/2.7.0/gems/railties-6.1.3.2/lib/rails/commands/console/console_command.rb:102:in `perform'
            22: from /app/code/vendor/bundle/ruby/2.7.0/gems/railties-6.1.3.2/lib/rails/commands/console/console_command.rb:19:in `start'
            21: from /app/code/vendor/bundle/ruby/2.7.0/gems/railties-6.1.3.2/lib/rails/commands/console/console_command.rb:70:in `start'
            20: from /usr/local/lib/ruby/2.7.0/irb.rb:400:in `start'
            19: from /usr/local/lib/ruby/2.7.0/irb.rb:471:in `run'
            18: from /usr/local/lib/ruby/2.7.0/irb.rb:471:in `catch'
            17: from /usr/local/lib/ruby/2.7.0/irb.rb:472:in `block in run'
            16: from /usr/local/lib/ruby/2.7.0/irb.rb:537:in `eval_input'
            15: from /usr/local/lib/ruby/2.7.0/irb/ruby-lex.rb:150:in `each_top_level_statement'
            14: from /usr/local/lib/ruby/2.7.0/irb/ruby-lex.rb:150:in `catch'
            13: from /usr/local/lib/ruby/2.7.0/irb/ruby-lex.rb:151:in `block in each_top_level_statement'
            12: from /usr/local/lib/ruby/2.7.0/irb/ruby-lex.rb:151:in `loop'
            11: from /usr/local/lib/ruby/2.7.0/irb/ruby-lex.rb:154:in `block (2 levels) in each_top_level_statement'
            10: from /usr/local/lib/ruby/2.7.0/irb/ruby-lex.rb:182:in `lex'
             9: from /usr/local/lib/ruby/2.7.0/irb.rb:518:in `block in eval_input'
             8: from /usr/local/lib/ruby/2.7.0/irb.rb:704:in `signal_status'
             7: from /usr/local/lib/ruby/2.7.0/irb.rb:519:in `block (2 levels) in eval_input'
             6: from /usr/local/lib/ruby/2.7.0/irb/input-method.rb:294:in `gets'
             5: from /usr/local/lib/ruby/2.7.0/forwardable.rb:235:in `readmultiline'
             4: from /usr/local/lib/ruby/2.7.0/forwardable.rb:235:in `readmultiline'
             3: from /usr/local/lib/ruby/2.7.0/reline.rb:175:in `readmultiline'
             2: from /usr/local/lib/ruby/2.7.0/reline.rb:228:in `inner_readline'
             1: from /usr/local/lib/ruby/2.7.0/reline/config.rb:122:in `read'
    /usr/local/lib/ruby/2.7.0/reline/config.rb:122:in `readlines': Permission denied @ rb_sysopen - /root/.inputrc (Errno::EACCES)
            37: from /usr/local/bin/bundle:23:in `<main>'
            36: from /usr/local/bin/bundle:23:in `load'
            35: from /usr/local/lib/ruby/gems/2.7.0/gems/bundler-2.2.20/exe/bundle:37:in `<top (required)>'
            34: from /usr/local/lib/ruby/gems/2.7.0/gems/bundler-2.2.20/lib/bundler/friendly_errors.rb:128:in `with_friendly_errors'
            33: from /usr/local/lib/ruby/gems/2.7.0/gems/bundler-2.2.20/exe/bundle:49:in `block in <top (required)>'
            32: from /usr/local/lib/ruby/gems/2.7.0/gems/bundler-2.2.20/lib/bundler/cli.rb:24:in `start'
            31: from /usr/local/lib/ruby/gems/2.7.0/gems/bundler-2.2.20/lib/bundler/vendor/thor/lib/thor/base.rb:485:in `start'
            30: from /usr/local/lib/ruby/gems/2.7.0/gems/bundler-2.2.20/lib/bundler/cli.rb:30:in `dispatch'
            29: from /usr/local/lib/ruby/gems/2.7.0/gems/bundler-2.2.20/lib/bundler/vendor/thor/lib/thor.rb:392:in `dispatch'
            28: from /usr/local/lib/ruby/gems/2.7.0/gems/bundler-2.2.20/lib/bundler/vendor/thor/lib/thor/invocation.rb:127:in `invoke_command'
            27: from /usr/local/lib/ruby/gems/2.7.0/gems/bundler-2.2.20/lib/bundler/vendor/thor/lib/thor/command.rb:27:in `run'
            26: from /usr/local/lib/ruby/gems/2.7.0/gems/bundler-2.2.20/lib/bundler/cli.rb:474:in `exec'
            25: from /usr/local/lib/ruby/gems/2.7.0/gems/bundler-2.2.20/lib/bundler/cli/exec.rb:28:in `run'
            24: from /usr/local/lib/ruby/gems/2.7.0/gems/bundler-2.2.20/lib/bundler/cli/exec.rb:63:in `kernel_load'
            23: from /usr/local/lib/ruby/gems/2.7.0/gems/bundler-2.2.20/lib/bundler/cli/exec.rb:63:in `load'
            22: from script/rails:8:in `<top (required)>'
            21: from /app/code/vendor/bundle/ruby/2.7.0/gems/bootsnap-1.7.5/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:31:in `require'
            20: from /app/code/vendor/bundle/ruby/2.7.0/gems/bootsnap-1.7.5/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:22:in `require_with_bootsnap_lfi'
            19: from /app/code/vendor/bundle/ruby/2.7.0/gems/bootsnap-1.7.5/lib/bootsnap/load_path_cache/loaded_features_index.rb:92:in `register'
            18: from /app/code/vendor/bundle/ruby/2.7.0/gems/bootsnap-1.7.5/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in `block in require_with_bootsnap_lfi'
            17: from /app/code/vendor/bundle/ruby/2.7.0/gems/bootsnap-1.7.5/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in `require'
            16: from /app/code/vendor/bundle/ruby/2.7.0/gems/railties-6.1.3.2/lib/rails/commands.rb:18:in `<main>'
            15: from /app/code/vendor/bundle/ruby/2.7.0/gems/railties-6.1.3.2/lib/rails/command.rb:50:in `invoke'
            14: from /app/code/vendor/bundle/ruby/2.7.0/gems/railties-6.1.3.2/lib/rails/command/base.rb:69:in `perform'
            13: from /app/code/vendor/bundle/ruby/2.7.0/gems/thor-1.1.0/lib/thor.rb:392:in `dispatch'
            12: from /app/code/vendor/bundle/ruby/2.7.0/gems/thor-1.1.0/lib/thor/invocation.rb:127:in `invoke_command'
            11: from /app/code/vendor/bundle/ruby/2.7.0/gems/thor-1.1.0/lib/thor/command.rb:27:in `run'
            10: from /app/code/vendor/bundle/ruby/2.7.0/gems/railties-6.1.3.2/lib/rails/commands/console/console_command.rb:102:in `perform'
             9: from /app/code/vendor/bundle/ruby/2.7.0/gems/railties-6.1.3.2/lib/rails/commands/console/console_command.rb:19:in `start'
             8: from /app/code/vendor/bundle/ruby/2.7.0/gems/railties-6.1.3.2/lib/rails/commands/console/console_command.rb:70:in `start'
             7: from /usr/local/lib/ruby/2.7.0/irb.rb:400:in `start'
             6: from /usr/local/lib/ruby/2.7.0/irb.rb:475:in `run'
             5: from /usr/local/lib/ruby/2.7.0/irb.rb:475:in `ensure in run'
             4: from /usr/local/lib/ruby/2.7.0/irb.rb:475:in `each'
             3: from /usr/local/lib/ruby/2.7.0/irb.rb:475:in `block in run'
             2: from /usr/local/lib/ruby/2.7.0/irb/ext/save-history.rb:60:in `block in extended'
             1: from /usr/local/lib/ruby/2.7.0/irb/ext/save-history.rb:98:in `save_history'
    /usr/local/lib/ruby/2.7.0/irb/ext/save-history.rb:98:in `stat': Permission denied @ rb_file_s_stat - /root/.irb_history (Errno::EACCES)
    
    

    Do you have any suggestion?

    scookeS girishG 2 Replies Last reply
    0
  • scookeS Offline
    scookeS Offline
    scooke
    replied to arpad on last edited by
    #4

    @arpad said in Changing root account email in fresh Discourse install:

    sudo -E -u cloudron bundle exec script/rails console

    I just helped someone with a similar problem. I installed Discourse just to see what is happening, and I found that I had to change the user in that command from β€˜cloudron’ to β€˜root’ ->

    sudo -E -u root bundle exec script/rails console

    That seems like a significant change though.

    A life lived in fear is a life half-lived

    bmannB A alkomyA 3 Replies Last reply
    1
  • girishG Offline
    girishG Offline
    girish Staff
    replied to arpad on last edited by
    #5

    @arpad thanks for reporting, I can reproduce this. Trying to debug what the issue is. I can also confirm that what @scooke said works but I am trying to get to the bottom of why use cloudron user does not work.

    1 Reply Last reply
    2
  • bmannB Offline
    bmannB Offline
    bmann
    replied to scooke on last edited by
    #6

    @scooke Thanks for this, I had the same issue, running it with root worked

    1 Reply Last reply
    1
  • A Offline
    A Offline
    arpad
    replied to scooke on last edited by
    #7

    @scooke Thanks a lot! The problem is solved.

    1 Reply Last reply
    1
  • alkomyA Offline
    alkomyA Offline
    alkomy
    wrote on last edited by
    #8

    Same error here

    1 Reply Last reply
    0
  • alkomyA Offline
    alkomyA Offline
    alkomy
    replied to scooke on last edited by
    #9

    @scooke said in Changing root account email in fresh Discourse install:

    sudo -E -u root bundle exec script/rails console

    Thanks, it solved the issue πŸ‘

    1 Reply Last reply
    1

  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • Categories
  • Recent
  • Tags
  • Popular
  • Bookmarks
  • Login

  • Don't have an account? Register

  • Login or register to search.