Register a SA Forums Account here!
JOINING THE SA FORUMS WILL REMOVE THIS BIG AD, THE ANNOYING UNDERLINED ADS, AND STUPID INTERSTITIAL ADS!!!

You can: log in, read the tech support FAQ, or request your lost password. This dumb message (and those ads) will appear on every screen until you register! Get rid of this crap by registering your own SA Forums Account and joining roughly 150,000 Goons, for the one-time price of $9.95! We charge money because it costs us money per month for bills, and since we don't believe in showing ads to our users, we try to make the money back through forum registrations.
 
  • Post
  • Reply
Warbird
May 23, 2012

America's Favorite Dumbass

Abisteen posted:

I'm considering dropping 15 bucks on a month of server hosting for me and my friends as kinda just a fun thing to do. I know this is inefficient when I could just run a dedicated server myself but I also am not really savvy about that sort of thing and would rather hand over a few bucks and not have to think about it.

Does anyone know how individual worlds work with the premium server hosts? Do you make a world and upload the file on a web interface, and that becomes the world the server is hosting? Or do those services generally generate a world themselves and that world is the only one that can be on the server?

Also, any recommendations on premium hosting? I had an Ark server a few years ago through Nitrado and it worked...fine but also their website felt really sketchy at the time like I was relying on my credit card's fraud protections or something.

If you’re willing to a bit more tinkering you can get a Google VPS (a virtual machine) going for free for 90 days and more credit than you could realistically use. Doesn’t auto charge you either. You could be up and running in about 15 minutes and have full access to your files and so forth. Nothing against the services that just just the server for you, but they’re doing the same thing and charging you for the trouble.

Shoot me a PM of you have any questions and I can help walk you through.

Adbot
ADBOT LOVES YOU

Warbird
May 23, 2012

America's Favorite Dumbass

I’ve seen folks asking about hosting servers in a few places and figured I’d share something I typed up for another group of folks here should it be of any usage. Friends don’t let friends pay a premium for hosted servers.

So you want to host a Valhiem (or other game) server
There are a few different ways to skin this cat, but I generally recommend using a Google Cloud Virtual Machine (VPS) for a few different reasons. The first being that you get $300 in credit for 90 days that does not auto charge you at the end of that period. The second being that opening parts of your network to the internet is a bad idea unless you're really careful. Doubly so as the game is hot as hell right now and may have some security issues that haven't been found/addressed. Third, your upstream is probably terrible unless you're lucky enough to have fiber or some other expensive internet plan. The following steps assume you're using powershell or some bash terminal on your local machine. Don't use cmd, it's 2021 gramps.

Making a server
Head over to Google Cloud and make an account. It requires a google account (you already have one) and a credit card (you're here, so you have one). Sign up/in and you should be dumped to a portal of questionable UI/UX. Welcome to the cloud. On your computer (the thing you're using the browser on) make yourself a ssh key.
code:
ssh-keygen
in powershell or bash or whatever command line your OS uses should do the trick; just hit enter a bunch and use the default values. Once done enter the command
code:
cat ~/.ssh/id_rsa.pub
(works in everything) and copy the content somewhere; we'll need that in a minute.

Head back over to the Google Cloud portal you logged into a minute ago. If prompted, make a project with a name of your choosing and look around for something called 'Compute Engine', that's where the VM magic happens. Hit 'Create Instance' up at the top and we can start building out our VM. Your needs for VM "oomph" will vary from game to game, but VH is pretty light so we can get away with an e2-medium or standard for now. You've got more credit than you can burn for this trial so feel free to play around a bit. Name it if you want to and set your region to something centrally located to you and the folks likely to play on the server.

For your boot disk I recommend going with Unbuntu 20.04 LTS, but you're free to go with something different if desired; it's largely preference but stick to a LTS of some kind. You can leave the boot disk size and type as default for now. Click the 'Management, Security, ect' drop down and head over to the security tab. Under 'SSH Keys' you'll see a box asking for a public SSH key, paste in that command output we saved earlier. Hit create and wait a minute or two, you now have a cloud server, ain't that neat?

Accessing your server and setting this nonsense up
Grap the 'External IP' address from the portal the browser dumps you to and head back over to your Powershell/Bash/whatever instance you were using earlier. Enter
code:
ssh [The External IP Address]
and through the magic of ssh key authentication you'll now be sitting in your shiny new VPS. Neat! Time to get a game server set up. The fine folks over at LinuxGSM have made this idiot proof and fast. Details can be found at: https://linuxgsm.com/lgsm/vhserver/ but it amounts to running (assuming Ubuntu and that you're acting as your default user, not vhserver)
code:
 sudo dpkg --add-architecture i386; sudo apt update; sudo apt install curl wget file tar bzip2 gzip unzip bsdmainutils python util-linux ca-certificates binutils bc jq tmux netcat lib32gcc1 lib32stdc++6 steamcmd libsdl2-2.0-0:i386 -y
