# \[Flarum\] A lightweight forum

**URL:** https://forum.yunohost.org/t/flarum-a-lightweight-forum/1971
**Category:** Apps
**Tags:** flarum
**Created:** [October 5, 2016, 6:06pm UTC](https://forum.yunohost.org/t/flarum-a-lightweight-forum/1971 "2016-10-05T18:06:16Z")
**Posts on this page:** 20
**Page:** 1

<div class="post-metadata">

### Author: ![tituspijean](https://forum.yunohost.org/user_avatar/forum.yunohost.org/tituspijean/32/3584_2.png) [@tituspijean](https://forum.yunohost.org/u/tituspijean)
#### Post date: [October 5, 2016, 6:06pm UTC](https://forum.yunohost.org/t/flarum-a-lightweight-forum/1971/1 "2016-10-05T18:06:16Z")

</div>

# Flarum for YunoHost

![Maintenance status](https://ci-apps.yunohost.org/ci/badges/flarum.maintain.svg) ![Status](https://ci-apps.yunohost.org/ci/badges/flarum.status.svg) [![Integration level](https://dash.yunohost.org/integration/flarum.svg)](https://dash.yunohost.org/appci/app/flarum)

Hello all,

I’ve packaged [Flarum](http://flarum.org/), a forum software. It’s nice, modern, _à la_ Discourse, without the need for `docker` (cf. [this thread](https://forum.yunohost.org/t/discourse-package/1833)).

Sources are there : [GitHub - YunoHost-Apps/flarum\_ynh: Flarum, an open-source forum software, packaged for YunoHost](https://github.com/YunoHost-Apps/flarum_ynh)

Enjoy ! 🙂

* * *

## Features

- All Flarum features, see its [documentation](http://flarum.org/docs/)
- SSOwat integration through a [dedicated extension](https://github.com/tituspijean/flarum-ext-auth-ssowat).

## Installation

This Flarum package can be installed through:

- [![Install Flarum with YunoHost](https://install-app.yunohost.org/install-with-yunohost.png)](https://install-app.yunohost.org/?app=flarum)
- YunoHost’s webadmin, in the Community listing
- YunoHost’s CLI: `yunohost app install https://github.com/YunoHost-Apps/flarum_ynh`.

Required parameters are:

- `domain`
- `path`
- `admin`, among the YunoHost’s users
- `public`, _true_ by default, for guests to read the forum
- `title` of the forum
- `language` can be English `en` (by default), French `fr`, and German `de`. Other languages are installable after installation like any other extensions

After installation, simply open your browser to Flarum’s page. First loading may be a bit longer as assets are generated.

## Upgrading

Note that all third-party extensions are removed upon upgrading, you simply need to require them again from Composer. Their settings and data are kept.

## Adding extensions after installation

Replace `flarum` with your app ID in case of multiple installation.  
Replace `vendor/extension` with the appropriate names. Read the extension documentation if it requires additional steps.

```bash
sudo yunohost app shell flarum
# Will load Flarum's environment in a new shell
php composer.phar require vendor/extension
exit

```

## Troubleshooting

> **Click here to see common issues**
>
> ### `Low memory` errors
> 
> The app now ensures that enough memory is available by adding a swap file upon installation.
> 
> > **Commands for swap are no longer necessary.**
> >
> > A swapfile will enable your system to extend its limited memory through its disk capacity. The following commands will create a 1 GB swapfile.
> > 
> > ```auto
> > sudo dd if=/dev/zero of=/swapfile bs=1024 count=1024000
> > sudo chmod 600 /swapfile
> > sudo mkswap /swapfile
> > sudo swapon /swapfile
> > 
> > ```
> > 
> > Then add this line in `/etc/fstab`:
> > 
> > ```auto
> > /swapfile none swap sw 0 0
> > 
> > ```
> > 
> > Reboot the system and try the installation again.
> 
> ### `Timeout` errors
> 
> Some users have reported a successful installation, but get a blank page due to a `timeout` on a PHP script that prepares the forum assests (`Minify.php`, notably).
> 
> In `/etc/php/*php_version*/fpm/pool.d/*app_id*.conf`, you can increase the `max_execution_time` and `max_input_time` limits (both values are in seconds if nothing is specified).
> 
> Reload PHP-FPM with `sudo service php*php_version*-fpm reload`.
> 
> ### Upload limit
> 
> If you are facing an error while uploading large files into the forum, PHP may be limiting file upload.
> 
> In `/etc/php/*php_version*/fpm/pool.d/*app_id*.conf`, you can uncomment (remove `;` at the beginning of the line) and increase the values of `upload_max_filesize` and `post_max_size` (both values are in bytes).
> 
> Reload PHP-FPM with `sudo service php*php_version*-fpm reload`.
> 
> ### Your issue is not listed here ?
> 
> Feel free to post about it in this thread or on [Github](https://github.com/YunoHost-Apps/flarum_ynh/issues) (preferred). Remember to post your logs to help me help you help us all. 🤖

---

<div class="post-metadata">

### Author: ![tituspijean](https://forum.yunohost.org/user_avatar/forum.yunohost.org/tituspijean/32/3584_2.png) [@tituspijean](https://forum.yunohost.org/u/tituspijean)
#### Post date: [October 5, 2016, 6:06pm UTC](https://forum.yunohost.org/t/flarum-a-lightweight-forum/1971/2 "2016-10-05T18:06:49Z")

</div>

The package is functional and well integrated within YunoHost. It supports

- SSO login ([extension](https://github.com/tituspijean/flarum-ext-auth-ssowat) included)
- LDAP login ([extension](https://github.com/tituspijean/flarum-ext-auth-ldap) to be manually installed).

Feel free to test it, then [propose improvements and report issues on Github](https://github.com/YunoHost-Apps/flarum_ynh/issues).

---

<div class="post-metadata">

### Author: ![tituspijean](https://forum.yunohost.org/user_avatar/forum.yunohost.org/tituspijean/32/3584_2.png) [@tituspijean](https://forum.yunohost.org/u/tituspijean)
#### Post date: [October 8, 2016, 5:44pm UTC](https://forum.yunohost.org/t/flarum-a-lightweight-forum/1971/3 "2016-10-08T17:44:38Z")

</div>

Package updated.

**Fully works !**

---

<div class="post-metadata">

### Author: ![jerome](https://forum.yunohost.org/letter_avatar_proxy/v4/letter/j/a587f6/32.png) [@jerome](https://forum.yunohost.org/u/jerome)
#### Post date: [October 11, 2016, 7:34pm UTC](https://forum.yunohost.org/t/flarum-a-lightweight-forum/1971/4 "2016-10-11T19:34:30Z")

</div>

Hi @tituspijean, thank you very much for this package - and by the way for the Flarum discovery! I like the _without the need for docker_ and will try it as soon as possible…

---

<div class="post-metadata">

### Author: ![Moul](https://forum.yunohost.org/user_avatar/forum.yunohost.org/moul/32/1696_2.png) [@Moul](https://forum.yunohost.org/u/Moul)
#### Post date: [October 12, 2016, 8:05am UTC](https://forum.yunohost.org/t/flarum-a-lightweight-forum/1971/5 "2016-10-12T08:05:46Z")

</div>

Hi, and thanks for this package 😻

- Could you send (if you want) the ownership (on settings) of the package to [YunoHost-Apps organization](https://github.com/YunoHost-Apps).
- That way colaborators could easily works on same package .
- I sent you a request to join YunoHost-Apps organization.
- Then, when you think the package is publishable, could you send a pull request to [add the package on community list](https://github.com/YunoHost/apps)?
- That way your version will be displayed on [community apps list](https://yunohost.org/#/apps_in_progress)

---

<div class="post-metadata">

### Author: ![jellium](https://forum.yunohost.org/user_avatar/forum.yunohost.org/jellium/32/922_2.png) [@jellium](https://forum.yunohost.org/u/jellium)
#### Post date: [October 12, 2016, 2:11pm UTC](https://forum.yunohost.org/t/flarum-a-lightweight-forum/1971/6 "2016-10-12T14:11:15Z")

</div>

Thanks for the initiative and the good work!

However I cannot manage to install the package. I tried from both the YunoHost UI or via command line. With --debug and --verbose options in command line, I end up with:

`114469 DEBUG action [29007.1] ended after 114.336s 114469 DEBUG lock has been released 114469 ERROR Installation failed`

I uploaded the full log [here](https://www.zerobin.net/?76e0fab0994f8410#Yyu1Al6tRr5uhOWcSGPnMg/k7QfTPpM+8cq2LfSd7SQ=) ([zerobin.net](http://zerobin.net)).

Note that, prior to that, I had to manually create directory `/var/www/.cache/composer` and subdirectories to avoid warnings such as:

`17305 WARNING Installing flarum/flarum (v0.1.0-beta.5) 17306 WARNING Cannot create cache directory /var/www/.cache/composer/files/, or directory is not writable. Proceeding without cache 17318 WARNING - Installing flarum/flarum (v0.1.0-beta.5) 18294 WARNING Downloading: 100% 18341 WARNING 18391 WARNING Created project in . 18438 WARNING Cannot create cache directory /var/www/.cache/composer/repo/https---packagist.org/, or directory is not writable. Proceeding without cache 18439 WARNING Cannot create cache directory /var/www/.cache/composer/files/, or directory is not writable. Proceeding without cache 18635 WARNING Loading composer repositories with package information 18717 WARNING Updating dependencies (including require-dev)`  
Thanks for your help.

---

<div class="post-metadata">

### Author: ![tituspijean](https://forum.yunohost.org/user_avatar/forum.yunohost.org/tituspijean/32/3584_2.png) [@tituspijean](https://forum.yunohost.org/u/tituspijean)
#### Post date: [October 12, 2016, 5:27pm UTC](https://forum.yunohost.org/t/flarum-a-lightweight-forum/1971/7 "2016-10-12T17:27:34Z")

</div>

@jellium Thank you for trying the package !

I think I was not cautious enough and I did not correctly clean my server before testing the package. Therefore it did not yell at me as it did to you.

I’ve created [this issue](https://github.com/TitusPiJean/flarum_ynh/issues/9), and I’m currently working on patching the problem, hopefully.

---

<div class="post-metadata">

### Author: ![tituspijean](https://forum.yunohost.org/user_avatar/forum.yunohost.org/tituspijean/32/3584_2.png) [@tituspijean](https://forum.yunohost.org/u/tituspijean)
#### Post date: [October 12, 2016, 6:05pm UTC](https://forum.yunohost.org/t/flarum-a-lightweight-forum/1971/8 "2016-10-12T18:05:17Z")

</div>

Updated. Can you test it @jellium ?

@Moul I would gladly send the package to YunoHost-Apps. Is it by forking it, or is there another way to do so ?

---

<div class="post-metadata">

### Author: ![Moul](https://forum.yunohost.org/user_avatar/forum.yunohost.org/moul/32/1696_2.png) [@Moul](https://forum.yunohost.org/u/Moul)
#### Post date: [October 12, 2016, 8:13pm UTC](https://forum.yunohost.org/t/flarum-a-lightweight-forum/1971/9 "2016-10-12T20:13:58Z")

</div>

> [@tituspijean](#):
>
> @Moul I would gladly send the package to YunoHost-Apps. Is it by forking it, or is there another way to do so ?

You could send ownership on on setting of the repository.

---

<div class="post-metadata">

### Author: ![opi](https://forum.yunohost.org/user_avatar/forum.yunohost.org/opi/32/5_2.png) [@opi](https://forum.yunohost.org/u/opi)
#### Post date: [October 13, 2016, 8:26am UTC](https://forum.yunohost.org/t/flarum-a-lightweight-forum/1971/10 "2016-10-13T08:26:51Z")

</div>

> [@tituspijean](#):
>
> I think I was not cautious enough and I did not correctly clean my server before testing the package. Therefore it did not yell at me as it did to you.

Pro-Tip : you shoul avoid working on package on your production server ! Try to use a developement environnement (by using [GitHub - YunoHost/ynh-dev: Dev environement wrapper, based on LXD, to develop on YunoHost](https://github.com/yunohost/ynh-dev) or other solution). By doing that you can test your package on a fresh & clean server.

Thanks for working on Flarum, this is a really valueable app ! Do you manage to get a working ldap connection for members ?

---

<div class="post-metadata">

### Author: ![tituspijean](https://forum.yunohost.org/user_avatar/forum.yunohost.org/tituspijean/32/3584_2.png) [@tituspijean](https://forum.yunohost.org/u/tituspijean)
#### Post date: [October 13, 2016, 2:18pm UTC](https://forum.yunohost.org/t/flarum-a-lightweight-forum/1971/11 "2016-10-13T14:18:21Z")

</div>

> [@"opi](#):
>
> Pro-Tip : you shoul avoid working on package on your production server ! Try to use a developement environnement (by using [GitHub - YunoHost/ynh-dev: Dev environement wrapper, based on LXD, to develop on YunoHost](https://github.com/yunohost/ynh-dev) or other solution). By doing that you can test your package on a fresh & clean server.

Yeah, I’ve been lazy… It won’t happen again ! 😄 I will take time this weekend to setup such a dev environment.

> [@"opi](#):
>
> Thanks for working on Flarum, this is a really valueable app ! Do you manage to get a working ldap connection for members ?

Not yet ! I’m learning to code as I go, so I may need some time to handle PHP.  
@opi, could you have a look to [this issue](https://github.com/YunoHost-Apps/flarum_ynh/issues/7) ? I tried to implement your automatic postinstall solution, but I got a missing class error.

---

<div class="post-metadata">

### Author: ![jellium](https://forum.yunohost.org/user_avatar/forum.yunohost.org/jellium/32/922_2.png) [@jellium](https://forum.yunohost.org/u/jellium)
#### Post date: [October 14, 2016, 9:04pm UTC](https://forum.yunohost.org/t/flarum-a-lightweight-forum/1971/12 "2016-10-14T21:04:32Z")

</div>

Hi there,  
The installation worked, the issue seems to be fixed!  
Post-installation worked too, I can test the forum now (-:

Thanks.

---

<div class="post-metadata">

### Author: ![tituspijean](https://forum.yunohost.org/user_avatar/forum.yunohost.org/tituspijean/32/3584_2.png) [@tituspijean](https://forum.yunohost.org/u/tituspijean)
#### Post date: [October 19, 2016, 6:22pm UTC](https://forum.yunohost.org/t/flarum-a-lightweight-forum/1971/13 "2016-10-19T18:22:04Z")

</div>

Updated : automatic post-installation is implemented.  
Now your forum is fully functional as soon as installation is finished.

Next step, SSOWat and LDAP integration. So far it felt like tinkering, but I sense that it requires more knowledge than I have. So don’t hesitate to help !

---

<div class="post-metadata">

### Author: ![frju365](https://forum.yunohost.org/user_avatar/forum.yunohost.org/frju365/32/7108_2.png) [@frju365](https://forum.yunohost.org/u/frju365)
#### Post date: [October 20, 2016, 1:27pm UTC](https://forum.yunohost.org/t/flarum-a-lightweight-forum/1971/14 "2016-10-20T13:27:01Z")

</div>

Great Work. I’ve discover Flarum when I was searching for a software which can create a forum. I’ve tried to install manually but many errors appear. So this package is an opportunity for me and it works !  
I’ve just a question about Flarum : Can Admin create users ? And how can admin do this ?  
And is it normal that when a user signs in(after signing up), nothing appears (just the name of the forum) ?

Thanks.

frju365

---

<div class="post-metadata">

### Author: ![tituspijean](https://forum.yunohost.org/user_avatar/forum.yunohost.org/tituspijean/32/3584_2.png) [@tituspijean](https://forum.yunohost.org/u/tituspijean)
#### Post date: [October 20, 2016, 1:51pm UTC](https://forum.yunohost.org/t/flarum-a-lightweight-forum/1971/15 "2016-10-20T13:51:45Z")

</div>

Hi @frju365, thank you for testing the package !

It seems that the feature to add users from the admin panel is not implemented yet. [Here is the open issue about it](https://github.com/flarum/core/issues/885). I’m learning about SSOwat, LDAP and HTTP auth to implement automatic user creation with YNH’s login : you can create a new user with an API call and an admin token. [See here](http://flarum.org/docs/api/), but I’ve yet to find the correct syntax of such a call.

About your empty forum after signing up and signing in, can you take a screenshot ? That’s definitely weird. Can you check that you’re still in https ? What about signing out, refresh, or signin in with admin account ? Don’t hesitate to open an issue on github with such information, I will try to reproduce the issue.

---

<div class="post-metadata">

### Author: ![frju365](https://forum.yunohost.org/user_avatar/forum.yunohost.org/frju365/32/7108_2.png) [@frju365](https://forum.yunohost.org/u/frju365)
#### Post date: [October 23, 2016, 11:27am UTC](https://forum.yunohost.org/t/flarum-a-lightweight-forum/1971/16 "2016-10-23T11:27:15Z")

</div>

Hello TitusPiJean,  
Thanks for your answer.  
To answer your questions :

- I’m still in https:// when I sign in as user.
- Nothing appears :  
 ![](https://forum.yunohost.org/uploads/default/original/1X/a1c29155dd84cb635b5c39a76be9bc82bb9cb779.png)
- When I sign in with my admin account, Flarum appears. And as guest too. Only if I’m a member(user) nothing appears.

Thanks.  
frju365

---

<div class="post-metadata">

### Author: ![tituspijean](https://forum.yunohost.org/user_avatar/forum.yunohost.org/tituspijean/32/3584_2.png) [@tituspijean](https://forum.yunohost.org/u/tituspijean)
#### Post date: [October 23, 2016, 4:42pm UTC](https://forum.yunohost.org/t/flarum-a-lightweight-forum/1971/17 "2016-10-23T16:42:08Z")

</div>

Hi @frju365, I cannot reproduce the issue.  
Can you remove and install the package again ?  
If you can run the installation by command line `sudo yunohost app install https://github.com/YunoHost-Apps/flarum_ynh --verbose`, I would like to see the logs (don’t forget to remove any password, notably at the beginning of the log).

---

<div class="post-metadata">

### Author: ![nimch](https://forum.yunohost.org/user_avatar/forum.yunohost.org/nimch/32/560_2.png) [@nimch](https://forum.yunohost.org/u/nimch)
#### Post date: [January 13, 2017, 2:27pm UTC](https://forum.yunohost.org/t/flarum-a-lightweight-forum/1971/18 "2017-01-13T14:27:28Z")

</div>

Hi

I’m trying to install flarum in ynh beta 2.5 and installation failed.

I’m doing :  
_`sudo yunohost app install https://github.com/YunoHost-Apps/flarum_ynh --verbose`_

I just notice a strange warning (to me) :  
_`+ sudo mkdir /var/www/flarum`_  
_`+ sudo mv /tmp/flaruminstall/flarum /var/www/flarum/..`_  
_`Warning: mv: cannot create directory ‘/var/www/flarum/../flarum’: No such file or directory`_

And at the end :  
_`Error: Installation failed`_

But no explicit error message during install…

Any idea where I should have a look to find a reason ?

Thx

---

<div class="post-metadata">

### Author: ![frju365](https://forum.yunohost.org/user_avatar/forum.yunohost.org/frju365/32/7108_2.png) [@frju365](https://forum.yunohost.org/u/frju365)
#### Post date: [January 16, 2017, 11:00am UTC](https://forum.yunohost.org/t/flarum-a-lightweight-forum/1971/19 "2017-01-16T11:00:28Z")

</div>

@tituspijean, Sorry… I’m a bit late… (3 months)  
I’ve reinstalled Flarum on a new installation and now it works fine. That was surely a problem which come from the settings of nginx.

Thanks.

@nimch, a issue is opened on github for your problem.  
[https://github.com/YunoHost-Apps/flarum\_ynh/issues/14#issuecomment-272830702](https://github.com/YunoHost-Apps/flarum_ynh/issues/14#issuecomment-272830702)

---

<div class="post-metadata">

### Author: ![tituspijean](https://forum.yunohost.org/user_avatar/forum.yunohost.org/tituspijean/32/3584_2.png) [@tituspijean](https://forum.yunohost.org/u/tituspijean)
#### Post date: [January 16, 2017, 11:12am UTC](https://forum.yunohost.org/t/flarum-a-lightweight-forum/1971/20 "2017-01-16T11:12:45Z")

</div>

@frju365, thanks for your answer. Without being able to replicate your issue, I confess I had put it aside. I’m glad it was solved !

@nimch, I indeed opened an issue. I will look into it tonight. Can you confirm that everything is up-to-date on your server, with the latest beta for YNH ?

[Next page](https://forum.yunohost.org/t/flarum-a-lightweight-forum/1971.md?page=2)
