Jump to content
d8sychain

[Support] d8sychain - MediaWiki

31 posts in this topic Last Reply

Recommended Posts

mediawiki-icon.png

Application Name: MediaWiki

Application Site: https://mediawiki.org/

Docker Hub: https://hub.docker.com/r/d8sychain/mediawiki/

Github: https://github.com/d8sychain/docker-mediawiki

Note: No longer requires a database container such as MySQL. You can use SQLite that is built into the docker image. Mediawiki supports SQLite, MySQL, MariaDB, PostgreSQL databases. 

 

For setup guide please see the README on Github.

 

Status: Beta

I am considering this docker as beta for the time being. Mediawiki itself is fully functional and able to be used in a production environment, however, I have not tested / used all the extensions that are included with the core Mediawiki repository. Some of the extensions may require additional libraries and/or additional configurations to function. See the documentation for a particular extension.

 

Change Log:

CHANGELOG.md

 

Known Issues:

KNOWNISSUES.md

 

Updating the docker image from a version before 10/21/2019 (1.33-3) see CHANGELOG and KNOWNISSUES

Edited by d8sychain
updated post

Share this post


Link to post
2 hours ago, Bigsease30 said:

Your read me doesn't seem to be written for UnRaid users. unless I am missing something.

Unraid Add Container page is just getting the fields to fill in the docker run command.

Share this post


Link to post
9 hours ago, Bigsease30 said:

Your read me doesn't seem to be written for UnRaid users. unless I am missing something.

The only part of the README that does not really apply to UnRaid is the docker run commands. Using CA and the UnRaid UI to add the container takes care of the docker commands. Point and click, browse to the URL for the container, use the Mediawiki installer to generate your LocalSettings.php file, download it to /mnt/user/appdata/mediawiki/www/mediawiki/ on your UnRaid machine (default) and you have a running wiki site. 

Share this post


Link to post

OK Guys, I am pulling my hair out. My initial issue was that the instructions said to go to the following address in the browser: 

 

"You should be able to browse your wiki at http://localhost:9090."

When it should be: http://SERVER-IP:9090/mw-config/index.php    to reach the installer.

 

Now I can access the installation site for MediaWiki, I am still unable to connect it to a MySQL database. I will include screenshots to help assist in finding a resolution to this issue.  (Side note: I currently have Nextcloud and MariaDB installed but is currently disabled. I have tried to use a different port number for mysql other then 3306 but have decided to temporarily to disable MariaDB and use the original port. Clean installations of MySQL have been obtained when settings were changed to further diagnose if it is a SQL error or an issue with MediaWiki docker)

 

I have tried localhost, 127.0.0.1 as well as the IP of my unraid server without any luck of connecting. I have tried simple to complexed passwords and I still receive the same error as shown in the screen shot below named "ERROR". I have tried everything to make this work that I am aware to try. I do not want to use MariaDB for both Nextcloud and MediaWiki. If you can assist, please let me know.

 

Docker Apps.JPG

MEdiawiki.JPG

MySQL.JPG

ERROR.JPG

Share this post


Link to post
On 10/19/2019 at 8:48 PM, Bigsease30 said:

"You should be able to browse your wiki at http://localhost:9090."

When it should be: http://SERVER-IP:9090/mw-config/index.php    to reach the installer.

My apologizes there. I have been working on changes to the docker all weekend and an updated/more informational README. Including instructions more specific to UnRaid, considering UnRaid is what I built this docker for. Also changes to the nginx.conf

 

On 10/19/2019 at 8:48 PM, Bigsease30 said:

Now I can access the installation site for MediaWiki, I am still unable to connect it to a MySQL database. I will include screenshots to help assist in finding a resolution to this issue.  (Side note: I currently have Nextcloud and MariaDB installed but is currently disabled. I have tried to use a different port number for mysql other then 3306 but have decided to temporarily to disable MariaDB and use the original port. Clean installations of MySQL have been obtained when settings were changed to further diagnose if it is a SQL error or an issue with MediaWiki docker)

 

I have tried localhost, 127.0.0.1 as well as the IP of my unraid server without any luck of connecting. I have tried simple to complexed passwords and I still receive the same error as shown in the screen shot below named "ERROR". I have tried everything to make this work that I am aware to try. I do not want to use MariaDB for both Nextcloud and MediaWiki. If you can assist, please let me know.

 

