Check out my first novel, midnight's simulacra!

Mastodon: Difference between revisions

From dankwiki
(Created page with "Setting up a Masotdon server on Debian is somewhat annoying, due to the node and (to a lesser extent) ruby-based implementation. Most guides involve downloading and instal...")
 
No edit summary
Line 4: Line 4:


==System work==
==System work==
* Via [[APT]], install <tt>nodejs</tt>, <tt>rake</tt>, <tt>rbenv</tt>, <tt>ruby-bundler</tt>, <tt>postgresql-contrib</tt>, and <tt>cmdtest</tt> ("yarn").
* Via [[APT]], install <tt>nodejs</tt>, <tt>redis-server</tt>, <tt>rake</tt>, <tt>rbenv</tt>, <tt>ruby-bundler</tt>, <tt>postgresql-contrib</tt>, <tt>libpq-dev</tt>, <tt>libprotobuf-dev</tt>, <tt>protobuf-compiler</tt>, <tt>libidn11-dev</tt>, and <tt>cmdtest</tt> ("yarn").
** You will now have a PostgreSQL instance running, if you didn't before.
** It will be listening to tcp/5432 on localhost only.
* Prep the database:
* Prep the database:
** <tt>echo "CREATE USER mastodon CREATEDB;" | sudo -u postgres psql</tt>
** <tt>echo "CREATE USER mastodon CREATEDB;" | sudo -u postgres psql</tt>
Line 12: Line 14:
==User work==
==User work==
Remaining work will be done as the <tt>mastodon</tt> user, in its home directory.
Remaining work will be done as the <tt>mastodon</tt> user, in its home directory.
* <tt>git clone https://github.com/tootsuite/mastodon.git ~/live</tt>
* <tt>cd live</tt>
* <tt>bundle config set --local deployment true</tt>
* <tt>bundle config set --local without development:test</tt>
* <tt>bundle install</tt>
* <tt>RAILS_ENV=production bundle exec rake mastodon:setup</tt>
** Use the same PostgreSQL user name you created earlier.
** So far as I can tell, use a blank password.

Revision as of 01:30, 10 January 2021

Setting up a Masotdon server on Debian is somewhat annoying, due to the node and (to a lesser extent) ruby-based implementation. Most guides involve downloading and installing a large number of sources outside of APT. I hoped to avoid that.

My running install uses the 3.2 branch of Mastodon atop Debian Unstable.

System work

  • Via APT, install nodejs, redis-server, rake, rbenv, ruby-bundler, postgresql-contrib, libpq-dev, libprotobuf-dev, protobuf-compiler, libidn11-dev, and cmdtest ("yarn").
    • You will now have a PostgreSQL instance running, if you didn't before.
    • It will be listening to tcp/5432 on localhost only.
  • Prep the database:
    • echo "CREATE USER mastodon CREATEDB;" | sudo -u postgres psql
  • Create mastodon user (salt to taste):
    • sudo adduser --disabled-login --gecos "Mastodon service account" mastodon

User work

Remaining work will be done as the mastodon user, in its home directory.

  • git clone https://github.com/tootsuite/mastodon.git ~/live
  • cd live
  • bundle config set --local deployment true
  • bundle config set --local without development:test
  • bundle install
  • RAILS_ENV=production bundle exec rake mastodon:setup
    • Use the same PostgreSQL user name you created earlier.
    • So far as I can tell, use a blank password.