User:Kiara/Memo: Difference between revisions

From XPUB & Lens-Based wiki
 
(6 intermediate revisions by 2 users not shown)
Line 1: Line 1:
=Wiki pages I took part in=
[[SI25_Broadcast_1:_Soundmapping | SI25 Broadcast 1: Soundmapping]]<br>
[[SI25_Broadcast_7:_Improvisation | SI25 Broadcast 7: Improvisation]]<br>
[[SI25_Broadcast_8:_Lost_Music | SI25 Broadcast 8: Lost Music]]<br>
[[Lost_in_Narration | SI25 Project: Lost in Narration]]<br>
[[SI25:_Sounds_of_Making | SI25 Event: Sound of Making]]<br>
[[Special_Issue_25_to_print | SI25 Documentation: Print content]]<br>
[[Specific_Lens | SI26 Project: Specific Lens]]<br>
[[Hyperzine | SI26 Project: Supervisual Hyperzine]]<br>
[[XPUB_2024-2026_Survival_Guide | XPUB 2024-2026 Survival Guide]]<br>
[[Calendars:XPUB_2024-2026 | XPUB 2024-2026 Calendar]]<br>
[[Bookclub | Bookclub]]<br>
[[Alphabet_Soup | Alphabet Soup]]<br>
[[Anarchism | Anarchism (for Alphabet Soup)]]<br>
[[SER_documentation | SER Documentation]]<br>
[[Fediverse/Installation_documentation | Fediverse Documentation]]<br>
[[HTML + CSS | HTML + CSS]]<br>
[[HTML/CSS Memo | HTML/CSS Memo (workshop with Kim)]]<br>
[[SSH_proxy_jump | SSH Proxy Jump]]<br>
[[Affinity_on_Linux | Install Affinity on Linux systems]]<br>
=Using the plotters=
=Using the plotters=
Emulation is nice to save energy and prevent redundancy, you don't need a machine for every project because you can install that virtual machine on several systems. It is really convenient for testing purposes<br>
Emulation is nice to save energy and prevent redundancy, you don't need a machine for every project because you can install that virtual machine on several systems. It is really convenient for testing purposes<br>
Line 137: Line 161:


