TURNKEY OpenVPN with TURNKEY Torrent Server

Bin13's picture

Hi,

Firstly, Happy New Year! and thanks for the great work from which I have benefitted so much to date.

I would like to run Run Torrent Server through OpenVPN co-existing on the same core.

Although I realise that there must be previous attempts to do this, I can find no searchable reference to this on your site.

Being still very much a Newbie to Linux, I would appreciate some guidance about how to start, especially the right batting order for a fresh co-installation and anything NOT to do, please?

Would it be possible to create a combined installation ISO, or would that be an unnecessary step?

Thank you in anticipation.

Bin.

Jeremy Davis's picture

Whilst it would be a cool combo, it's not something that I have ever done, so this will be a bit of a case of the blind leading the blind. Having said that, I've been using Linux exclusively for years now and I have deep insights into how TurnKey works, so hopefully I might provide some value... :)

Currently TurnKey servers are monolithic. I.e. each server comes as a single ISO (etc) which includes a complete Linux OS with specific software installed to achieve a specific ends (e.g. torrent server, OpenVPN, etc). We do have plans to switch our model and allow the easy combining of applications into a single server, but we're probably still quite a while away from that (sorry).

In the meantime, you have a few options. Which would be best will depend on where you are planning to run these services, the resources available, how much patience you have and how willing you are to do a deep dive into Linux. TBH, I learned most of what I know by playing with TurnKey years ago. Once I'd developed a bit of Linux experience, I started running it locally (as my desktop) and other than a few initial teething issues, I haven't looked back. Personally I now find Windows so painful to work with! But I digress...

Reading your message, I assume that you wish to run these services locally so I will continue with that assumption. If that's wrong, please correct me. Broadly speaking, you have 2 options:

  1. Install 2 separate TurnKey servers and configure the torrent server to connect to the internet via the VPN provided by the OpenVPN server.
  2. Start with one of the existing appliances and manually install and configure the additional software you wish to use.

Option #1 in some respects is not ideal, as you'll then have 2 separate servers to maintain and configure. IMO it's really only suitable if you have a host where you can run the servers as multiple VMs.

Despite the redundancy and additional overhead, personally I actually prefer that method. Although I have a home server which is a hypervisor (VM host; FWIW I'm running Proxmox) so I like the flexibility that having a raft of separate VMs gives me. Also seeing as Proxmox also provides LXC (Linux Containers - minimalist Linux VMs) I run a lot of stuff under LXC which is really light weight.

A slight variation of that theme would be to use the TurnKey LXC appliance. As per my mention of LXC above, it provides a way to host multiple TurnKey apps as LXC guests. Although LXC does have some limitations and I'm not 100% sure whether OpenVPN would run nicely on it?! (Although I haven't tested and the torrent server should be fine).

So depending on your circumstance, option #2 may be preferable? If I were to go that path, I'd probably start with the OpenVPN appliance because I don't know much about it and Transmission (the torrent client we provide in our current torrent server appliance) is relatively easy to install. But OTOH, I don't use Windows filesharing so wouldn't bother installing anything other than the torrent client, so YMMV.

For reference, the build code of these 2 appliances can be found on GitHub (torrent server & OpenVPN).

Installing Transmission on your OpenVPN server, should be as easy as:

apt-get update
apt-get install transmission-daemon 

You should find the config file in /etc/transmission. Please note that to change any config, please stop the service first, then restart after the changes have been made. Stop a service like this:

service trasmission-daemon stop

To start it again, replace "stop" with "start".

I know that I have really glossed over lots of details, but please feel free to ask specific questions and provide some more context and I'll try to help out as best I can.

Bin13's picture

Hi Jeremy,

Thank you for your kind investment of time and thought.

The Turnkey Torrent Server seems to have led a merry dance lately, changing torrent clients twice in a very short space of time. Sadly, much of the documentation has not caught up, but during periods of significant change, the opportunity to incorporate new but popular features such as VPN client integration does not seem to be such a big ask as it would with a long-term stable product.

Sadly, I still rely heavily of TurnKey howtos and I admit that although I did not feel confident enough to attempt it directly, the thought of strapping OpenVPN or a VPN client onto the package did not seem to register the usual "list of things not to do to something that works".

I really don't have (yet) the sort of metals that support VM and would be venturing into the unknown with that approach, however ideal it would be.

I had not considered two TK machines, but would feel a l;ittle defeated by this method as my objective is to reduce power consumption on a box that runs 24/7.

One of the issues regardsing adding Transmission to the VPN would be the potential loss of Samba?

I have this fear of destabilising everything by messing with anything that runs as efficiently and in such small footprints as TurnKey Appliances do.

However, I do believe that adding a VPN, possibly bi-directional to TurnKey Torrent Server would be, to quote my son AND grandson "the coolest thing", so very slowly and carefully, I intend to try.

My confidence dissolves, when I realise on every occasion that my Linux knowledge would make most newbies feel confident! However .. .. .. .. .

 

Jeremy Davis's picture

Ideally, I would have preferred to keep the rTorrent/ruTorrent appliance and have the Transmission one alongside. But it wasn't to be.

There were a number of users who were really upset that we dropped rTorrent/ruTorrent, but we had way to many complaints about it being unstable. FWIW I couldn't ever reproduce the issues, but we had way to many reports for it to be in people's imagination.

What are the specs of your "always on" box? Assuming that it was built in the last <~10 years and has 2GB+ RAM, it may support Proxmox. The minimum hardware requirements are x86_64 (i.e. 64 bits) and VT-x/AMD-V cpu extensions. Unless it's one of the early old Atom CPUs, it should support 64 bit.

