SRCDS Steam group


sv_downloadurl tutorial questions and suggestions
#1
Original old thread by DarkZealot89 can be found here:
http://forums.srcds.com/viewtopic/1077

sv_downloadurl, what is it actually? Do I need it?
No you don't need sv_downloadurl, however if you have a lot of custom files on your server like maps and models it is real handy to have a blazing download. Downloads directly from the actual gameserver can lag and be a pain in the butt due to being so slow, you can lose a lot of clients.

sv_downloadurl acts as an image of the server located on a website somewhere else, which contains all the custom files you have. Setting sv_downloadurl will speed up the downloading process, when on a good webhost downloads can be next to instant and will reach speeds never seen before.

How to set it up:
First of all you need webspace somewhere, in this tutorial I will use "http://svdownloadurl.com/username" as my webspace.

Second thing you have to do is create a folder on your webspace named exactly like the mod is called in the SRCDS folder, I will use "cstrike".
Now It will look like this: "http://svdownloadurl.com/username/cstrike"

Good, now I have 2 new maps and a sound that can be played within the server:
Quote:fy_pwnage.bsp (Location: cstrike\maps)
surf_leet_beta.bsp (Location: cstrike\maps)
mysupersound.mp3 (Location: cstrike\sound\admin_plugin)

To allow these to download real fast we have to copy them to the webspace, be sure to match the exact file folders and names on the webserver, else it won't work. Here's how my webspace looks like now:
Quote:.../username/cstrike/maps/fy_pwnage.bsp
.../username/cstrike/maps/surf_leet_beta.bsp
.../username/cstrike/sound/admin_plugin/mysupersound.mp3

Make sure all your files permissions are set correctly, people have to be able to read and download them!

Now it's ready, open up your server.cfg, on my machine it's located in C:\SRCDS\cstrike\cfg. If you run a different mod, hl2 deathmatch for example, it will be in "hl2mp" instead of "cstrike"
When opened add a line to the server.cfg containing your download url. Also be sure to have sv_allowdownload and sv_allowupload set to "1" for me it will look like this:
Quote:sv_downloadurl "http://svdownloadurl.com/username/cstrike"
sv_allowdownload 1
sv_allowupload 1

Well that's really all there is to it! Restart your server and have fun.
Note: Some websites, mostly free of charge, block the file extensions used or even the request URL sent by the game/server. So not all webhosts are compatible!

Still too slow? Slurping bandwidth?! How to, Bzip2!

Yeah, that's right, what you've seen above isn't as fast as it can get!
What is Bzip2? Bzip is a compression method/program just like winzip and winrar etc., however the source engine client has this decompress tool built in.
What does that mean? It means you can save a lot of download time, space on your webserver and bandwith while keeping the download process just as easy as it was before, all automatic.

(Windows Only) Bzipping is actually made easy by sKeletor, he made a nice batch script to automatically bzip all your files dropped in a folder.
Here's the file:
bzip.zip

Extract it somewhere you like, I put it on my desktop.
I will use the files I've used above to Bzip and upload to my webspace.
I copy fy_pwnage.bsp, surf_leet_beta.bsp and mysupersong.mp3 to the "compress" folder and double click "bzip", when it's done the black window will dissapear.
When it's done go take a look inside the "compress" folder, there they are! (End of Windows Only)

Now I have fy_pwnage.bsp.bz2, surf_leet_beta.bsp.bz2 and mysupersong.mp3.bz2. I upload them so i have the following on my webspace (same as above):
Quote:.../username/cstrike/maps/fy_pwnage.bsp.bz2
.../username/cstrike/maps/surf_leet_beta.bsp.bz2
.../username/cstrike/sound/admin_plugin/mysupersound.mp3.bz2

You can delete the big, normal .bsp files from your webspace, you don't need those anymore. Do NOT delete them from your gameserver directory!

Good now that's all set, all we have to do now is also copy them to the gameserver directory. This is how it looks like now:
Quote:... cstrike/maps/fy_pwnage.bsp
... cstrike/maps/fy_pwnage.bsp.bz2
... cstrike/maps/surf_leet_beta.bsp
... cstrike/maps/surf_leet_beta.bsp.bz2
... cstrike/sound/admin_plugin/mysupersound.mp3
... cstrike/sound/admin_plugin/mysupersound.mp3.bz2

As you can see I have both the normal file and the bz2.
The server needs them both!

That's it, you're all set to run your server with lightning fast bzipped downloads!
Reply
#2
I've written a utility that automates compressing and transferring custom content to the redirect/http server. Supports ftp and local paths. Once setup it only takes one click to update your redirect. Works on windows and linux.

I have a few other tools on my site others might find useful.

http://www.brainless.us/downloads.aspx
Manage your redirects/fast downloads with one click! SourceRSC and HL1RSC
Need a free web based game server hosting panel? Check out UGCC.
Reply
#3
I'm still having problems with sv_downloadurl.

I've even gone as far as to make sure all the files are accessible and being hit properly in the logs. But even then, when I connect I get the "Missing map" error and get tossed off the server.

Location: http://forums.railbait.com/maps/ (all the files are there!)

server cfg entries:
net_maxfilesize 99
sv_downloadurl "http://forums.railbait.com"

