HOW TO CONFIGURE FTB SERVER IN LINUX OS

FTP Server in Linux 1

What is a server

In computing, a server is a piece of computer hardware or software that provides functionality for other programs or devices, called “clients”. This architecture is called the client–server model.

A server is a computer or system that provides resources, data, services, or programs to other computers, known as clients, over a network. In theory, whenever computers share resources with client machines they are considered servers. There are many types of servers, including web servers, mail servers, and virtual servers.

An individual system can provide resources and use them from another system at the same time. This means that a device could be both a server and a client at the same time.

Some of the first servers were mainframe computers or minicomputers. Minicomputers were much smaller than mainframe computers, hence the name. However, as technology progressed, they ended up becoming much larger than desktop computers, which made the term microcomputer somewhat farcical.

Initially, such servers were connected to clients known as terminals that did not do any actual computing. These terminals, referred to as dumb terminals, existed simply to accept input via a keyboard or card reader and to return the results of any computations to a display screen or printer. The actual computing was done on the server.

Later, servers were often single, powerful computers connected over a network to a set of less-powerful client computers. This network architecture is often referred to as the client-server model, in which both the client computer and the server possess computing power, but certain tasks are delegated to servers. In previous computing models, such as the mainframe-terminal model, the mainframe did act as a server even though it wasn’t referred to by that name.

As technology has evolved, the definition of a server has evolved with it. These days, a server may be nothing more than software running on one or more physical computing devices. Such servers are often referred to as virtual servers. Originally, virtual servers were used to increase the number of server functions a single hardware server could do. Today, virtual servers are often run by a third-party on hardware across the Internet in an arrangement called cloud computing.

A server may be designed to do a single task, such as a mail server, which accepts and stores email and then provides it to a requesting client. Servers may also perform several tasks, such as a file and print server, which both stores files and accepts print jobs from clients and then sends them on to a network-attached printer.

How a server works


To function as a server, a device must be configured to listen to requests from clients on a network connection. This functionality can exist as part of the operating system as an installed application, role, or a combination of the two.

For example, Microsoft’s Windows Server operating system provides the functionality to listen to and respond to client requests. Additionally installed roles or services increase which kinds of client requests the server can respond to. In another example, an Apache web server responds to Internet browser requests via an additional application, Apache, installed on top of an operating system.

When a client requires data or functionality from a server, it sends a request over the network. The server receives this request and responds with the appropriate information. This is the request and response model of client-server networking, also known as the call and response model.

A server will often perform numerous additional tasks as part of a single request and response, including verifying the identity of the requestor, ensuring that the client has permission to access the data or resources requested, and properly formatting or returning the required response in an expected way.

TYPES OF SERVERS

There are many types of servers that all perform different functions. Many networks contain one or more of the common server types:

File servers

File servers store and distribute files. Multiple clients or users may share files stored on a server. In addition, centrally storing files offers easier backup or fault tolerance solutions than attempting to provide security and integrity for files on every device in an organization. File server hardware can be designed to maximize read and write speeds to improve performance.

Print servers

Print servers allow for the management and distribution of printing functionality. Rather than attaching a printer to every workstation, a single print server can respond to printing requests from numerous clients. Today, some larger and higher-end printers come with their own built-in print server, which removes the need for an additional computer-based print server. This internal print server also functions by responding to print requests from a client.

Application servers

Application servers run applications in lieu of client computers running applications locally. Application servers often run resource-intensive applications that are shared by a large number of users. Doing so removes the need for each client to have sufficient resources to run the applications. It also removes the need to install and maintain software on many machines as opposed to only one.

DNS servers

Domain Name System (DNS) servers are application servers that provide name resolution to client computers by converting names easily understood by humans into machine-readable IP addresses. The DNS system is a widely distributed database of names and other DNS servers, each of which can be used to request an otherwise unknown computer name. When a client needs the address of a system, it sends a DNS request with the name of the desired resource to a DNS server. The DNS server responds with the necessary IP address from its table of names.

Mail servers

Mail servers are a very common type of application server. Mail servers receive emails sent to a user and store them until requested by a client on behalf of said user. Having an email server allows for a single machine to be properly configured and attached to the network at all times. It is then ready to send and receive messages rather than requiring every client machine to have its own email subsystem continuously running.

Web servers

One of the most abundant types of servers in today’s market is a web server. A web server is a special kind of application server that hosts programs and data requested by users across the Internet or an intranet. Web servers respond to requests from browsers running on client computers for web pages, or other web-based services. Common web servers include Apache web servers, Microsoft Internet Information Services (IIS) servers and Nginx servers.

Web Server

Database servers

The amount of data used by companies, users, and other services is staggering. Much of that data is stored in databases. Databases need to be accessible to multiple clients at any given time and can require extraordinary amounts of disk space. Both of these needs lend themselves well to locating such databases on servers. Database servers run database applications and respond to numerous requests from clients. Common database server applications include Oracle, Microsoft SQL Server, DB2, and Informix.

