" itemprop="description"/>

JSE's Blog

Jonah's blog is here

UPDATE
It appears in later versions of LGSM that it automatically links steamcmd to Engine/Binaries/ThirdParty/SteamCMD so you will not need to deal with the segfault and download of steamcmd now. PHEW. That makes life easier. That means settings mods now is as simple as specifying them in Game.ini and GameUserSettings.ini

I don't play Ark or know anything about it, but with ECMB, people want game servers, and I'm their guy. I am running a dedicated server at OVH with Ubuntu 16.04. My brother "asabean" is the one who decided what config settings the ARK server should have, and he happily applied the variables in Game.ini and GameUserSettings.ini. He essentially just copied from his local save in Windows and pasted in the parameters into the file in the text editor in putty. Yes, it was nano. ;)

I'm a fan of the scripts from gameservermanagers.com, which is what I used to install Ark. It's very easy and way better than doing it manually through streamcmd as I quickly learned with running CSGO servers. It's nice to be able to just type ./arkserver install and ./arkserver update and not having to think about 'did I set force_install_dir correctly'? Heck... it's annoying when you think ~ will work with force_install_dir (normally meaning home for those who don't know) but instead it actually makes a directory named ~. Been there, done that, so anyway...

Getting mods to work was a challenge. It seems quickly googling how to do it isn't that easy with Ark Servers as there's a ton of misinformation out there, however Ark is supposed to download and run them pretty much automatically now I guess. Initially we uploaded the mod files from the Mods folder on Windows, and adding ActiveMods= in GameUserSettings.ini. (FWIW these files are located in ~/serverfiles/ShooterGame/Saved/Config/LinuxServer That didn't work.

Then I decided to add

[ModInstaller]
ModIDS=

to Game.ini and tried to start the server with LGSM. It failed. Checking logs showed some sort of segfault crash.

Huh... progress, but still not working.

Googling around led me to this thread on the steam forums. User "TheKurrgan" explained that the automodinstaller or whatever it's called in Ark depends on SteamCMD that doesn't exist in the proper location (turns out, seperate from the steamcmd you used/lgsm used to install it), and so you need to add it yourself. To do so, in your serverfiles/ directory, navigate to Engine/Binaries/ThirdParty/SteamCMD. Then, make a new folder called Linux with mkdir Linux and then cd Linux. They then proceeded to download steamcmd with curl using curl http://media.steampowered.com/installer/steamcmd_linux.tar.gz > steamcmd.tar.gz (of course you can use wget or something else similarly if you don't have curl installed), extract it with tar -zxf steamcmd.tar.gz and execute ./steamcmd.sh.

SteamCMD will then update and whatnot, and when you finally get the Steam> prompt, just type exit and start your server.

It worked!

Now FWIW, I read elsewhere you need to have the mods in GameUserSettings.ini and keep them in order, so I kept just copied the same order from the desktop. How true or important this is was beyond me, I just took their word for it. The particular mods we used looked like this in the end:

ActiveMods=764326117,774762563,627340159,554678442

and in Game.ini

[ModInstaller]
ModIDS=764326117
ModIDS=774762563
ModIDS=627340159
ModIDS=554678442

Once I started the server with LGSM it downloaded the mods and all is well. Now onto figuring out admin commands and whatnot....

Anyway, that's what I learned doing this so far so anybody else who gets stuck on getting mods to work on a linux server, hopefully this helps!

So you logged in as root/user with sudo permissions... ok? You want to be at least 20% secure though, and the next coolest game server shouldn't be ran as root. You're just not as dank as Bryan Lunduke.

Perhaps it's Minecraft you want to setup, and you're going to use GNU Screen for running it in the background like a bajillion of online tutorials suggest.

You add a user for minecraft, but hey! Let's be a little bit secure and you use SSH Keys and don't want to be bothered to setup a key for your new minecraft user. OR when you run adduser minecraft you also add the flag --disabled-password or you used the good ol' useradd and didn't set a password because life goals or something.

Whatever the reason is, you don't want to be bothered with firing up another putty window just to run screen, you just want to su to the new user and do your magic.

Now you can always just run screen -dmS sessionname your command here and it will run the command specified after the session name. Assuming you didn't screw up, it'll work fine.

But what if you don't want --dmS? What if you want to attach to the screen session? Whether you're using screen -r or just starting a new session the classic way with screen -S, it doesn't work, all because you su'd in. Screen can't control your pseudo-terminal because you're really using the one from the user you su'd from yet you're running screen from the su'd user. It cries out in agony! Cannot open your terminal '/dev/pts/0' - please check. But alas.... just run this command first:

script /dev/null

Then run your screen session.

Just remember to type exit when you're all done to end "writing" the script.

It'll work. You're welcome.

TL;DR: If you just want the rewrite rules for Lighttpd, scroll to the bottom code snippet.

So like most every other PHP app I've worked with, everybody seems to support both apache and nginx but poor old lighttpd gets left out in the cold and has no support on how to configure it in documentation.

Well have no fear, because you'll have to pry lighttpd out of my cold dead hands!

A while back I setup a VHOST for jseb.ca on Lighttpd with an FTP server so I could integrate it with Sharex. One other feature sharex seems to support is "short URLs" using an API from a PHP script called YOURLS. So I wanted to install it on my low end box.

Now if you caught on earlier, this blog is hosted using a flat-file database platform called htmly, because my lowendbox with only 128MB RAM isn't really ideal for running something like wordpress. MySQL can sure eat the RAM, so I sort of decided to not use MySQL on this server at all.

SQLite on the other hand is a perfect candidate. While it locks the entire database when you're writing to it, something like a URL shortener is a perfect application, since it's pretty much read only. Only time it writes is when I decide to add a URL, which is a fast query and so few and far between, it's a way better candidate for a personal URL shortener over MySQL for a site my size anyway.

Unfortunately, YOURLS doesn't support SQLite out of the box. Luckily there's a great project here on github that adds it. Sweet! That was easy! Install php5-sqlite on my Debian install, chown/chmod your stuff so PHP can write to the directory YOURLS is in, install it by going to /admin/ and we're all set.

However, first thing you'll notice if you're running lighttpd is you'll get 404s since lighttpd doesn't support .htaccess, which YOURLS generates when you first install it. A search around on the internet will find stuff like this, but all the snippets in the examples causes issues for me.

While the last post from gsdefender (from Apr 24, 2016) works, my index.html on jseb.ca doesn't! Now I know it's not special, but it triggered me that if you visit the root, rather than showing my index.html it resulted in a redirect loop which freaked out Chrome.

Now like you probably figured out by now if you read anything here, I'm not much of a sysadmin or programmer, but I know my way around enough to be dangerous. I never got my head around regex stuff, but a quick look at lighttpd documentation says the ?

match zero or one of the previous symbol

Previous being keyword here... I just removed it.

So, now, with a vhost setup and mod_rewrite enabled for lighttpd, my lighttpd.conf looks like this for jseb.ca:

$HTTP["host"] == "jseb.ca" {
    server.document-root = "/var/www/upload/"
    url.rewrite-once = (
#        "^/([0-9A-Za-z-]+)?$" => "/yourls-go.php?id=$1",
#        "^/([0-9A-Za-z-]+)?\+$" => "/yourls-infos.php?id=$1",

        "^/([0-9A-Za-z-]+)$" => "/yourls-go.php?id=$1",
        "([0-9A-Za-z-]+)\+$" => "/yourls-infos.php?id=$1",
)

As you can see, the original copy-pasta from the github issue is commented out so you can note the difference between the two. It works for me... now my uploads and shorturls both reside on jseb.ca and coexists pefectly along with an index.html. So hopefully this helps anybody else who wants to run YOURLS on lighttpd.

Why did they put the ? to begin with? I don't know? Perhaps you can tell me? enter image description here

169pp... need moar pp... to Tillerino I go...

Finally 3000pp

- Posted in Life/Random by with comments

I'm still a scrub but finally got to 3000pp... enter image description here

I'll either:

  • a.) Be stuck at this rank forever
  • b.) Look back on this blog post and LOL at how bad I was then.

Who am I kidding? It'll probably be a.

I couldn't upload images to htmly with my lighttpd config. Further, the lighttpd config blocked my favicon.ico file. All images would result in a 404 when uploaded, despite ls-ing to the directory shows it uploaded successfully. I'm not using vhost with lighttpd... and honestly ... I blindly copied and pasted the config directly from the htmly documentation found on the github readme (and of course... enabled the rewrite mod in lighttpd.conf which is as simple as uncommenting. The verbatim code was:

$HTTP["url"] =~ "^/config" {
  url.access-deny = ( "" )
}
$HTTP["url"] =~ "^/system/includes" {
  url.access-deny = ( "" )
}
$HTTP["url"] =~ "^/system/admin/views" {
  url.access-deny = ( "" )
}

url.rewrite-once = (
  "^/(themes|system|vendor)/(.*)" => "$0",
  "^/(.*\.php)" => "$0",

  # Everything else is handles by htmly
  "^/(.*)$" => "/index.php/$1"
)

My issue was I would get 404s on images I upload. So I modified the line "^/(themes|system|vendor)/(.*)" => "$0", to show "^/(themes|system|backup|vendor|content/images)/(.*)" => "$0", since content/images is where the images reside when you upload them with htmly. Additionally, backup was added so you can download backups direct from the interface.

Next, I added a line directly below it "^/(favicon\.ico|robots\.txt|humans\.txt|sitemap\.xml)$" => "$0", which of course, ensures favicon.ico, robots.txt, humans.txt and sitemap.xml actually works.

It works. It's not perfect. I want to be able to create other directories without rewrite screwing me over for hosting random files and whatever else I feel like. Perhaps I'll setup proper vhosts and elaborate on that down the road as I work on this site. For now the config is in /etc/lighttpd/lighttpd.conf at the bottom, and it gets the job done, so I'm happy.

FWIW... here is my entire config I ended up modifying to for those of you who also want to blindly copy and paste :P

$HTTP["url"] =~ "^/config" {
  url.access-deny = ( "" )
}
$HTTP["url"] =~ "^/system/includes" {
  url.access-deny = ( "" )
}
$HTTP["url"] =~ "^/system/admin/views" {
  url.access-deny = ( "" )
}

url.rewrite-once = (
  "^/(themes|system|backup|vendor|content/images)/(.*)" => "$0",
  "^/(favicon\.ico|robots\.txt|humans\.txt|sitemap\.xml)$" => "$0",
  "^/(.*\.php)" => "$0",

  # Everything else is handles by htmly
  "^/(.*)$" => "/index.php/$1"
)

But yeah.... fixes that issue for you lighttpd users out there who can't upload images with the htmly platform :)

Why am I using lighttpd? Well certainly apache is out of the picture for a 128MB Low End Box. Lighttpd was the choice mainly because I've used it more than nginx. I like nginx and have used it a bit but lighttpd gets the job done for me where I have more experience with it (it use to serve the chickentalk.org forums I used to run a few years ago well so you can say I used it in "production") and is rock stable as far as I can tell for all the memory leak complaining I've heard about in the past, so I use it.

Perhaps one day I'll switch to nginx since that's where the community is at, but old habits die hard. It's always been my goto apache alternative.

So there's lots of tutorials on the osu!forums like "Ultimate guide to low-latency osu! on Linux", "Solution: Running osu! In Ubuntu or Xubuntu", etc. And I'm sure these are all good tutorials that are awfully verbose. But I'm lazy and I didn't read them. I don't like reading too much, only writing, that's why I never proof read haha! I'm contrarian, it shouldn't be hard.

So here's the lazy way. I assume you know your way around linux and you actually know how to configure it (eg. Install proprietary graphics when needed) which personally, I feel that is beyond the scope of any one tutorial, especially how that changes so much and distros vary anyhow. Hardware configurations are a separate issue and effect far more than just osu! anyway, so look for tutorials on that if you need help with tuning any of your hardware (tablets, graphics, what-have-you). Google is your friend.

So if you are looking to install osu!... here is the TL;DR version

  1. Install Wine. (If you're on Ubuntu or debian, it's as easy as an apt-get)
  2. Create a 32bit prefix if you are on 64bit linux (you probably are). Don't know how? If you're learning to use linux and wine you should learn as pretty much everything you'll use in wine will need a 32bit prefix. A google search returns this for example.
  3. Install .net 4.0 and some fonts. I don't know what fonts are necessary but winetricks makes life easy and has the option to install all fonts. Which, by the way... you should use winetricks to do both since it makes it really easy. Another easy apt-get on Ubuntu/Debian. Soooo if you're new.... to run Winetricks on your 32bit prefix? WINEPREFIX=/whatever/your/path/to/32bit/prefix winetricks
  4. Finally, download osu! installer like you normally would on Windows. Fire up a terminal, cd to the directory where the installer is and run it in your prefix. Protip: Something like WINEPREFIX=/whatever wine osu\!installer.exe (Remember to escape the ! with a \ so Bash doesn't freak out over syntax crap)

It will install. I literally had no issues with getting it to work. No input lag. Great fps. I don't see the need, at least with the distro I was running (Ubuntu 16.10 at the time) to do any fancy hacking or installing different kernels. It works out of the box. You can then run the game osu\!.exe the same way you did with the installer. If you don't like using the terminal to launch it all the time make a launcher script or something on your favorite desktop environment of your choice to do it for you.

Otherwise if you want more help post a comment, post in one of the threads above, follow the instructions in those linked threads, cry to peppy to release the native linux client. But just don't make life too hard for you when you don't need to ;)

Hello world!

- Posted in Uncategorized by with comments

This is my first post! More to come someday. This blog is where I'll post... probably mostly linux stuff? Anything I feel like writing about, you'll find it here.

Cool part about this? I want to see how far I can push a Low End box (as if you call a blog nobody reads "pushing"). So...

This website is running on a lightweight blog platform called htmly. It's flat file based when it comes to storing data, so it's memory footprint is way smaller. I save a lot of resources that I would have used with something like wordpress.

I installed lighttpd web server, and php5. Setup a custom config in lighttpd that htmly suggests so you can't access the config directories and so that rewrite works. Server OS running Debian 8 on a BuyVM 128MB $15/yr Low End Box. I don't expect to get much traffic here so I figure this LEB will last me out a while. And hey.... for running a fully functional blog/CMS platform, this looks sexy:

enter image description here

Yeah that's right! 8MB of ram used total for the entire system and web server. Of course, it's idle, and it is openvz (so not all the processes a dedi would have and in turn very little ram usage) but still, take that apache! No way it would use such little memory even idle haha