New microblogging Mastodon

Just curious, is there a reason why not using the latest version v2.12.2?

Is there a reason Mastodon has to use nginx rather than Apache as the reverse proxy?

The oldstable centos apache used in Neth doesn’t support the HTTP/2 module that is required for mastodon. I’m afraid that an upgrade isn’t easily possible but I didn’t test it yet.

1 Like

I guess because of copy/paste from older howtos, the latest version should work too.

Thanks for the wiki entry. In my tests I didn’t need to create a database user manually but I just used the defaults (postgres user, postgres db with a password given at the setup)

2 Likes

For that is simply easy (testing) or is the postgreSQL instance and db confined to be used by only by Mastodon Docker setup?

Yes, postgresql runs in a docker container so it’s just used by Mastodon.

2 Likes

ps. I changed it to this:
/download/v2.12.2/docker-compose-linux-$(uname -m)

for the naming convention of the git repo changed to use lower case ‘linux’ and uname -s only returns ‘Linux’ (Capitalized L).

1 Like

I’ve cleaned up some formatting on the wiki page–added a few headings and formatted tables for the setup wizard. But I’m noticing that the container names I’d given above–mastodon_db_1 and mastodon_redis_1–have changed and they’re now mastodon-db-1 and mastodon-redis-1 respectively. I assume this is due to the newer docker-compose version; I’ve updated this in the wiki as well. But with those changes, it’s working for me, at least to the point of being to log in as admin.

2 Likes

You’re right, they replaced the underscore with a dash in v2.8:

1 Like

Maybe I am not understanding correctly, but does this mean that Apache is disabled, thus the Nethserver webserver?

Yes, unfortunately.
The reverse proxy works with the SCL package httpd24-httpd but not with the used older httpd package and it needs the default ports.

1 Like

News OT -
According to the italian online newspaper “ilPost”, Mastodon is gaining quite traction after Mr PayPal started to mess around with his new toy, the blue bird.
There are issue related to registration on Mastodon instances, which is going timeout. Currently the user number is about 15k (not detailed if it’s about an instance, a nation, or the world), three times April value (5k).
OT Off.

1 Like

@pike

CNN reported the same:

My 2 cents
Andy

1 Like

Yep, Mastodon is drawing a LOT of attention today. But I think one is intrigued by the idea of a real federated system opposed to a closed vendor ecosystem.

So the current Twitter actualities are a good thing for the awareness of the general public. For as how long it will last for history shows that our collective memory is very short lived.

The moment a new ‘gems and perls’ toy shows up, we tend to sell our souls (privacy and data) in a blink of an eye again.

Sorry for going out of track…
If Mr PayPal make the blue bird crash, a federated system won’t have in the future the same traction that bluebird had to few days ago.
No company or person which would love a public recognition and PR capability can ignore now the bluebird. But without some degree of certainty about:

  • storm management
  • recognizability
  • identification

no company is going to considered interesting that federation. And no company is going to buy space on that market, allowing growth and economical sustainability.
I cannot say if its good or bad but…

If you’re debating in a world level plaza, reachable for anyone which can search for you, terms, hashtags, the crowd can be huge.
If youre debating even in NYC ad Central Park Speaker’s corner, maybe only the persons at the park will know. Unless debate is relayed into some bigger plaza

Is this a feasible thing to do on Nethserver atm, and leaving existing webserver functionality in tact, or do the defaults port requirements come into play?

Yes, Mastodon requires the default HTTPS port which is the real problem because Neth httpd requires the same port but doesn’t support proxying.
I tried httpd24-httpd from SCL and it worked for Mastodon but I found no easy way to migrate, the new conf dir is /opt/rh/httpd24/root/etc/httpd/conf.d/ but just linking or copying files did not work in all cases, I got blank pages.

2 Likes

Hey guys,

Currently run my own nethserver and decided to look into Mastodon with all the twitter fiasco going on. I wanted to try hosting my own behind neth but , i’ve been bumping into some problems. I have built from source using their installation guide but now i hit a road block.

It seems that whenever i try to access my instance, i keep getting a “access to my.domain.tld was denied”. The logs from mastodon show that it says “Blocked Host: my.domain.tld” . According to this github ticket in their repo the error seems to be related to either the ENV file or my reverse proxy config.

My Env has the domains set to “my.domain.tld”, and I even looked at the wiki link as a reference point but I can’t seem to quite figure out whats up.

What I am doing different is simply, using the neth webserver application to create a reverse proxy to the mastodon box. I have the reverse proxy created and it points to port 8080 which i have the nginx server listening on , to access my mastodon.

The mastodon box has the following nginx config.

map $http_upgrade $connection_upgrade {
          default upgrade;
            ''    close;
}

server {
        listen 8080;
        listen [::]:8080;
        server_name my.domain.tld;
        root /home/mastodon/live/public;
        # Useful for Let's Encrypt
        #location /.well-known/acme-challenge/ { allow all; }
        #location / { return 301 https://$host$request_uri; }

        keepalive_timeout    70;
        sendfile             on;
        client_max_body_size 0;


        gzip on;
        gzip_disable "msie6";
        gzip_vary on;
        gzip_proxied any;
        gzip_comp_level 6;
        gzip_buffers 16 8k;
        gzip_http_version 1.1;
        gzip_types text/plain text/css application/json application/javascript text/xml application/xml application/xml+rss text/javascript;

        add_header Strict-Transport-Security "max-age=31536000";

        location / {
             
          proxy_set_header Host $host;
          proxy_set_header X-Real-IP $remote_addr;
          proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
          proxy_set_header X-Forwarded-Proto https;
          proxy_set_header Proxy "";
          proxy_pass_header Server;

          proxy_pass http://127.0.0.1:3000;
          proxy_buffering off;
          proxy_redirect off;
          proxy_http_version 1.1;
          proxy_set_header Upgrade $http_upgrade;
          proxy_set_header Connection $connection_upgrade;


        }

        location ~ ^/(emoji|packs|system/accounts/avatars|system/media_attachments/files) {
          add_header Cache-Control "public, max-age=31536000, immutable";
          try_files $uri @proxy;
        }

       ...

I can add more but I do not wish to make too large of a post. Was wondering if anyone here has any ideas?

Any pointers would be appreciated.

Hi and welcome to NethServer Community,

I tried the docker install and the apache reverse proxy didn’t work at all:

2 Likes

It would be interesting to test it on NS8 too… NethForge 8 is open!

4 Likes