Virtual servers

Virtual servers are taking the server world by storm. Unlike traditional servers that are installed as an operating system on machine hardware, virtual servers exist only as defined within specialized software called hypervisor. Each hypervisor can run hundreds, or even thousands, of virtual servers all at once. The hypervisor presents virtual hardware to the server as if it were real physical hardware. The virtual server uses the virtual hardware as usual, and the hypervisor passes the actual computation and storage needs onto the real hardware beneath, which is shared among all the other virtual servers.

Proxy servers

A proxy server acts as an intermediary between a client and a server. Often used to isolate either the clients or servers for security purposes, a proxy server takes the request from the client. Instead of responding to the client, it passes the request on to another server or process. The proxy server receives the response from the second server and then replies to the original client as if it were replying on its own. In this way, neither the client nor the responding server needs to directly connect to each other.

Monitoring and management servers

Some servers exist to monitor or manage other systems and clients. There are many types of monitoring servers. Several of them listen to the network and receive every client request and server response, but some do not request or respond to data themselves. In this way, the monitoring server can keep track of all the traffic on the network, as well as the requests and replies of clients and servers, without interfering with those operations. A monitoring server will respond to requests from monitoring clients such as those run by network administrators watching the health of the network.

FTB Servers

FTB is short form for Feed The Beast and is a custom minecraft launcher that made it easy to install & use mod packs for minecraft. It’s used because a lot of people don’t know or just don’t want to add the mods themselves and it just made it easier and faster to grow modded server communities because there is a general launcher now making it easier for everyone to connect. FTB has in total 57 modpacks that come with it with one of the most popular being Direwolf20’spack it has been created by SlowPoke in November 2012. FTB Servers are very popular and a great bit of fun.

This originated as a custom challenge map in Minecraft that made heavy use of multiple tech mods. It played very similar to a type of map known as Sky Block, where the player is started in a void world with only a small platform, and must overcome a series of challenges. Because FTB included tech mods, it was possible to use the various custom blocks and items to keep track of the challenges and the player’s progress, as well as automatically give awards after each challenge was met.

The map was then adapted to allow multiple players to compete against each other in a race to complete the objectives. This version gained large popularity after being live-streamed on Twitch.TV with Direwolf20 vs Nearbygamer, both very well known users of the mods included in the map.

Eventually it grew out to what’s its today one of the best known and well used modpack launcher.

SETTING UP AND CONFIGURING FTB SERVER IN LINUX OS

Minecraft seems to work only with Oracle Java as of June 2020. Adopt OpenJDK didn’t work and threw exceptions. Make sure you have Oracle Java 8 (1.8.0) or later installed. Note the Oracle licence you must accept, and that the free licence does not seem to cover commercial uses of Java.

  • If you have multiple java installations use the update-alternatives command to select the one that runs from the command line. Use java -version to verify which one you have.
  • I strongly recommend you create a new unprivileged user account to run the server under. There are lots of guides on how to do this for vanilla minecraft servers. This is mainly for security reasons, as you’ll have to leave the minecraft listener port exposed to let users log in. Running Minecraft as a dedicated unprivileged user will make it harder for a hacker to do any damage if they get in through this port and exploit the server.
  • You’ll need to forward port 25565 from your home router to your linux server. I’m not clear on whether TCP or UDP is required so I forward both. (Microsoft says it’s TCP but it’s not that a big a deal to forward both.)
  • UFW (Uncomplicated Firewall) is a user-friendly front end to iptables that will let you build a basic whitelist for your exposed firewall port. If you’re running this on a home network and are running a private server, I recommend you do this and whitelist IPs your users will be coming from.
    • You want to whitelist IP addresses (either single addresses or ranges) that can access the server’s listening port on 25565. Everything else should be denied. This will keep villains from even being able to see the open port.
    • There are many guides on how to use UFW. First, add default rules for incoming, outgoing, and forwarded traffic. Then add additional rules to handle exceptions to the default rules. Finally, enable UFW to have it start enforcing the firewall policy.
    • You can install UFW from apt-get but it may already be installed. Run sudo ufw status to see if it’s there.
  • If you don’t need the GUI on your linux installation, consider turning it off. You can google for the correct systemctl command to do this and make the change stick. This will conserve critical RAM resources, which can be helpful if you don’t have tons of it. I’ll talk more about RAM usage later.
    • This command will disable the GUI and persist the change: sudo systemctl set-default multi-user.target
    • This command will reenable the GUI: sudo systemctl set-default graphical.target

1. Downloading the file.
From the FTBApp launcher, you can download the Linux server file. I actually downloaded it from Windows and moved it over.

  • From the modpacks menu, browse or search for FTB Infinity Evolved.
  • Click on the three dots detail icon.
  • Go to the Versions tab. Click on the “Download Server” button and you’ll get a prompt for different OSes.
  • Select Linux. This will download an executable binary, the installer.