====Mastodon glitch-soc installation====
====Mastodon glitch-soc installation====
=====Install Mastodon as a software=====
This has been moved to [[Fediverse/Installation documentation]]!!
Following this [https://docs.joinmastodon.org/admin/install/#system-repositories Installation guide]<br>
'''This guide assumes a bunch of things are already installed, but if you don't have them on your system you will have to install them. We provide here additional guidance because we don't have anything installed.'''
In order to use the installation commands from the guide, we need to log into the root with <code>su</code> and then run the commands<br>
 
* '''After enabling corepack, the documentation doesn't say it but you should install yarn by just writing <code>yarn</code> in the terminal'''
 
'''<code>adduser</code> doesn't work? here's how to resolve it:<br>'''
Unhide the <code>adduser</code> command using the following command:
sudo update-alternatives --install /bin/adduser adduser /usr/sbin/adduser 20
 
Then run again
adduser --disabled-password mastodon
 
* To login into the mastodon account for the Setting up Mastodon step, use:
su mastodon
 
* Installing Ruby: all the commands should be ran one by one!!! - make sure to be in the mastodon user as indicated by the tutorial<br>
To resolve the problem about installing rbenv with jemalloc, we do:
exit # out of the mastodon user to go back to root
apt-get install libjemalloc-dev
su - mastodon
RUBY_CONFIGURE_OPTS='--with jemalloc' rbenv install 3.4.4
rbenv global 3.4.4
 
* Installing the last dependencies
Install bundler by running (in root)
apt install bundler
apt install gem
 
Then run the installation commands (in mastodon user):
bundle config deployment 'true'
bundle config without 'deployment test'
bundle install -j$(getconf _NPROCESSORS_ONLN)
yarn install
<!--
bundle init
cd
.bundle
nano config
 
In the config file, comment out the <code>BUNDLE_FROZEN=: "true"</code> by adding # in front of it
 
Install the rails gem with:
gem install rails -->
 
When this returns a "no such file or directory" error:
RAILS_ENV=production rails mastodon:setup
 
Navigate to the <code>live</code> folder and run:
bundle install
RAILS_ENV=production rails mastodon:setup
 
Setting it up<br>
PostGreSQL host: /var/run/postgresql<br>
PostGreSQL port: 5432<br>
Name of PostGreSQL db: mastodon_production<br>
Name of PostGreSQL user: mastodon<br>
Password for PostGreSQL user: <!-- xbup --><br>
Redis host: localhost<br>
Redis ports: 6379<br>
Redis password: [empty]<br>
Store on the cloud? No<br>
Send e-mails from localhost? No<br>
SMTP server: smtp.mailgun.org (to reconfigure later, leave the following SMTP prompts empty by hitting enter)<br>
Do you want Mastodon to periodically check for updates and notify you? Yes<br>
Save configuration? Yes<br>
Prepare database now? Yes<br>
Compile the assets now? Yes (we will go back to that later cause it logged errors)<br>
Create admin right away? Yes<br>
Username: admin<br>
E-mail: m.berends@hr.nl<br>
Temp password: 4d8f2b592bcf974140cd85d59ad78a56
 
Switch back to root!
systemctl restart mastodon*
 
* Acquiring an SSL certificate:
Use the example.com commands, they will be editable later, but you should already have a (sub)domain name registered.<br>
If encountering "An unexpected error" when trying to generate certificate, run
apt install python3-certbot-nginx
 
* Setting up nginx
If you get an error while running <code>systemctl restart nginx</code> to apply changes, ask Manetta for help
 
* Setting up systemd services
<code>$EDITOR</code> might not work, if that is the case, just replace it with <code>nano</code> or your preferred text editor
 
Finally, out of root:
sudo reboot now
 
Additional info:<br>
The git repo of Mastodon is in /home/mastodon/live<br>
To remove the "dubious ownership", we ran <code>git config --global --add safe.directory /home/mastodon/live/.git</code>
 
=====Add Glitch-Soc to the Mastodon installation=====
From this [https://glitch-soc.github.io/docs/ installation guide]
 
If you encounter the <code>HEAD detached</code> error, you can fix it with:
git branch #to check where you are
We went back is previous steps to make sure that Mastodon services are well running:
cd /etc/systemd/system
systemctl status mastodon-web
 
We saw that Mastodon is not running, so we went into the log file:
journalctl | grep mastodon-web
 
With that, we discovered that there is a problem around the ruby installation so we went back to the Mastodon installation guide, to [https://docs.joinmastodon.org/admin/install/#installing-ruby the ruby installation part] and re-ran the commands one by one. But that didn't solve it...
What we did to fix that is actually remove the <code>.rbenv</code> files and start again from the ruby installation.
 
mastodon-web is still not running: the xvm VPN IP address is blocked so we follow these steps:
cd mastodon/live
nano .env.production
at the end of the file, add the following lines:
RAILS_LOG_LEVEL=debug
LOG_LEVEL=silly
in the beginning:
LOCAL_DOMAIN=404.xpub.nl
WEB_DOMAIN=404.xpub.nl
systemctl restart mastodon*
 
Error logs from <code>/var/log/nginx/</code>:
 
<pre>
2025/06/02 16:40:42 [error] 19943#19943: *1355 connect() failed (111: Connection refused) while connecting to upstream, client: 10.0.0.1, server: 404.xpub.nl, request: "GET /favicon.ico HTTP/1.0", upstream: "http://127.0.0.1:3000/favicon.ico", host: "10.0.0.19", referrer: "https://404.xpub.nl/"
2025/06/02 16:40:42 [error] 19943#19943: *1355 connect() failed (111: Connection refused) while connecting to upstream, client: 10.0.0.1, server: 404.xpub.nl, request: "GET /favicon.ico HTTP/1.0", upstream: "http://127.0.0.1:3000/500.html", host: "10.0.0.19", referrer: "https://404.xpub.nl/"
</pre>
 
Error logs from <code>journalctl -u mastodon-web.service -f</code>:
 
<pre>
Jun 02 16:46:46 debby bundle[22928]: E, [2025-06-02T16:46:46.036606 #22928] ERROR -- : [ActionDispatch::HostAuthorization::DefaultResponseApp] Blocked hosts: 10.0.0.19
</pre>
 
We got further here...
 
We added the ip address 10.0.0.19 to "allow hosts" in the ruby config file, which we found with this command:
 
find . -iname production.rb
 
and then opened:
 
  nano /home/mastodon/live/config/environments/production.rb
 
This caused another error: it started to redirect http://10.0.0.19 to https://10.0.0.19.
 
To solve this... we figured out that we need to LIE to mastodon... Michael found this great blog post that explained it: https://blog.vyvojari.dev/mastodon-behind-a-reverse-proxy-without-ssl-https/
 
We changed the nginx config:
 
nano /etc/nginx/sites-enabled/mastodon
 
and changed this line in <code>location @proxy</code>:
 
#proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Forwarded-Proto https; # the lie is right here (!!!! we love it, sometimes you need to lie)
 
This resolved the redirect error!!
 
Then, we restarted nginx and mastodon... and:
 
NEXT ERROR
 
An error popped up in the journalctl:
 
journalctl -u mastodon-web -f
 
Which listed the error about the assets package not being able to download.


==Putting a server online==
==Putting a server online==

Latest revision as of 15:40, 1 October 2025

Wiki pages I took part in

SI25 Broadcast 1: Soundmapping
SI25 Broadcast 7: Improvisation
SI25 Broadcast 8: Lost Music
SI25 Project: Lost in Narration
SI25 Event: Sound of Making
SI25 Documentation: Print content

SI26 Project: Specific Lens
SI26 Project: Supervisual Hyperzine

XPUB 2024-2026 Survival Guide
XPUB 2024-2026 Calendar
Bookclub
Alphabet Soup
Anarchism (for Alphabet Soup)

SER Documentation
Fediverse Documentation
HTML + CSS
HTML/CSS Memo (workshop with Kim)
SSH Proxy Jump
Install Affinity on Linux systems

Using the plotters

Emulation is nice to save energy and prevent redundancy, you don't need a machine for every project because you can install that virtual machine on several systems. It is really convenient for testing purposes

-------------------------------
Get a virtual machine
-------------------------------

  • Install virtualbox
  • Create a New virtual machine
    • Give it a name and choose a folder to install the virtual machine in
    • ISO image = the Linux distro you want (look for it on distrowatch)
      • Debian: get it from debian.org > download > amd64.iso (arm64 for newest Macs)
      • Type is Linux
      • Subtype corresponds to the one chosen (Debian)
      • Version is the version of Debian
    • Set username and password
    • Choose the settings for system capacity and memory usage
    • Finish

-------------------------------
Get a graphical interface
-------------------------------

su
//enter password
apt install kde-plasma-desktop

-------------------------------
Print with pen plotters
-------------------------------

  • Install python
su
//enter password
apt install python3.12-venv //or python3.11-venv
  • Run venv
python3 -m venv
source bin/activate
  • Install chiplotle
pip install chiplotle3
  • Run chiplotle
chiplotle3
  • Config file
  • Print!

-------------------------------
Cowsay fortune telling
-------------------------------

Cowsay-fortune.png
Cowsay-fortune-plotter.jpg
sudo apt install cowsay
sudo apt install fortune
fortune | cowsay

To check the animal/character options of cowsay:

cowsay -l

Print cowsay fortune prompts into a txt file so you can save them, choose from them and copy/paste them elswhere (such as inkscape to print them with the plotters <3)

fortune | cowsay -f duck >> cowsay-fortunes.txt









Server

Installing Virtual Box

Virtual Box runs a virtual machine on a computer and allows to install and run a Linux distro.

To install it:

  • Download Virtual Box https://www.virtualbox.org/wiki/Downloads
  • Get the iso image of Debian https://www.debian.org/distrib/
  • Set up the virtual machine using the "New" button (in Virtual Box)
  • Follow the debian steps of configuration
    • domain name: leave empty
    • password: choose a password to log in you user
    • if it installs GNOME as Graphic User Interface by default and you don't like it, I recommend KDE Plasma that you can install by running the following commands:
su -
#enter your password
nano /etc/group
#look for sudo and add your username at the end of the line
exit
#log out and log in again, reopen the terminal and type:
sudo apt install kde-plasma-desktop

Then you can follow the steps from this website

Run a web server on the virtual machine

sudo apt install nginx php 8.2

Install a CMS

cd /var/www/html/
sudo wget https://github.com/flatpressblog/flatpress/archive/1.3.1.zip
sudo unzip 1.3.1.zip
sudo systemctl stop nginx
sudo apt install apache2
sudo systemctl apache2

In the browser: localhost/blog

cd blog
sudo chmod a+w fp-content/

MEMO FOR FLATPRESS
username: kiara
e-mail: hello@kajoudesign.eu


~~~~~~~~~~~~~~~~~~~~~~~~

If you wish to run a personal server on a Linux machine (not virtual): When installing Linux, in the "software selection (gui)" window, pick:

  • web server
  • ssh server
  • standard system utilities

After installation complete, remove usb stick and wait to be prompted the username and password

Installation: mastodon instance

SSH to Debby

ssh xpub@145.24.152.64 //the hub IP is 10.0.0.19
enter password

Jump user

get your jump.pub ssh key from your local .ssh folder
paste the key into /.ssh/authorized_keys on Debby
add also your own personal .pub ssh key (not linked to cerealbox) in the same file

Edit the ssh config file

In your local .ssh folder, open the config file and duplicate the last cerealbox entry, then update information for Debby as follows:

Host debby
Hostname 10.0.0.19
User xpub
ProxyJump xvm_jump
Identityfile ~/.ssh/id_rsa [this last part should be the name of your personal ssh key file, mine is id_rsa but yours might be different]

for the local address:

Host debby_local
Hostname 145.24.152.64
User xpub
Identityfile ~/.ssh/id_rsa
Packages installed
  • tmux

Launch tmux:

one writes tmux new
others write tmux attach

Mastodon glitch-soc installation

This has been moved to Fediverse/Installation documentation!!

Putting a server online

Do some Port Forwarding from the router's administration page to serve all internet traffic on the port 80 (for http) or 443 (https).
If you move out, the IP address changes so you have to update it in the DNS Zone...

To access you server's DNS Zone:

this is done from your registrar's admin panel

Subdomains

They can have their own CNAME record


RSS Feed

template.rss

To write an RSS feed manually

<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0">
   <channel>
      <title>The Title</title>
      <link>The link to your rss feed</link>
      <description>Your description goes here</description>
      
      <item>
        <title>Item Title</title>
        <description>Item description</description>
        <link></link>
        <pubDate>Wed, 25 May 2025 12:00:00 GMT</pubDate>
      </item>
   </channel>
</rss>

Generate an RSS feed for a handmade website

Put the URL of the website in https://rss-bridge.org/
Add a <a> tag in your website redirecting to the feed generated by the bridge website

Declaring fees to get a refund from HR

🤫🤫🤫🤫🤫