to install some needed software (accept terms during the steamcmd portion), making a user
code:
sudo adduser vhserver
(create and write down a password, default/blank everything else is fine), changing to that user
code:
su - vhserver
installing linuxgsm's valhiem server manager
code:
wget -O linuxgsm.sh https[REPLACETHISWITH A COLONGODDAMNYOUAWFULAPPILOVEYOUBUTSTOPAUTOFORMATTINGINCODEBLOCKS]//linuxgsm.sh && chmod +x linuxgsm.sh && bash linuxgsm.sh vhserver
and then having it set up and install a server.
code:
./vhserver install
Now this just sets up a default instance with no password, so you may want to customize your server before starting it (see below). Follow the prompts and you have a fancy new Valheim server ready, but we need to let people, you know, actually connect to the ding dang thing.

Connecting to the ding dang thing
To the right of where you grabbed the external IP earlier, you should see three vertical dots. Give that a click and select 'View Network Details'. On the left select 'Firewall' and then 'Create Firewall Rule'. Name the rule something of your choosing and mosey down to "Targets" and change it to "All Instances in the Network". Move down to "Source IP Ranges" and enter in
code:
0.0.0.0/0
so anyone trying to access the ports we're about to designate will be able to. Under "Protocols and Ports" check the "TCP" and "UDP" box (iirc VH only uses UDP, but let's cover our bases) and enter in 2456-2457 for both. Save the rule.

Now once we get the server started you can enter in [External IP]:2457 into the game to connect to your server. Neato.

Customizing your Server
You likely don't want a default server instance with no password sitting around. Let's fix that. In your server enter the command
code:
vi ~/lgsm/config-lgsm/vhserver/vhserver.cfg
and then press i. Navigate to the bottom of the doc and on a new line enter in the following (note the contents of brackets ( [ ] ) are to be replaced with your values. EG - servername="lowtaxisafatbitchbaby"):
code:
servername="[The name you want for your server]"
serverpassword="[Password of your choosing]"
port="2456"
gameworld="[The server's world seed, can be whatever you want within reason]"
public="1"
Press Escape and Shift + Z Z to exit and save.
Type in
code:
./vhserver start
give it a minute and your server will be accessible via the IP address, port, and password you set up.
There's more to be had here about stuff like setting up admins and whatnot, but if you're hosting with a friend or two you should be fine with this. If you're going for a public world with no pass then you're on your own there friend.

Warbird fucked around with this message at 04:55 on Feb 23, 2021

Warbird
May 23, 2012

America's Favorite Dumbass

Furism posted:

Do you have the size of all the packages from your shell log? My VPS is sort of short on storage.

E: Also, don't they have a docker container that would make it even easier?

Give me a bit and I'll let you know. It's a 10gig VPS and I've got a few ~1 gig world backups so not too large. Docker would be less trouble especially if you can do something like AZ's App services setup; I don't think there was an official container image out there when I last looked but I'd be amazed if there weren't multiple community made ones within a minute or two after the server software was available. That would for sure be the easiest way to go about it though; though at that point you're talking Watchtower and all sorts of fun stuff.

e - ~ 6 gigs used and about 4 of those are word file backups (and the active world file), so 3 or thereabouts should do you. Game's tiny yo.


Midgetskydiver posted:

How long does this free trial last?

And thanks for this post.

90 days or until you use up your $300 in cloudbux, doesn't renew and charge you but does require a CC for verification purposes. I've got a 50 $/month box going so I'm not going to burn through my allotment before it expires.

Warbird fucked around with this message at 17:01 on Feb 20, 2021

Warbird
May 23, 2012

America's Favorite Dumbass

Lib and let die posted:

Hey FYI there's some bbcode tags in here :)

Must have auto parsed at some point, thanks for letting me know!

Warbird
May 23, 2012

America's Favorite Dumbass

Inexplicable Humblebrag posted:

so this is really cool, thanks for that.

for people doing this on windows who presumably do not touch computer in quite such an intimate way for a living, my lessons are:

  • the cat command doesn't work; just copy the contents of the id_rsa.pub file by opening it in notepad
  • take the BB tags out of the wget line to install the server manager
  • entering [External IP]:2457 won't work if you've set the config to port="2456"