2. Running the installer.

  • Launch the file you just downloaded. Run it directly from a command line. You might have to run chmod a+x to make it executable.
  • This installer will create a complete Forge installation, including updated 1.7.10 Minecraft server files, Forge, and Forge Mods. If you don’t know what this means:
    • Minecraft server files are the original server files directly from Mojang/Microsoft. You don’t have to download these separately since the installer will grab them.
    • Forge is a widely used framework (ie. add-on software) that makes many Minecraft mods, including the ones used in FTB Infinity Evolved, work.
    • Forge mods work by putting a bunch of files in the /mods directory. The installer pulls updated versions of these mods from their repositories, which is probably one of a number of reasons why they are not simply prepackaged.
    • It all comes together when you start Minecraft, it loads Forge, then Forge loads all of the mods.
    • FTB Infinity Evolved is essentially a curated set of these mods, with configurations that make them work nicely together.

3. Configure the installation that the installer put down.

  • First, edit the eula.txt file in the main folder. You need to change the eula line to “eula=true” to accept the Minecraft licence terms. The server won’t start without it.
  • Next, edit the start.sh file that the installer created. You can actually comment out or delete all of the lines except the first line and the last line (with the java command). (The eula fixer here didn’t work for me and seems unnecessary.)
  • Edit the java line:
    • Edit the -Xms and -Xmx switches to reflect the physical RAM you want to allocate to the server.
    • – Xms specifies how much starting RAM the server should have, and Xmx is the maximum the server can be allocated.
    • After the -jar switch, add the file name of the Forge file the installer created, eg. forge-1.7.10-10.13.4.1614-1.7.10-universal.jar. Make sure you use the jar that ends in universal, and not the installer jar.
    • nogui is important as it tells Minecraft not to attempt to launch the GUI.
  • There are many thoughts on the Internet as to what the ideal amount of RAM is. Your mileage may vary. Here’s what worked for me:
    • For my new-ish FTB Infinity Evolved world and about 4 users, RAM usage is holding steady at about 2.2 GB. I have minimum set to 1GB and max set to 4GB.
    • According to some people, allocating too much RAM can actually negatively impact the efficiency of the Java garbage collector.
  • There exist fancy java switches to optimize Java’s garbage collector. These may help in a situation where you are trying to make the most of limited physical RAM. I haven’t experimented with these, but note that there is a lot of dated advice on using these switches with Minecraft servers. Because garbage collection can change with each new release, you can’t trust advice that is not clearly for the version and build of Oracle Java you’re using.

4. Configure server.properties
These are the standard Minecraft server settings.

  • If you want Biomes o’Plenty biomes, change the value of the “level-type” key to read “level-type=biomesoplenty”. Do this before running the server for the first time and triggering world generation.
  • If you are creating a private server, then set the “white-list” key to true. Then, add your user’s Minecraft account names and UUIDs to the whitelist.json file. Given a user’s Minecraft account name, you can look up the UUID yourself using one of a number of public websites that will do this for you. Make sure you use proper syntax, you can google for what a proper whitelist.json should look like.
    • While you are doing this, you can set the initial list of Admins/OPs by editing ops.json. This is the list of users who will have admin rights. This is a similar format as the whitelist JSON file, except there is an additional line for level. “level”: 4 seems to be adequate to grant admin rights. Don’t ask me what the levels mean. Once this is done you can add additional admins through a console command from an admin account – how to do this can be googled.
  • Edit the message of the day (motd) to something personal to help your users know they found the right server.

5. Configure FTB Utilities.
FTB Utilities is a mod that provides many utility functions. Some key ones are automatic backup and restarts, which you may want to tailor.

  • * The configuration file for FTB Utilities is in /local/ftbu/config.json.
  • * Notable settings here:
    • “backup_timer”: in hours, specifies how often backups should be made to the folder specified by the “folder” setting.
    • “restart_time”: in hours, specifies how often the server should be auto restarted. Users will be kicked when this happens. People seem to find that restarting the server every 8-12 hours helps keep on top of lag, but I haven’t verified this myself.
    • “safe_spawn”: if set to true, allegedly positions spawns further away from mobs and danger.
    • “motd”: Message of the Day. Again, I like setting this so users know they’re in the right place.
  • You can apply changes in this file (as well as server.properties) to a running server by running the admin command /reload from an admin console. The server should confirm that it has reloaded its configs.

6. Running the server
A really helpful utility is screen. It will store your console session persistently and let you leave and come back to it from different places (console, SSH session, etc.). You can also scroll back through the console output. This makes administering and monitoring the server easier.

  • Start server with “screen ./start.sh”. This will run the script you just edited and store all output into a screen session.
  • You can leave a screen session and keep it running in the background by pressing Control+A+D. To resume, type screen -r while logged in as the same user you created the session with.
  • You should be able to scroll back through the session output.
  • To stop the server, open the screen session where you started it an press Control+C. Or, find the PID and kill the java process.

Drop your comment

Related Post

Leave a Reply

Your email address will not be published.