I see the file being hit both in the logs and with ntfilemon. I'm at a loss for why this isn't working.
Reply
#4
You need to create mime types for .bz2 (and .bsp if you'd like) in order for IIS to hand those files out. I assume you are using windows server 2003?

http://support.microsoft.com/?id=326965
Manage your redirects/fast downloads with one click! SourceRSC and HL1RSC
Need a free web based game server hosting panel? Check out UGCC.
Reply
#5
ahhhhhh you're right!

Edit: Sure enough, after adding the mime type, the files download just fine Smile
Reply
#6
Ok new guy here. Got my server up and running about two months ago. Have loaded Gungame 4, running Mani, plus a few other Eventscripts mods and such which run all the time. I'm running the game server off my residential connection, and I don't have any problems hosting for up to 12 people, until, that is, someone connects who has to download sounds or maps. My residential connection just can't do it, not that I expected it to. Our crew has webspace, and I've located all the necessary files there. The webspace is http://www.-------.com/cstrike which I'm pretty positive is correct. I've altered the server.cfg file to include

sv_downloadurl "http://-------.com/cstrike"
sv_allowupload 1
sv_allowdownload 1
net_maxfilesize 99

I have placed the exact files in the webspace in the correct subdirectories under cstrike - such as cstrike\maps, cstrike\sound\admin_plugin, etc and I've double and triple checked to make sure all the files are in the correct directories. I have also made sure that these files exist in those same directories in my game server under c:\srcds\cstrike\maps etc.

That all being said, its just not working. When I'm hopping on the server, I see it display "downloading sound xxxxx\xxxxx\xxxxx" and/or "downloading map xxxxx\xxxx\xxxxxx" but the progress bar flies by so fast I know it's not really doing it. Then, of course, when I try to play the sound...it says the file is missing. I can't seem to figure out where I've gone wrong! Is it a problem with our webhost? Or is it something I've done wrong in my setup? I've even tried navigating through my web browser to ---------.com/cstrike/sound/admin_plugin/joinserver.mp3 knowing that if things are working right, and the permissions are set right and such that it will attempt to download the file, which it does. Any help would really be appreciated, I've been hunting for a solution for a couple of days on my own now, and I'm finally ready to ask for help. (Doesn't happen often...lol)

|BstK| Revenant
Reply
#7
Make sure the capitals are the same too, I doubt it's a webhosting problem tho, unless they block requests from games...
Join the Source Dedicated Server Support Group on Steam Community!
Source Dedicated Server (SRCDS)
Free to join, Live support! (When available)

http://forums.srcds.com/viewtopic/5114
Reply
#8
Drocona Wrote:Make sure the capitals are the same too, I doubt it's a webhosting problem tho, unless they block requests from games...

I have checked case sensitivity, and a few of my files on the webserver did contain capital letters. I changed them all to lowercase to make it easy, and also changed them on my gameserver. Did that all before posting this. Nice thought though. I also have tried making a webserver on phpnet.us which I see someone else has tried and succeeded with, and this is not helping which makes me wonder if maybe it is a problem somehow on the gameserver side.
Reply
#9
Are you using bzip or just plain files, if you do use bzip make sure you ahve the zipped files on the server too
Join the Source Dedicated Server Support Group on Steam Community!
Source Dedicated Server (SRCDS)
Free to join, Live support! (When available)

http://forums.srcds.com/viewtopic/5114
Reply
#10
Sometimes the console will list an error if it's unable to download the file. It may help.

I noticed also in your description that you say the files are on "http://www.-----.com" and you use just "sv_downloadrul "http://----.com/cstrike" as your ini settings. I know most of the times it doesn't matter (and it may be a typo) but if dns isn't setup correctly ----.com may not resolve to http://www.----.com.

Your host may be filtering requests based on the User-Agent header, you may want to submit a support ticked and see if they do in fact filter on that.
Manage your redirects/fast downloads with one click! SourceRSC and HL1RSC
Need a free web based game server hosting panel? Check out UGCC.
Reply
#11
Drocona Wrote:Are you using bzip or just plain files, if you do use bzip make sure you ahve the zipped files on the server too

I do eventually intend to use Bzipped files, but for the sake of eliminating possible issues, I'm not going to do that until I have everything else working properly, that way if I do run into a problem I'll know roughly what is causing it. So for now, they're not Bzipped.
Reply
#12
Masher Wrote:Sometimes the console will list an error if it's unable to download the file. It may help.

I noticed also in your description that you say the files are on "http://www.-----.com" and you use just "sv_downloadrul "http://----.com/cstrike" as your ini settings. I know most of the times it doesn't matter (and it may be a typo) but if dns isn't setup correctly ----.com may not resolve to http://www.----.com.

Your host may be filtering requests based on the User-Agent header, you may want to submit a support ticked and see if they do in fact filter on that.

I have actually tried it both ways, thinking that might be the problem. I ran it with the www and without, and they both pull down the same result. Another good thought though! When you say it sometimes displays a message in console, do you mean the gameserver console or the game console? Not that it matters too much, because I've checked both now with no error messages. Just curious...Smile
Reply
#13
I've written an application that automates compressing/uploading custom content to a redirect/fastdownload server (shameless plug, see sig), and had a user run accross a problem similar to this.

Are you ftp'ing your files to your host? Im so make sure you are using the binary transfer mode--it worked for the user with the same issue.
Manage your redirects/fast downloads with one click! SourceRSC and HL1RSC
Need a free web based game server hosting panel? Check out UGCC.
Reply
#14
Also, I meant the game client console.
Manage your redirects/fast downloads with one click! SourceRSC and HL1RSC
Need a free web based game server hosting panel? Check out UGCC.
Reply
#15
Masher Wrote:I've written an application that automates compressing/uploading custom content to a redirect/fastdownload server (shameless plug, see sig), and had a user run accross a problem similar to this.

Are you ftp'ing your files to your host? Im so make sure you are using the binary transfer mode--it worked for the user with the same issue.

Yup. I am using binary transfer mode, and I've already downloaded your csrsc.zip which I plan to try after I get everything working the long way. Smile Thanks in advance guys for your help! I'm surprised how fast I'm getting feedback on this!
Reply


Forum Jump:


Users browsing this thread: 3 Guest(s)