Docker Apps.JPG

MEdiawiki.JPG

MySQL.JPG

ERROR.JPG

On MediaWiki installer set your Database host: 10.30.30.30:3306 (although if you are already using that port for a different MySQL container for NextCloud edit your MySQL database template that you are using for MediaWiki to say 3310 first then use the MediaWiki installer) Database username: root Database password: MY-PASS (based on the screenshots you provided). If you have any further problems let me know and I will try to help you through them as soon as I can.

 

Also note, I just pushed new changes to docker tags `latest` and `1.33` (both are the same) late last night without realizing that going from 1.33-2 or older to 1.33-3 may cause problems for end users. If you haven't managed to get through the MediaWiki installer yet, then update the container 1st and delete /config/nginx/nginx.conf before proceeding then everything should be good. If you have completed the installer already and started using MediaWiki, delete the following files: /config/www/mediawiki/ExtraLocalSettings.php , /config/nginx/nginx.conf , Remove line 163 # Load extra settings and line 164 require ExtraLocalSettings.php'; from LocalSettings.php ,then restart the container. Any pages that you may have made in MediaWiki are all stored in the database and retained. Sorry for any inconvenience. 

Edited by d8sychain

Share this post


Link to post

Hello d8sychain and thank you for your reply.

 

I have installed and reinstalled both MediaWiki and MySQL and receive the same error. I have also gone as far as uninstalling my MariaDB docker to further test and still receive the same results. I have tried my unraid IP as well as with and without 3306 and tried different ports. So to further test, I installed a PHPmyAdmin docker and attempted to connect to the MySQL database, still nothing, no connection what-so-ever. I think that the issue resides in the MySQL docker and not in your MediaWiki. What MySQL docker are you running on your version? The one that I am using is from Bungy's Repository.

Share this post


Link to post
22 hours ago, Bigsease30 said:

What MySQL docker are you running on your version?

I use linuxserver/mariadb for 3 wikis, and then use SQLite built into the MediaWiki docker for one that I run just for developing and testing. I also use linuxserver/mariadb for 2 NextCloud containers. So I have 5 linuxserver/mariadb containers running on one server, each one just set to a slightly different host port number.

22 hours ago, Bigsease30 said:

The one that I am using is from Bungy's Repository.

When I get a chance and I will try the MySQL docker that you where trying to use and see what happens. In your screenshot previously, it shows that you were trying to use the official mysql image. Could you clarify?

Share this post


Link to post

@Bigsease30, I got MediaWiki working with the official MySQL image, although I had to jump through some hoops to get there. It requires a modification to the default configuration for MySQL 8.0.4 and above. See MySQL 8.0.4 : New Default Authentication. I'll outline what I did.

  • Edit the MySQL template on UnRaid
    • image.thumb.png.54f3b00d9ac379c2c769defc591f3fba.png
  • Create a new text file in `/mnt/user/appdata/mysql/conf.d` and name it something.cnf
  • Edit the file and add the following:
    • [mysqld]
      default_authentication_plugin    = mysql_native_password
  • Change the file permissions, if global has write permission MySQL will ignore the file
    • Something like `chmod 644 something.cnf`
  • Start the container and wait for it to run through the Entrypoint.sh script (took a few minutes)
    • Check the container log and look for `[System] [MY-010931] [Server] /usr/sbin/mysqld: ready for connections. Version: '8.0.18' socket: '/var/run/mysqld/mysqld.sock' port: 3306 MySQL Community Server - GPL.`
    • Then it's ready
  • If you have already started the container before creating the configuration file
    • Stop the container
    • Remove all of the database files in `/mnt/user/appdata/mysql/database`
    • Restart the container
  • Then you can use the MediaWiki installer to connect and complete the installation

image.thumb.png.81185aa2c5d40ef90f6698bcc5afebb3.png

 

So, an alternative to all of that, use an older version of MySQL like 5.7 . MediaWiki currently supports MySQL 5.5.8+

  • image.thumb.png.7559843fd3df69b89660ac9bda5b1749.png

Had no issues with MySQL 5.7

image.thumb.png.6e383edc660a8e6df19db8d2b721b698.png

 

Edited by d8sychain

Share this post


Link to post

