Documentation
...
Guide: How to Set Up a File No...
Pool Server Setup
20 min
pool server setup helpful skills running a pool server will require some advanced technical knowledge the following are some of the skills that may be required in running a successful pool server general docker understanding ( https //docker com ) running commands on the command line this could be windows or linux understanding of general networking, firewalls, and internet router configurations looking at logs of data events to help with troubleshooting before starting before starting the setup process you might want to check to make sure your network supports port forwarding natively to do this, start by finding your public ip address most search engines like google will provide this information if you search "what is my ip?" next, open your command prompt ( cmd on windows) type the command tracert x x x x replacing the x's with your public ip address trace route (or tracert) will show the "hops" from your location to another ip address if there is only one "hop" or line then your should be able to use port forwarding if you see more than one "hop", then you should contact your isp before proceeding example tracert \[your ip address] expected result 1 <1 ms <1 ms <1 ms 199 119 153 199 119 153 27 cpe sparklight net \[199 118 152 28] (the numbers don't matter, but you should only have 1 line) create pool server config if the player is a node owner, then they should be able to see a section in the ui for managing their pool servers click on the link to manage pool servers, and click “create pool server” enter the name of the pool the name of the pool should be a concise description of the pool this is especially important if the player will likely be running multiple pool servers and even running one or more public servers once the pool server is created, a secret access key will be presented this key will be used in running the pool server this is how the pool server software will know its configurations and provide performance information for its nodes that will yield rewards store this key in a safe place refreshing pool server access key the pool access key does need to be kept secret, but if there is any reason that a node owner suspects that the key has been compromised, go to the pool management section of the player account click to see the details of the pool server in question click on the button to refresh the access key the access key will be shown one time only it is recommended that the access key be replaced in the docker compose yml configuration immediately since the old access key will no longer work once the configuration is updated, restart the docker container with the command docker compose up d delegate file node the last step in creating a new pool server is to delegate a node it is possible to run a pool server without a node however, no work will be allocated to the pool unless at least one node is delegated to the pool in order to delegate a node, go to the node section of the player account, and choose a node that has not been delegated click the button that says delegate node when a dialog box appears, it should allow the selection of available pools choose a pool and click ok installing docker docker is the chosen technology to roll out the pool server technology this was chosen for several reasons isolation docker runs containers that will not allow host applications to affect the container and the container cannot negatively affect the host applications ease of configuration most of the setup and configuration is done when the image is created to containerize the image, only a few variables need to be set to get the docker to work as expected platform choice docker can run on windows, linux, and mac it can also run on many nas devices and on many cloud servers note cornucopias will not test every platform stick with windows and linux for the best support we will not prevent the images to be run in other configurations however, watch your performance metrics! windows running docker on windows is best facilitated using docker desktop use the following url to download and install the tool if you are new to docker, there should be a lot of information available to give you confidence that it is a safe and useful tool https //www docker com/products/docker desktop/ docker desktop will run on linux and mac follow these instructions for mac and desktop linux linux running docker on linux might be a little more complicated it is possible to run docker desktop on desktop linux however, these instructions will focus on a command line installation of docker engine think of this as the “server” approach these instructions will help to deploy to home linux servers and cloud servers obviously, there are many distributions and versions of linux, and this document is not meant to be exhaustive instead, refer to the docker documentation for latest information on installing docker engine https //docs docker com/engine/install/ once the installation is complete, running the command docker ps should return an empty set of running containers creating public access creating public access to a pool server might be the trickiest part of this setup it is important to make this right because it might open up your private network to the public internet do this at your own risk also, please only forward necessary ports to your internal host redirecting all internet traffic to an internal host is not recommended (some routers may have this option) first, determine the public port number if running behind a nat (like at home), configure port forwarding for port 8001/tcp on the router the port should be forwarded to the internal ip address that the pool server is running on and port 8001/tcp for example, configure 8001/tcp on the router to forward to 192 168 1 22 port 8001/tcp note that some networks may change the internal ip address unexpectedly, so it is best practice to configure the internal host to have a static ip address the ip address and ports may differ in various configurations, and the pool server configuration should be able to accommodate many different configurations if running in the aws cloud, configure the security group to allow tcp access to port 8001/tcp the following is a video that might help setting up a port forward https //www youtube com/watch?v=jfslxs40siw choosing cache storage choose a location on the computer that can hold all of the cache files here are some of the considerations which drive contains enough free space? there could be 100g of cache files as the project starts getting up to speed drive speed can be important nvme drives are much faster thanit would be nice if the storage was on a fast drive such as an nvme however, using a spinning drive might make the most sense note that the validation of cache files will take long on these drives this will not be a long term issue because it is on the roadmap to fix now that the cache folder is chosen, the container can be started starting the container there are various ways that the container can be managed a long command on the terminal or creating the container in the desktop application are both options that have been considered the long command is too error prone, and believe it or not, the desktop creation of the container is cumbersome and error prone as well docker compose is the strategy that is the best solution for giving and receiving instructions for how to run this container how about some terminology? docker image an image is the template for which a container will run all of the software and dependencies have been packaged up and downloaded as an image docker container a container is an image that has been run once an image has been run, it creates a state, and that state is stored as a container if a new image is available, a container needs to be recreated in order to take advantage of the updated image yaml docker compose uses a file called docker compose yml call this the docker compose file or the yaml file this is just the phonetic way to refer to the file type before starting the container, take a look at the variables that need to be updated these variables will be in the docker compose configuration file, and can be changed easily environmental variables variable value description filenodes pool api url https //filenodes api conucopiasweb io not recommended this is the hostname that will be used to receive instructions the hostname will change when moving from staging to production, for example filenodes pool access key unique key from pool server creation example\ gvga??????????????????????????????????????yjy each pool server will have its own unique key that authenticates and authorizes it for participation in the file nodes network filenodes pool public port 8001 each pool server will tell the api server how the client should access the files it is caching this would be a public ip and port filenodes pool public host none not recommended use this environmental variable if the ip is not determined correctly by the filenodes service filenodes pool public path cache not recommended use this environmental variable to change the base url path to access cached files docker compose configuration the following is an example docker compose configuration please create a folder on your computer that will have plenty of free disk space (100g 250g), and create the file “docker compose yml” copy and paste the template below, and carefully update the access key, public url, and cache path save the file and move to starting the container step by step docker configuration each will be discussed in the step by step approach for deploying a pool server create a working folder for example “d \cornpoolserver” open up explorer to where you would like to create your working folder right click in the open space and select new, then folder name your folder then hit enter double click on the folder to go into that newly created folder create a folder inside that folder for the pool server cache for example “d \cornpoolserver\cache” right click in the open space and select new, then folder name your folder(cache) then hit enter do not double click on this folder for the next step in the future, you may navigate to the folder to watch all of the cache files being created use a text editor or notepad to create a docker compose yml file inside the working folder for example “d \cornpoolserver\docker compose yml” note if using notepad you will need to “save as”, then select “all files” and make sure the file name ends in yml copy and paste the docker compose template below into the docker compose yml file note indentation and spacing matter should the container always restart? for testing or manual management, change the restart value to “no” update the access key copy and paste the access key that was provided ensure that the public port matches port forward port configure the cache folder update the path of the mapping to the internal docker path with a filesystem path for example “d \cornpoolserver\cache /cache” sample docker compose yml with cache configured to path name cornucopias services pool server image public ecr aws/cornucopias/nodes/pool server\ latest ports \ "8001 8001" restart unless stopped # if you want to manually start the pool server replace “unless stopped” with “no” environment filenodes pool access key \<paste access key here> filenodes pool public port 8001 volumes \ d \cornpoolserver\cache /cache starting docker starting docker is pretty easy do not get intimidated by using the command line ask for help open powershell or cmd change to working folder start pool server using the command “docker compose up d” \\