• So things have changed. Things have changed a lot. The "Zero to Mush (with wiki)" is still good, but it's changed and gotten messy with exceptions.

    So here's my instructions, partially for myself, on how to set up ChimeMUX (what I call the experimental Chime fork of TinyMUX) on Digital Ocean.

    This is not a static post, but I will try to update the thread with what changes have been made.

    Get the right Digital Ocean account

    For this tutorial, it's going to be the LAMP account.

    Start with the $5/mo account.

    Make a Game Account

    In my extremely strong opinion, you should not use 'root' for the game. There are a few reasons for this, but the main is that: It's root.

    (The secondary is that an account for the game makes it easier to manage.)

    Log in to your account as root then do this thing:

    sudo adduser <username>
    sudo adduser <username> sudo

    Then log out of root and log into your user. Do as much as you can from the user.

    I'm aware that creating an account with super-user abilities is not a whole lot better than using root, but it's cleaner and easier to see what's going on. The rest of this tutorial is going to assume you've done this.

    Get ChimeMUX

    There's a few steps here because while LAMP has almost everything you need, there are a few packages that won't be there.

    sudo apt-get install build-essential gcc make bison libpcre3-dev libmysqlclient-dev

    (bison is for Omega, which while isn't compiled by default, it can be an important tool for doing some deeper Mux things.)

    I believe the game should have its own account. For this type sudo adduser <username> sudo and then re-log in with that account.

    Either way, at this point you just need to follow the directions from Chime's GitHub and you'll be fine: https://github.com/lashtear/tinymux

    Mostly fine. You need to open the port in the firewall:

    sudo ufw allow <game port>

    If the game hasn't been started yet, do so now. Log in. You're done.

    Important Tidbit: The initial login for #1 is:

    connect wizard potrzebie

    Configure MySQL

    You're going to have to engage MySQL without a password. As Surreality says below, the default install has no password for root. That's fine, because you can do this:

    sudo mysql

    Now you'll need to make a database for the game, and an account for the Mux to log into that database. From within MySQL:

    CREATE DATABASE <gamename>_db;
    CREATE USER '<acct_name>'@'localhost' IDENTIFIED BY '<password>';
        ON <gamename>_db.* 
        TO '<acct_name>'@'localhost';

    You can, of course, change this however you want.

    Check that you did well:

    SHOW GRANTS FOR '<acct_name>'@'localhost';

    Type exit to get out of MySQL.

    Link TinyMUX to MySQL

    cd ~/game
    pico etc/netmux.conf

    Somewhere near the bottom, or even at the bottom:

    ## database ##############################
    sql_server localhost
    sql_database <gamename>_db
    sql_user <acct_name>
    sql_password <password>

    If your game is running, @restart it if not, bin/mux-start it.

    Log into the game.

    Type the following:

    think sql( select 1 )

    If everything went well, you'll get a response of '1'. Congrats! You have SQL!

    Set Up MediaWiki

    A lot of the system is already set up. Digital Ocean does have a "how to set up MediaWiki" page but it's out of date. Right now, here's what you need to do to seal the deal:

    sudo apt-get install php-intl
    sudo apt-get install php-gd
    sudo apt-get install php-xml
    sudo apt-get install php-mbstring
    sudo service apache2 restart
    curl -O  http://releases.wikimedia.org/mediawiki/1.31/mediawiki-1.31.1.tar.gz
    tar xvzf mediawiki-1.31.1.tar.gz
    sudo mv mediawiki-1.31.1/* /var/www/html

    It's really too bad that there's no easy link to 'most recent stable', but hey. By the time you read this, there will probably be a newer version.

    Now check your web site for the "LocalSettings.php not found." message and click on that link below it: "Set up your wiki."

    Here are the things to change from default:

    Database name: <gamename>_db
    Database table prefix: wiki_
    Database username: <acct_name>
    Database password: <password>

    The "name of the wiki" and "administrator account" is up to you.

    I also suggest turning on "Account Authentication" & "File Uploads". I forgot to record what other good ideas are in there. (Such as 'Cite' and 'Poem'.)

    Now the hard part: The wiki setup will give you the LocalSettings.php file. Upload that to /var/www/html/ and, once it's in there, the following critical steps:

    cd /var/www/html/
    sudo chmod o-r LocalSettings.php
    sudo chown -R www-data:www-data .

    Your Wiki is now set.

    <I hope. Further instructions to follow.>

  • Pitcrew

    thank you

    The hero we need!

  • There is a new hurdle on DigitalOcean with this one, which appears after you do the mysql_secure_installation step. Not sure how new it is, but it definitely is a thing that is.

    The 'step three' in this tutorial is necessary to allow the wiki to communicate with the MySQL database unless you create a separate wiki user, and don't use root. You may want to use a separate MySQL user for the wiki, but if you don't, you will need to follow these steps to allow the wiki to communicate with MySQL. If you don't, root wouldn't connect (as of this morning), but this change did fix it immediately.

  • $5 a month is super fancy. Following for setup halp, and patiently await the guide to kidna... I mean, hire a coder.

  • @surreality

    LAMP should have MySQL installed and ready to go already. I will put a placeholder in the guide to remember to check it out.

  • @thenomain It is installed -- it's just installed as shown there, with step three being essential if you want a wiki to run, since in the wiki install process, you have to feed it a MySQL password.

    If you use root, which is the default for wiki installs, it'll glitch hard with no explanation, and it's due to that step three condition in the tutorial. (It may do this with non-root accounts as well by default.) It kept insisting it could not, would not, not with a goat or in a moat, connect to MySQL until that adjustment was made, on a default install of the LAMP droplet. So, welp, another hoop. :/ Found out the hard way yesterday.

  • Some @Thenomain should just set up a server running TinyMUX empty and then clone images to anyone who wants one.

  • @skew Unfortunately Digital Ocean doesn't let you just tuck away an image to make clones for people easily like that. It's kinda annoying the way they have it set up, and it costs you $5/mo to keep the base "master clone" server active. (ETA: Apparently they fixed that; you can now keep a snapshot around without the master. It's still kinda a pain to use though IMHO.)

  • @faraday Yes and no. You can save snapshots of a droplet that you can create a new droplet from at any time, and they're pennies a month to store.

    You'd want to take a couple of snapshots at a time between rounds of spinning it up if you want to hand them out, though, since you can hand off a snapshot that someone else can then spin up as a droplet -- but once you hand it off, you no longer have that copy yourself to work with. It doesn't clone it to them, it transfers full ownership of that particular snapshot to the other party.

    I pull stuff up and down a lot in the short term to grab this or that off of an old experiment (of which there are many), so can confirm it's really not that bad.

  • @surreality said in Setup ChimeMUX + MediaWiki on Digital Ocean:

    @faraday Yes and no. You can save snapshots of a droplet that you can create a new droplet from at any time, and they're pennies a month to store.

    Yes, but I've done it for Ares as well and it felt more like a PITA. Creating the cloned snapshot (so you don't lose your original), waiting for them to accept ownership (and you get charged for the snapshot in the meantime), etc. Also sometimes they change plans, and your snapshot gets associated with a different cost tier... it's not as simple as it should be IMHO. YMMV obviously.

  • @faraday @surreality Oh, boo. I thought you could just keep the snapshot and continually hand it out.

    Then, yeah, probably the best way would be to keep the "blank" TinyMUX-with-Wiki game droplet sitting there, doing nothing at all (except getting code updates as necessary). But that's surely an investment.

  • What about using the mocker/docker solution like this guy/gal brought up in the past?


  • @thatonedude said in Setup ChimeMUX + MediaWiki on Digital Ocean:

    What about using the mocker/docker solution like this guy/gal brought up in the past?

    I don't know. The post links to a .tgz file and while I would like to think there's instructions in there, I'm posting my existing experience to help others.

  • Updated SQL section quite a lot.

    *** UPDATE ***

    If you used the previous method, please @shutdown, run the extended sudo apt-get, then follow the ChimeMUX installation instructions again.

    The SQL dev binaries weren't installed.

  • Update

    Base MediaWiki instructions are in. I had to update the instructions on creating the mySQL account in order to complete it without being confusing.

    I would like a section on "best-practices wiki setup", as well as some of the most critical wiki plugins for our hobby, if anyone has suggestions.


  • Extensions I won't do without:
    https://www.mediawiki.org/wiki/Extension:Page_Forms - not preinstalled
    https://www.mediawiki.org/wiki/Extension:DynamicPageList3 - not preinstalled
    https://www.mediawiki.org/wiki/Extension:ParserFunctions - preinstalled (enabling string functions is also useful)

    Extensions I find useful:
    https://www.mediawiki.org/wiki/Extension:MagicNoCache - not preinstalled
    https://www.mediawiki.org/wiki/Extension:Variables - not preinstalled
    https://www.mediawiki.org/wiki/Extension:CollapsibleVector - not preinstalled

    Mrph: (none preinstalled)
    https://www.mediawiki.org/wiki/Extension:Arrays - very useful, but not currently maintained, mostly useful to automatically calculate dates/time periods with: https://www.mediawiki.org/wiki/Extension:DateDiff
    https://www.mediawiki.org/wiki/Extension:Header_Tabs - I like this one, y'all may not. Not necessarily easy to work with re: custom styling, as it is fussy.

  • @surreality said in Setup ChimeMUX + MediaWiki on Digital Ocean:

    https://www.mediawiki.org/wiki/Extension:ParserFunctions - preinstalled (enabling string functions is also useful)

    Yeah, ParserFunctions is now one of the things you can install by default.

    And String Functions isn't useful, it's goddamn mandatory. This is the one I was hoping to be reminded about.

    "DPL3" being the other one.


  • I’m told by @skew that the curl doesn’t always work or stopped working or something. I will try wget as mentioned here when I can: https://www.howtoforge.com/tutorial/how-to-install-mediawiki-on-ubuntu-1804/#install-mediawiki