@d8sychain, Your the best! Finally got it up and running thanks to you and your assistance. I would of never figured that out. Thanks again!

Share this post


Link to post

Hello!

 

I was hoping i could get some help for this container.  I have it up and running using a MariaDB container, and all of that seems to be running fine, but I'm having trouble with Images, and i believe file permissions.  If i exec into the docker container and run "chmod -R 770 /assets" the images will work fine until the container resets.  At which point the permissions change and i have to run the command again.  I imagine i have to change the uid/gid env variables on the unraid config page, but im not certain, and if that is the case, i dont know what i have to change them to. 

 

Any help with this would be greatly appreciated. 

Share this post


Link to post
4 hours ago, Shirkie said:

Any help with this would be greatly appreciated. 

I'll try to get back with you tomorrow evening.

Share this post


Link to post
10 hours ago, d8sychain said:

I'll try to get back with you tomorrow evening.

Wonderful! Thank you very much for your time.

Share this post


Link to post
Posted (edited)

@Shirkie I'm sorry I haven't gotten back sooner. I'm in the middle of a large remodel/construction project in between my day job and everything else. I haven't touched development on this since February, so it's going to take me a min to get my head back into the code re-familiarize myself with it and I just don't have the time to do so right now.

 

I have newer code / version, that has quite a few improvements and features than the "latest" build. Its version is "edge". I never merged the new code due to I hadn't finished updating all of the documentation that goes along with it. That being said, if you use the "edge" version it should eliminate any permission problems that your having. I've done quite a bit of testing and use "edge" version in 3 wiki projects of my own, and "edge" is solid with several built in tools/features to ease managing to mediawiki docker, it just lacks the updated documentation on how to use said features.

 

Highlights:

  • Bumping to Alpine v3.11 (lsiobase/nginx:3.11)
  • Added OPTION to add MariaDB(MySQL) built into the container, providing a one-container-does-all, or you can run a separate MariaDB(MySQL) server (NEW FEATURE)
  • MediaWiki Maintenance CLI Menu (NEW FEATURE)
  • ExtensionManager (ENHANCED FEATURE)
  • Backup functions (NEW FEATURE)
  • Database functions (NEW FEATURE)
  • Services functions (NEW FEATURE)
  • MediaWiki file upload, logo, favicon settings changed

see Change Log for details

 

If you are not to invested in the current docker version for your wiki, I suggest starting with a fresh version of "edge" -> d8sychain/mediawiki:edge. It is possible to change over from "latest" to "edge", but there are some manual steps have to be taken, like deleting some files so that they get replaced with newer versions. They won't get replaced automatically just in case the end user has made any customization to the files to fit their specific needs , such as the NGINX config file..

 

If you have anymore problems or questions, don't hesitate to ask. I'll do what I can to answer them, just bare with my time constraints at this time.

Edited by d8sychain

Share this post


Link to post
Posted (edited)

I am using this container on Unraid behind the Linuxserver.io letsencrypt container.  I see that you recommended that in your documentation, which is very good I might add.  I have learned a lot from your notes, so thanks for that.  I am still new to Nginx though, and am having some issues getting it to work properly with mediawiki.  I have tried using the docuwiki proxy config in the letsencrypt container and changing the proto, ip, port as needed but still having no luck.  Currently, I am able to access the mediawiki container via IP internally, but when attempting to use the domain name I end up with an error: 

SSL received a record that exceeded the maximum permissible length.

Error code: SSL_ERROR_RX_RECORD_TOO_LONG

 

Can you share a configuration that works please?  I would assume I am just directing it to the container IP:PORT with proxy_pass, but I can't semm to figure out the issue.  I will note that I have a password enabled as well, just in case it is relevant.  Thanks! 

Edited by greg_gorrell

Share this post


Link to post
Posted (edited)

I did a quick search and from what I found SSL_ERROR_RX_RECORD_TOO_LONG is something that occurs exclusively on Firefox.

This might help also -> https://cheapsslsecurity.com/blog/ssl_error_rx_record_too_long/ 

 

LetsEncrypt Wiki Config

