Hey, all.

Is it possible to skip this ‘register your server’ step when creating a self-hosted Rocketchat instance? I just don’t want to, ya know? Regular websearching is just giving a lot about how to disable user registration rather than skipping the server registration with Rocketchat HQ.

  • Jabbermuggel@discuss.tchncs.de
    link
    fedilink
    English
    arrow-up
    2
    ·
    1 year ago

    Yes, it’s possible but this is not documented anywhere official from what I could tell

    I found the following in a github issue comment chain: Assuming you have a container based deployment (which if you don’t have, you should probably get), you can set the environment variable OVERWRITE_SETTING_Show_Setup_Wizard=completed to skip the registration. As far as I can tell this still works with the current rocketchat versions. A small additional complexity is that you then can’t create your first admin user. This can be fixed by also setting other environment variables which create an administrator if no other admins are found on start:

        OVERWRITE_SETTING_Show_Setup_Wizard=completed
        ADMIN_USERNAME=example
        ADMIN_PASS=example
        ADMIN_EMAIL=example@localhost
        INITAL_USER=yes
    

    The alternative is to register a user and then do some raw database manipulation as documented here and promote the new user; for this you need the mongosh shell in the mongodb container (i. e. something like docker exec -it mongodb mongosh):

    use rocketchat                                                                  // switch to rocketchat db
    
    db.getCollection('users').find()                                                // list users
    db.users.update({username: "test"}, { $push: { roles: "admin"}})       // make user admin
    db.users.update({username: "test"}, { $pull: { roles: "admin"}})       // remove admin role from user
    

    As another user mentioned, the alternative is to deploy older versions and then upgrade. Old container images are available under registry.rocket.chat/rocketchat/rocket.chat:$ver. Versions as recent as 4.4.0 still allow setup without cloud registration. You just need to be a bit careful in the upgrade, as you need to do several smaller steps to reach the current version, so from 4.4.0 to the most recent 6.x would for example be:

    4.4.0 -> latest 4.x -> 5.0 -> latest 5.x -> 6.0 -> latest version
    

    (make backups of your db though with mongodump)

    In my opinion, rocketchat has an easier deployment compared to matrix (only two containers, three if counting the reverse proxy), but the recent pushiness of the company with their paid services (the seemingly disabled registration, giant advertisements in the settings and most recently the forced depreciation of older instances for their official apps among other things) really makes me question whether that somewhat decreased complexity makes it worth investing time and effort into such a product.