Minor point of order, cat should work in powershell unless something weird is going on, but your point stands. Whatever works is best. Microsoft more or less has all Linux commands you want redirect to their Powershell versions. Thanks for the heads up, I’ll make a few tweaks when I have some time this afternoon.

Warbird
May 23, 2012

America's Favorite Dumbass

Second boss tips please tia. Solo just seems to be a war of attrition with flint arrows. Thinking about repurposing one of the abandoned stone towers into a siege/cheese platform.

Warbird
May 23, 2012

America's Favorite Dumbass

Do they have any eta on a controller fix? My dude just spins around unless I disable game pad input (despite no game pad being attached to this computer). I totally get the game being made off kb+m but it would be nice to steamlink to the game on my tablet and mine some copper or whatever during slow times at work.

Warbird
May 23, 2012

America's Favorite Dumbass

Not a problem. Be advised that I have to make a couple of tweaks to that document based off of feedback so feel free to ask any questions here or PM me if clarifications are needed.

Warbird
May 23, 2012

America's Favorite Dumbass

Oh for sure. iirc you’d want to get a backup of the world file, toss it onto the VM and change the world name or whatever to reflect the backup’s name. Might be a bit more to that, but let me double check.

This fella gets into the details: https://youtu.be/xGO_JirjwUI

Warbird
May 23, 2012

America's Favorite Dumbass

mastershakeman posted:

i dont think there's a , after the start syntax in the final line

I have no idea what you're talking about :v:

Got lazy with tags when porting this over

Warbird
May 23, 2012

America's Favorite Dumbass

Doing a little miner’s shack with a repair bench is the pro move if you have a few central located deposits. Making a road to use with a cart is more or less mandatory.

Warbird
May 23, 2012

America's Favorite Dumbass

mastershakeman posted:

Hey it wouldn't be a Linux script without a few typos and having to delete [url] brackets after it screws up the wget.

Oh drat it, I think that explains the wget error one goon was having. Stupid auto formatting that is usually actually really helpful.

Warbird
May 23, 2012

America's Favorite Dumbass

DrBox posted:

For those struggling to make a lot of bronze, the most efficient method for me was run through a patch of black forest, mark all the copper on the map, then build a little road using the hoe linking them all together and bring the cart around. Takes a little longer to build the road but you save so much time after when you're dragging the cart around. Also the copper deposits go much deeper than you'd think. Dig down when you think you got everything from the surface and you'll find more.

This plus a mining hut to repair your pick/sleep is the way to go. Valheim: Building Roads For Fun and Profit.

Warbird
May 23, 2012

America's Favorite Dumbass

Does the path tool do anything beyond stripping grass and whatnot from the target area? Is there a reason to use it vs the smooth tool?

Warbird
May 23, 2012

America's Favorite Dumbass

Saxophone posted:

Yeah, I've noticed a few people are like "well, the lads and I knocked a road system the other night..." And I'm just like "I have no lads."

You’re welcome to hop onto my VPS and get as infrastructure as your given week will allow. PM me and I’ll shoot you the details; unless we’re cool with posting server deets here.

Warbird
May 23, 2012

America's Favorite Dumbass

It would be a sick as hell quality of life improvement to be able to just upgrade entire stretches of path/road al la Sim City or the like.

Warbird
May 23, 2012

America's Favorite Dumbass

Midgetskydiver posted:

Shout out to the quoted poster for putting in some serious work to get our server up and running. Guiding me through that poo poo must have been a real chore but he did it with a smile. Cheers!

Glad to hear you got that running! What ended up being the solution to your wget issue?

Warbird
May 23, 2012

America's Favorite Dumbass

I was about to say. They added “recommended cron jobs” in the last few days and everyone should implement them. Much love to the folks doing this via steamcmd raw, but the lgsm wrapper makes management so much nicer/easier.

Warbird
May 23, 2012

America's Favorite Dumbass

Spent a half hour boating around initially to find a swamp. In reality that was about 10 minutes to find a swamp and then another 20 to find a biome that wouldn’t instakill me to plop a portal down. Ended up just logging on a beach near my boat for the evening; maybe I’ll have better luck tomorrow.

Warbird
May 23, 2012

America's Favorite Dumbass

Fun fact: LinuxGSM auto purges old backups so your VM doesn’t get filled up. God it’s such a good tool.

Warbird
May 23, 2012

America's Favorite Dumbass

ughhhh posted:

If you move quickly into a swamp biome from a brighter nicer place the game doesn't load the biome lighting fast enough and everything looks so much better and all the enemies have bright beautiful colors.

I noticed that this evening. Upon observing a leech I believe my quote was, “that sum bitch is purple”. Quite pretty IMO. That said I understand what they’re going for with the rain. Might be nice if it was only like 90% of the time instead of 100.

Warbird
May 23, 2012

America's Favorite Dumbass

ughhhh posted:

So crypts and ruins in the swamps with the green torches outside seem to indicate the presence of boss location tablet. The loaction tablets seem to indicate the closest boss location in relation to the tablets location.

Idk about that. If I recall right I had two with the flames, but only one has a tablet.

Warbird
May 23, 2012

America's Favorite Dumbass

The ‘Dedicated’ seed is about the same. I haven’t been able to muck about with the mountain that’s near spawn but I think it’s just a single peak with nothing on it. Swamps are a boat trip away, but not crazy far.

Warbird
May 23, 2012

America's Favorite Dumbass

Should we set a blanket policy to spoiler contents of the game past a given boss/environment? If we do end up doing that I’d motion we set Bonemass as the cutoff as the Swamps are the first real ramp up in difficulty that would have the highest amount of discussion day to day. Honor system works fine too, just floating the notion.

Warbird
May 23, 2012

America's Favorite Dumbass

Mod idea: Literally everything is the same, but the unarmed kick has its damage multiplied by 30 and fukking launches poo poo when it connects.

Edit -

Another one: All unarmed attacks are just kicks. Duke soundboard bundled in.

Warbird fucked around with this message at 05:29 on Mar 4, 2021

Warbird
May 23, 2012

America's Favorite Dumbass

ughhhh posted:

Could someone repost some of the dedicated server advice that was posted up thread? I'm thinking of starting a dedicated server on my plex machine for a bit.

Check my post history for the thread. Feel free to ask any questions you have or offer points to improve on. Just skip the gcp portions and/or reference the docs I’m talking about directly. I’d also suggest looking into Docker if you’re down to play with containers.

Warbird
May 23, 2012

America's Favorite Dumbass

The Grumbles posted:

Okay - so I've gone through Warbird's GoogleVM instructions to the letter, but whenever I try and start the server and check the details, it comes back as 'stopped', which is why I'm not sure it's working. The only thing that doesn't make sense to me is that none of the game binaries seem to exist - I can't find any file structure that's like Iron Gate/Valheim/ etc (which I was looking for so I could find somewhere to drop in a pre-existing world) - just a lot of stuff connected with vhserver. Am I missing something here?

Sorry for what might be a stupid question. I'm not a programmer!

edit: it's this ~/.config/unity3d/IronGate/Valheim/worlds/ that doesn't seem to exist anywhere on the VM.

edit: it's alive! for anyone wondering, the default Google VM might not be good enough - I had to bump up to 'standard' so it wouldn't crash on start.

Glad to hear you got it working! Sounds like you sorted it out, but migrating is a matter of moving over the world file to the vm (usually via SCP/WinSCP) and changing the launch parameters to point at the existing world. This guy details the process:

https://youtu.be/xGO_JirjwUI

Warbird fucked around with this message at 15:15 on Mar 6, 2021

Warbird
May 23, 2012

America's Favorite Dumbass

The Grumbles posted:

Edit: I've never been a server admin before. This is exciting. Is there any way I can add a message of the day to display a load of passive aggressive text when people log in?

Sadly no, there aren’t ways to dink around with a running world via the CLI right now. Though that may come. If you want the real sysadmin experience set up some alerts so your life can be interrupted by umpteen sources yelling at you to fix your poo poo.

Also be sure to set up the cron jobs (automated tasks that run at a given interval) that are listed in lgsm’s docs/instructions. Half the reason to use lgsm is to abstract out and automate a good deal of the management work.

Warbird
May 23, 2012

America's Favorite Dumbass

Has anyone had a server load you into the "wrong" world? I hopped in my VPS and was dumped at the starting alter of a seed that wasn't my usual one. Restarting the VPS fixed the issue, but I'm a bit mystified what happened there.

Adbot
ADBOT LOVES YOU

Warbird
May 23, 2012

America's Favorite Dumbass

Are there any practical means to retrieving wrecked boat materials in semi deep water? I’m assuming I’m going raising up the sea floor and hoping the 100 iron nails or whatever haven’t despawned. I’m happy I was at least able to retrieve the cargo pretty easily.

  • 1
  • 2
  • 3
  • 4
  • 5
  • Post
  • Reply