close
  • edit rss_feed

    Timothée Jaussoin’s feed

    Please talk with me before sending me an invitation :) If you have any questions about Movim, XMPP or something related, please ask it in the official chatroom : movim@conference.movim.eu. If you have any questions about the state of the environment and the climate change, please ask yourself what you can do.

    Blog



  • reply chevron_right

    RPi4: Installing Movim

    A little bit of history... My RPi4 already has an XMPP server running with Prosody, an everything is running great. But I wanted more functionality and Movim seemed to be a great fit. Pretty interface, great place for news feeds, and even has blogging included. Neat! As usual with my RPi4 I have to build my own images due to its ARM architecture, but that did not quite work with Movim. It loaded, but was unstable and many things did not work. I had a hunch it was something with the database, and many eons ago I had read something about bad Postgres performance or something when running in 32-bit mode… anyway, luckily Postgres has an image for both armhf (32-bit, default for RPi4) and arm64v8 (64-bit) architectures, so would be quite easy to test as long as Docker supported running arm64v8 in the RPi4 on Raspbian. Last time I looked it did not work, maybe something changed since then? Enabling 64-bit support And it did! Someone discovered how to run and build the 64-bit images that I needed, I described how to do it here in my other blog post here. After configuring Docker to run 64-bit images, it was quite easy afterwards. I tested Postgres in 64-bit mode and Movim in 32-bit mode, almost everything was working! But some cards were not showing… By looking at Movim's output I saw the following message: Warning: unpack(): 64-bit format codes are not available for 32-bit versions of PHP in /var/www/html/vendor/ratchet/rfc6455/src/Messaging/MessageBuffer.php on line 122 Uhm… So let's make everything 64-bit! And so I did, and now everything is working as they should :) And finally... Building the image Clone Movim Docker repository with git somewhere: git clone https://github.com/movim/movim_docker Edit the file Dockerfile inside the repository as follows: -FROM php:7.3-fpm +FROM arm64v8/php:7.3-fpm Run sudo docker build --no-cache --pull --rm=true -t movim/movim:latest . Done! You can now run your own Movim pod with this image :) Here is a docker-compose.yml file based on my own for those interested: version: '3.6' services: movim: restart: unless-stopped environment: MOVIM_ADMIN: admin MOVIM_PASSWORD: CHANGEME MOVIM_DOMAIN: https://YOURMOVIM.DOMAIN MOVIM_PORT: 8080 MOVIM_INTERFACE: 0.0.0.0 POSTGRES_DB: movim POSTGRES_HOST: postgresql POSTGRES_PORT: 5432 POSTGRES_USER: movim POSTGRES_PASSWORD: CHANGEME_POSTGRES image: movim/movim:latest volumes: - ./movim:/var/www/html:rw nginx: restart: unless-stopped image: arm64v8/nginx:mainline-alpine ports: - "443:443" volumes: - ./movim:/var/www/html:ro - ./nginx/conf.d:/etc/nginx/conf.d:ro - ./nginx/certs:/etc/ssl/certs/:ro postgresql: restart: unless-stopped environment: POSTGRES_DB: movim POSTGRES_PASSWORD: CHANGEME_POSTGRES POSTGRES_USER: movim image: arm64v8/postgres:11.4-alpine volumes: - ./postgres/data:/var/lib/postgresql/data:rw And config file for nginx: server { listen 443 ssl http2; listen [::]:443 ssl http2; server_name YOUR_SERVER.DOMAIN; ssl_certificate YOUR_SERVER.DOMAIN.crt; ssl_certificate_key YOUR_SERVER.DOMAIN.key; location / { alias /var/www/html/public/; index index.html index.htm index.php; add_header Access-Control-Allow-Origin *; location ~ \.php$ { fastcgi_pass movim:9000; fastcgi_index index.php; fastcgi_intercept_errors on; fastcgi_param SCRIPT_FILENAME $request_filename; include fastcgi_params; } location /ws/ { proxy_pass http://movim:8080/; proxy_http_version 1.1; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection "Upgrade"; proxy_set_header Host $http_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 $scheme; proxy_redirect off; } } error_page 500 502 503 504 /50x.html; location = /50x.html { root /usr/share/nginx/html; } } I hope this can also help someone else have a good time with their RPi4! 🙂

    people Felipe 22 March, 2020

  • favorite

    4 Like

    rodp , preptorrent , Precurz , Marco Cirillo

  • 1 Comments

  • 2 May preptorrent

    It would be cool to see a debian SDCard image (dot img) of Movim for raspberry-pi (especially the pi3B +) which has an icon on the desktop so you can click through a simple wizard to set it up. So like, as easy as setting up qbittorrent, or that sort of thing. That way total noobs could do it. Also, then Debian could still be used (presumably with mate desktop) in the background so that the pi is still generally useful as a desktop PC for humble online usage and pidgin IM etc. There is a limit to how many raspberry-pi computers a person can buy. Also their warehouse got robbed, thereby limiting supply. It would also be very cool to have an option in that "wizard" that allowed an external (even just usb2) HDD drive to become the boot OS so that a swap file can be added and a decent 2TB of storage (avoiding the problem a SDCard breaking from usage). The 3D graphics ability of the pi3bplus could also be used with that draw tool movim has. EDIT: I just replaced this comment because it had a typo. A "print-preview" icon would be cool so as to see how a comment on a post looks before finishing it.