#wiki reverse proxy
server {
	listen 443 ssl;

	root /config/www;
	index index.html index.htm index.php;

	server_name wiki.example.com;

	ssl_certificate /config/keys/letsencrypt/fullchain.pem;
	ssl_certificate_key /config/keys/letsencrypt/privkey.pem;
	ssl_dhparam /config/nginx/dhparams.pem;
	ssl_ciphers 'ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES256-GCM-SHA384:DHE-RSA-AES128-GCM-SHA256:DHE-DSS-AES128-GCM-SHA256:kEDH+AESGCM:ECDHE-RSA-AES128-SHA256:ECDHE-ECDSA-AES128-SHA256:ECDHE-RSA-AES128-SHA:ECDHE-ECDSA-AES128-SHA:ECDHE-RSA-AES256-SHA384:ECDHE-ECDSA-AES256-SHA384:ECDHE-RSA-AES256-SHA:ECDHE-ECDSA-AES256-SHA:DHE-RSA-AES128-SHA256:DHE-RSA-AES128-SHA:DHE-DSS-AES128-SHA256:DHE-RSA-AES256-SHA256:DHE-DSS-AES256-SHA:DHE-RSA-AES256-SHA:AES128-GCM-SHA256:AES256-GCM-SHA384:AES128-SHA256:AES256-SHA256:AES128-SHA:AES256-SHA:AES:CAMELLIA:DES-CBC3-SHA:!aNULL:!eNULL:!EXPORT:!DES:!RC4:!MD5:!PSK:!aECDH:!EDH-DSS-DES-CBC3-SHA:!EDH-RSA-DES-CBC3-SHA:!KRB5-DES-CBC3-SHA';
	ssl_prefer_server_ciphers on;

	client_max_body_size 0;

	location / {
		include /config/nginx/proxy.conf;
		proxy_pass http://UNRAID IP:PORT #;	
	}
}

 

Edited by d8sychain

Share this post


Link to post

That is odd, in Chrome it does not work either and I simply get ERR_SSL_PROTOCOL_ERROR.

My configuration is pretty much the same, although some of the directives are are defined in the ssl.conf and proxy.conf files.  Just to verify, I removed the proxy-conf file for mediawiki I created and added your config you shared above.  I get the exact same results in Firefox and Chrome now, without the ability to connect via IP internally now though.  Any thoughts there?  Could it be an issue with letsencrypt and/or the cert maybe?

 

Share this post


Link to post

I'm really just guessing, but perhaps your issue is a combination with DNS, routing, and Cert matching. Have you tested connecting to the wiki internally (LAN) vs externally (WAN)? Can you provide some more details on your setup, PM me if you prefer.

Share this post


Link to post
Posted (edited)

Just installed this to see if I could get the VisualEditor to work but I'm getting this error when I try to invoke it when editing my first page:

 

Quote

Error loading data from server: no_vrs: The VirtualRESTService for the document server is not defined; see https://www.mediawiki.org/wiki/Extension:VisualEditor. Would you like to retry?

 

Any hint at getting this to work?   I see there's a  /mnt/user/appdata/mediawiki/parsoid folder -- parsoid is what I understand is necessary for VisualEditor to work.  Is there additional configuration necessary?   My version page lists VisualEditor 0.1.1 as one of the editors.

 

Update: stopping and starting MediaWiki in Docker seemed to fix it.

Edited by oh-tomo

Share this post


Link to post

I am having issues getting email to work. It worked once for some reason when I first set the docker up and i authenticated my account and has not worked since. I am seeing an error "Unknown error in PHP's mail() function." All of the configurations for the email match those of my stand alone mediawiki and I have re-verified them as being accurate.

 

 

An additional problem I am having is that anytime I restart the docker I have a 50 50 chance that I won't be able to access the mediawiki wedpage. I have to delete the docker and reinstall the docker and my wiki is back up.

Share this post


Link to post

The email issue sounds like an issue with the mediawiki code itself maybe. The issue with web access to mediawiki, I might be able to help, but I'm going to need some logs or some more info to go on. 

Share this post


Link to post

Will just the UnRaid logs be sufficient? There did not seem to be any logs inside the docker for MediaWiki. Any other information that I could include that would be helpful?

Share this post


Link to post

Get the Container ID number (you can this in the UnRaid UI docker tab, shown in advanced view)

Use the following:

cp "$(find /var/lib/docker/containers -name "Container ID*.log")" /mnt/user/appdata

The log file will be located in the appdata folder

Edited by d8sychain
missing * in command

Share this post


Link to post

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.