14 votes

Hosting my own Tildes

Is there a guide to hosting Tildes? The docs site has development setup but I couldn't get anywhere with that (not a Python developer)

16 comments

  1. clerical_terrors Link
    I would recommend against hosting unstable software in production, if you do not fully understand how it works. Because that's going to mean you won't be able to fix any kind of problem yourself....

    I would recommend against hosting unstable software in production, if you do not fully understand how it works. Because that's going to mean you won't be able to fix any kind of problem yourself. Remember that Tildes is in it's Alpha version (i.e. not stable nor feature complete) and despite it running surprisingly smoothly you can expect some level of technical troubles.

    21 votes
  2. [10]
    Comment deleted by author
    Link
    1. [9]
      haykam821 Link Parent
      I'm triyng to get an actual production environment so a few people can chat around in it.

      I'm triyng to get an actual production environment so a few people can chat around in it.

      4 votes
      1. [8]
        orangse Link Parent
        Not trying to be "that guy", but why not just use another piece of software designed for an end user? It would be way easier to just set up a server using Discord or a chatroom with Signal. Or...

        Not trying to be "that guy", but why not just use another piece of software designed for an end user? It would be way easier to just set up a server using Discord or a chatroom with Signal. Or even a private subreddit, if you need the link aggregation setup.

        10 votes
        1. [6]
          hungariantoast (edited ) Link Parent
          I'd recommend Discourse over all of those proprietary systems. Not only does it not require any sort of app or extra software, but it's free and open source software as well. Plus, if OP doesn't...

          I'd recommend Discourse over all of those proprietary systems. Not only does it not require any sort of app or extra software, but it's free and open source software as well.

          Plus, if OP doesn't want to self host, they have options for that.

          EDIT: Signal is free and open source software, and I'm a goof who can't use search engines. It can also be self hosted.

          20 votes
          1. [2]
            Crestwave Link Parent
            Isn't Signal also FOSS? You also don't need to self-host it, although it doesn't have a website client.

            Isn't Signal also FOSS? You also don't need to self-host it, although it doesn't have a website client.

            8 votes
            1. hungariantoast Link Parent
              Hm, it totally is. I actually looked it up when I wrote that comment just to make sure, but obviously didn't look close enough. I'll update my comment to reflect reality.

              Hm, it totally is. I actually looked it up when I wrote that comment just to make sure, but obviously didn't look close enough. I'll update my comment to reflect reality.

              4 votes
          2. [3]
            haykam821 Link Parent
            It doesn't have threaded comments from what I've seen.

            It doesn't have threaded comments from what I've seen.

            2 votes
            1. [2]
              Crestwave Link Parent
              Do you need nested comment threads like here or just one level? Mattermost has the latter.

              Do you need nested comment threads like here or just one level? Mattermost has the latter.

              7 votes
              1. haykam821 Link Parent
                I was looking for nested comment threads.

                I was looking for nested comment threads.

        2. haykam821 Link Parent
          Because that's not self-hosted.

          Because that's not self-hosted.

          2 votes
  3. [6]
    haykam821 Link
    I mentioned this to @Deimos as well but I never was able to find out how.

    I mentioned this to @Deimos as well but I never was able to find out how.

    2 votes
    1. [5]
      Amarok Link Parent
      Sometime I think we'll have a guide for how to build a Tildes site, but as it's still in alpha and all that info is in Deimos' head at the moment (and only there) I doubt it's high on the priority...

      Sometime I think we'll have a guide for how to build a Tildes site, but as it's still in alpha and all that info is in Deimos' head at the moment (and only there) I doubt it's high on the priority list for him.

      5 votes
      1. [4]
        Deimos (edited ) Link Parent
        No, I do actually have a document written up that's a list of everything that needs to be done to get it running on a fresh server. I could just paste it for you if you want, @haykam821, but I'd...

        No, I do actually have a document written up that's a list of everything that needs to be done to get it running on a fresh server. I could just paste it for you if you want, @haykam821, but I'd agree with the other people here that it's probably not a great idea if you're not quite experienced with administration-type tasks.

        I'm sure you'd be able to get it running, but it wouldn't be a complete list of everything you need to do to set up the server, and I don't have explanations for how to do a bunch of general administration tasks that you would need to.

        For example:

        • Are you familiar with how to secure a Linux server, including doing things like configuring user account permissions, firewall, etc.?
        • Are you familiar enough with SQL to be able to connect to the database, examine the tables and run update statements? The only way to do things like set a user as an admin is to connect to the database and run an UPDATE to give them the correct permissions.
        • Are you familiar with git to be able to add the site's repo as a remote, and know how to pull down the code, update it after I make future changes, etc.?
        • If a service fails to launch or crashes for some reason, do you know to use systemd to figure out what's wrong and restart it?

        (There's certainly more than that too, the overall point is that it's very much not a "turnkey" system)

        17 votes
        1. [3]
          hungariantoast Link Parent
          If you wouldn't mind sharing it, I'd love to see it. Some of the administration tasks you mentioned are things I've never done, but it sounds like an excellent opportunity to learn. Plus, I too...

          If you wouldn't mind sharing it, I'd love to see it. Some of the administration tasks you mentioned are things I've never done, but it sounds like an excellent opportunity to learn.

          Plus, I too have kind of, sorta, maybe thought about the idea of using a fork of Tildes for a discussion forum about a specific subject, like a video game that I've always wanted to make.

          7 votes
          1. Deimos (edited ) Link Parent
            Here's what's in the document. As I said, these should be most of the steps to solely get Tildes to work on a fresh Ubuntu 16.04 server, but doesn't cover all the other things like setting up...

            Here's what's in the document. As I said, these should be most of the steps to solely get Tildes to work on a fresh Ubuntu 16.04 server, but doesn't cover all the other things like setting up permissions correctly, ssh security, firewall, etc. Most are the actual commands to run, but comment lines (starting with #) are descriptions of something that needs to be done but not the specific commands to do it.

            adduser tildes
            usermod -aG sudo tildes
            
            # clone tildes and tildes-static-sites repos into /home/tildes
            
            sudo ln -s /home/tildes/tildes/tildes /opt/tildes
            
            sudo ln -s /home/tildes/tildes/salt/salt /srv/salt
            sudo ln -s /home/tildes/tildes/salt/pillar /srv/pillar
            
            sudo ln -s /home/tildes/tildes-static-sites/output /opt/tildes-static-sites
            
            sudo mkdir /etc/salt
            sudo cp /home/tildes/tildes/salt/minion /etc/salt/minion
            
            # edit /etc/salt/minion and change id to "prod"
            
            wget -O - https://repo.saltstack.com/apt/ubuntu/16.04/amd64/latest/SALTSTACK-GPG-KEY.pub | sudo apt-key add -
            echo 'deb http://repo.saltstack.com/apt/ubuntu/16.04/amd64/latest xenial main' | sudo tee /etc/apt/sources.list.d/saltstack.list
            sudo apt-get update
            sudo apt-get install salt-minion
            sudo systemctl stop salt-minion
            sudo systemctl disable salt-minion
            
            # copy /opt/tildes/production.ini.example to production.ini and replace placeholders
            
            sudo add-apt-repository ppa:certbot/certbot
            sudo apt-get update
            sudo apt-get install python-certbot-nginx
            
            sudo certbot certonly --manual -d tildes.net -d *.tildes.net -d tild.es -d *.tild.es --preferred-challenges dns-01 --server https://acme-v02.api.letsencrypt.org/directory
            
            sudo salt-call --local state.highstate
            

            And these are commands that usually need to be done after every time you pull down new code updates:

            sudo salt-call --local state.apply -l info
            alembic upgrade head
            sudo systemctl reload gunicorn.service
            
            12 votes
          2. Amarok Link Parent
            I'd like to see this. Part of the attraction of making Tildes open source is the satisfaction of seeing what uses others find for the code.

            I'd like to see this. Part of the attraction of making Tildes open source is the satisfaction of seeing what uses others find for the code.

            4 votes