CPU virtualisation support is a slightly different (and messier) situation. AFAIK AMD have been providing AMD-V on all their chips since the Athlon 64 chips (circa early 2006). So if you have an AMD chip, you should be good.

Intel CPUs have VT-x instead, and their philosophy was a bit more scattered. They first provided it in the later high end Pentium 4 chips (circa late 2005). Many of the Core2Duo chips had it too, but not all of them. I used to have a high end Intel Core2Quad that didn't have it. If you have an Intel chip, I suggest you find out what it is and consult the internet to see if it supports it. Intel still provide the full specs on all their old CPUs last time I checked.

I mention Proxmox, because then you can run each server as it's own VM. So you get the redundancy of having multiple servers (which personally I like) but only need to leave one machine running. I ran a Proxmox server on an old desktop system for years and had up to 20 VMs running no problems (and one was even Windows!) The only reason why I ended upgrading was I was running out of RAM (I had upgrade it as far as possible; 8GB). My new Proxmox rig is a low power octocore Atom with 32 GB RAM. Each VM doesn't perform quite as well as it used to on the old server (slower CPU speed) but with 8 cores and 32GB RAM I have tons of headroom.

Personally, installing Proxmox was probably the single best thing I ever did when I first started exploring Linux (ok, finding TurnKey was probably the best, but it was close second). Being able to spin up a server, clone it, then trash it all in a matter of moments makes playing with Linux so much easier. No need to be scared of breaking things (so long as you have a backup first). And new things can be tried in a disposable VM (worst case, trash it, rinse and repeat).

Even if you'd rather not go that route, there are other ways to skin the cat. Samba can be installed too and whilst it isn't the easiest beast to configure, it's possible. As a hint, I suggest that you install the webmin-samba package as well to make it a little easier to configure.

Also, back when I was using Windows, I used to have WinSSHFS installed. That allows you to mount remote Linux directories over SSH (native and preinstalled on all TurnKey servers). Development had been abandoned and it was a little buggy (on Win7) when the computer woke up after being asleep, but otherwise worked fantastic. Last I checked, someone had adopted it and it was under development again. I assume that the bugs have been fixed.

Bin13's picture

Hi Jeremy, Again, Thank you for a comprehensive reply. Sadly, I am going to have to take a time-out to digest some of it as I really am very new to Linux and the delights that it offers. Equally sadly, in the eyes of my son I am a metal man and VMs are a science that I have avoided to date. The major reason has been not having a machine that that had enough metal not to be seen as a digital joke whilst attempting to intall a VM. I have never looked at Proxmox and after your comments, fully intend to read up on it and try to play with it. I too am in love with TurnKey. Pretty much everything I have tried out has worked, but so much documentation seems missing or out of date to assist with configuration. I know that if I was more familiar with basic Linux, it would be less of a scare. I have eagerly anticipated the trend that seems to be under consideration to make Turnkey Appliances modular. Most times I use a TurnKey Appliance, it would have been perfect if I could have 'bolted on' features available on other TurnKey releases. My original objective was to use TurnKey Torrent Server with a VPN client for all data to and from the internet. Ideally, I wouild wish to add to the Samba server (already in existence on TurnKey Torrent Server) the extra features of TurnKey Media Server (Again not a huge leap.) As a final touch, the features of Turnkey VPN Server for personal external access would be the final touch of pure indulgence. At this point, panic sets in as I am still trying to learn the basics of Linux. By way of feedback, I have had the latest version of TurnKey Torrent Server with Transmission running 24/7 for around 10 days rock solidly with around 4MB / 0.5MB transfer without a murmur. I am using a mobile GUI, "Transmission Remote" and allowing for my rather slow connection (Don't ask.), it has run like a train, albeit a somewhat colourless one. Time to do some more reading and playing with TurnKey Linux. Thanks again and have a great weekend.  
Jeremy Davis's picture

Sorry this is going to be another longish and somewhat rambling one... (I tried, but it blew out...)

Yes I hear you re the docs... It's a serious shortcoming of TurnKey. I've made some efforts to improve that, but it's been spotty at best. The problem is that those that need it can't do it, and those that could do it, often get tied up with other "more important" (and/or more interesting) things!

Something worth keeping in mind though, is that under the hood, TurnKey is Debian (v14.x = Debian Jessie aka 8.x). There are some initial configuration differences and we provide some custom software, but essentially anything that works for Debian should work for TurnKey too. Out of interest, Ubuntu is also based on Debian so instructions for Ubuntu will often be useful too. Although be a bit careful, as Ubuntu and Debian aren't binary compatible (TurnKey IS binary compatible with Debian).

I get your apprehension, but I couldn't recommend Proxmox more highly. For me it helped alleviate many of my concerns. Like I say, the beauty of it is that you can risk trashing a test server, without risking any other servers you already have configured and running.

If you want a hand seeing if your hardware is up to the task, please feel free to share what you have. If you already have Linux running on it, please just share the output of:

cat /proc/cpuinfo | grep -m 1 "model name"

If it's running Windows, then apparently according to google you can do that from the commandline with this:

wmic CPU get NAME
Although YMMV (and I don't have Windows so can't check). Via the GUI you're looking for "System Information". That should give the CPU model number.

Personally I use TKLBAM for backups mostly these days, but Proxmox also provides a built in backup mechanism, so you don't even need to risk the particular server you plan to work on (stuff doesn't work, roll back; rinse, repeat).

Obviously you have plans and goals which you'd like to achieve, but while you're learning, I would encourage you to not get too caught up in "getting it right". If you approach it as "play" with more of a mindset of "experimenting" and "I wonder what happens if I ...?", then you can't lose! Remember; if you're not breaking things, you aren't playing hard enough! :)

Also FWIW, the MediaServer is actually built on top of the fileserver (same as the TorrentServer).

Post new comment