I currently host a couple small wikis for worldbuilding information, but the hosting provider for that is going down in a few months, so I’m looking for ways to self host what I got.

I’ve never self hosted with Mediawiki before so this is brand new to me, I’ve already spent a couple hours messing around with Docker but haven’t gotten too far into that. OS is Manjaro/Endeavour Linux between two systems.

Not necessarily looking to host it online immediately to start with, though in the future I’d like to do so when I can get the proper hardware preparations for it, but for now I just want to host it locally to get it set up.

  • @[email protected]
    link
    fedilink
    English
    51 year ago

    I’ve never worked with mediawiki, but if you’re looking for advice I’d recommend taking the time to figure docker out. Just about anything you want to self host is going to have a docker image for you, so it’s a time investment that will yield immediate and significant rewards.

    I’m not a huge fan of network chuck, but if you need a getting started his videos are a pretty good jumping off point: https://youtu.be/eGz9DS-aIeY

    • @haulyard
      link
      English
      11 year ago

      Big +1 to this. Docker and docker-compose are worth the time to get comfortable with. For a lot of software you’ll find they come with a compose file to help you get started.

    • @haulyard
      link
      English
      11 year ago

      deleted by creator

  • @[email protected]
    link
    fedilink
    English
    31 year ago

    I’m running MediaWiki for a role playing group in docker. The difficult part was getting everything set up to get certificates from letsencrypt and offering https without leaving docker compose. The great thing about this is that creating a backup or moving servers has become trivial now. As long as you don’t expect your users to perform dozens or even hundreds of operations per second, I’d strongly advise sticking with SQLite to make your admin life that much easier. If you want, I’ll look up my full stack and post it here once I’m not on mobile any more.

    • Wanderer LagomorphOP
      link
      fedilink
      English
      11 year ago

      That’d certainly be helpful, if I’m able to get started then I feel like the rest shouldn’t be too rough given the resources I’m finding, but starting it is the hard part for me.

      • @[email protected]
        link
        fedilink
        English
        2
        edit-2
        1 year ago

        Sure thing.

        So there are two parts to all of this:

        1. Getting MediaWiki set up , properly configured and running.
        2. Having it securely accessible from the Internet (if needed), including SSL certificates.

        Part 1 is well covered my the MediaWiki release already. You only need to worry about the correct configuration. When you download the current version from the official MediaWiki page, you’ll notice that there is already a docker-compose.yml file in there. This gets you most of the way to your destination.

        Read the file and set the values of all variables you wish to override in a separate “.env” file in the same folder. It could look something like this:

        MW_SCRIPT_PATH=/w
        MW_SERVER=https://your-url.com
        MW_DOCKER_PORT=80
        MEDIAWIKI_USER=Admin
        MEDIAWIKI_PASSWORD=some_password
        XDEBUG_CONFIG=
        XDEBUG_ENABLE=true
        XHPROF_ENABLE=true
        MW_DOCKER_UID=1000
        MW_DOCKER_GID=1000
        

        Now you can just docker-compose up and everything will be set up when visiting your site for the first time, it should hold your hand, guide you through configuration options and finally offer you to download the LocalSettings.php file, that contains all the decisions you’ve made. You can review and adjust it futher and finally save it to the same folder as your docker-compose.yml file. Refresh the site and it should be accessible right away. I would say for a closed audience, these are the most important options to set:

        # The following permissions were set based on your choice in the installer
        $wgGroupPermissions['*']['createaccount'] = false;
        $wgGroupPermissions['*']['edit'] = false;
        $wgGroupPermissions['*']['read'] = false;
        

        These options will prevent people from creating their own accounts (you will have to create one for them from the UI) and it will block people from viewing any pages without being logged in.

        If you do not wish to use SQlite but rather a dedicated DBMS (I strongle discourage you from getting into that trouble for smaller or even medium user bases), you will find more information on the page for alternative configuration recipes.

        If you would like to go into part 2, just ask and I’ll give you an overview of my setup here as well. I’m using docker-letsencrypt-nginx-proxy-companion.

  • @[email protected]
    link
    fedilink
    English
    21 year ago

    LAMP + mediawiki went pretty quick for me. The issue was that I didn’t want to dig through all their config files to tweak it to what I wanted.

    • @[email protected]
      link
      fedilink
      English
      31 year ago

      Agreed, I think hosting it on localhost not exposed to the internet is a great idea if this satisfies your needs for now. Do double-check the docs for your system if firewall disallows web server connections by default (Manjaro and Endeavour are based on Arch which is supposed to have good wiki).

      Then, if you want to go online, you can export the database and put it into a server install.

  • @rarkgrames
    link
    English
    11 year ago

    I installed mediawiki for the first time yesterday. Just did a straight install on to a Linux VM.

    One thing that caught me out was that it would take a loooong time to open, but once it did it was ok. It turns out I hadn’t set up any caching and this isn’t done by default. It’s easy enough to do though in the LocalSettings.php config file. Open it in Nano (or your text editor of choice) and find the first line you see below.

    $wgCacheDirectory = "$IP/cache";
    $wgFileCacheDirectory = "$IP/cache";
    $wgEnableSideBarCache = true;
    $wgUseFileCache = true;
    $wgShowIPinHeader = false;
    $EnableParserCache = true;
    $wgCachePages = true;
    
    $wgMainCacheType = CACHE_ACCEL;
    $wgMessageCacheType = CACHE_ACCEL;
    $wgParserCacheType = CACHE_ACCEL;
    $wgMemCachedServers = array();
    

    In my installation the first line of the above was commented out so I uncommented it and then added the rest of the stuff you see there. Then, just make sure the cache folder has the correct permissions set and you should be good to go.

    Otherwise it was pretty simple. I did have to make sure I had installed the pre-reqs as listed in the mediawiki download page - ensuring apache, mariaDB etc were installed and running, and then it was pretty simple from there on in.

    Also, this video is quite useful if you’re not sure on certain steps: https://www.youtube.com/watch?v=QpRfwCUC2uM&t=137s

  • Jamie
    link
    fedilink
    English
    11 year ago

    I would say MediaWiki is one of the most painless web installs I’ve used. Put it in a directory with the right permissions, give it a database, and you’re basically done. If you want to configure things in a custom way or add plugins, that might take longer than the actual install.

    But for a barebones wiki? Really painless.

  • Schrottkatze
    link
    fedilink
    11 year ago

    I’m definitely not a “typical” case, just saying what I did:

    A friend of mine used discord for his worldbuilding project and at some point when I asked him sth and he emailed me a bunch of images and texts (I don’t use discord anymore) I was like “yeah no this is enough I’m setting up a mediawiki for you”

    I spent about a week figuring shit out with NixOS containers, keycloak and some mediawiki thingies (gosh the openid connect plugin is cursed), and now he’s happily writing away at his wiki (when he feels like it lol).

    I’m not saying to do it like me, it’s probably the most monumentally worst way to do it, but it works well enough.