The "Web Control" is an all inclusive web accessible server management tool specifically for Factorio on Linux. No more running the server in command line, and having to provide SSH access to your moderators (or just for yourself). This tool aims to make managing factorio servers a breeze.
Start and Stop servers, update to new verisons of factorio with the click of a button, upload and delete save files, chat with active servers from the web page, edit server settings, download log files, and more! Discord auth can also be configured, which means a simple role promotion on your discord server will grant new admins access to the server management suite. All web user actions are logged for safe keeping.
View our trello for project status and plans.
Here you will find visual guides and examples on the power of our factorio web control. You may also converse with us via discord
Ubuntu 16.04 or higher (can work on other versions, just will take more manual setup to get figured out.
Dependency programs:
Sudo, cron, curl, wget, zip, unzip, tar, xz-utils (to support downloading 0.15.x factorio versions), rsync, gcc, npm, screen, apache2, php (php 7 at least), php-curl, libapache2-mod-php (to activate php for apache).
php.ini settings "post_max_size" and 'upload_max_filesize" should be increased to allow uploading of larger factorio save files.
User permissions:
Since this was built in mind for Ubuntu, we're relying on the web service to be running as the 'www-data' user. This is important, since the server needs access to add, modify, and delete certain files (only factorio related). If a file is owned by another user, the web control, in most cases, can only read the file.
The www-data user must also be given permissions in the sudoers file (/etc/sudoers) to use the gcc and screen commands. Gcc is what we use to compile the management script. Screen is what runs the factorio server.
Add this lines to the bottom of your sudoers file.
Our install script will run through most of the server configuration. We highly reccomend using it to get most of the work out of the way.
Simply run the follwing command and follow the instructions:
From this point, all you must really do is add the www-data user to the sudoers file (/etc/sudoers) to allow the use the gcc and screen commands. Gcc is what we use to compile the management script. Screen is what runs the factorio server.
Add these lines to the bottom of your sudoers file.
From this point, your server should nearely be in a working state. The last thing we need to add is discord integration. We are working to have this not be immediately required. But for now, it is necessary to setup.
Locate the config.json inside of your Web Control folder (/var/www/factorio/config.json). You have to fill several fields for which you will gather the infos below. Here's a short description:
To get these values, you have to register an app bot. First, visit the Discord Developer site.
You will see your "My Apps" page. Press the big (+) button to register a new app.
Freely name your bot how you want and then click the "Create App" Button on the lower right.
Next you have to "Create a Bot User" with the button on the right.
Now we have access to all information that we need. Copy the values of "Client ID", "Client Secret" and "Token" into the appropriate fields in your config.json
A word of advice, never share your client secret or token strings! Anyone that gets either of these values has the capability to log in as your bot to do whatever they want on your server. If your bot has the Administrator role, this means they can do literally anything!
To get the login process to work properly, you have to add one or more redirect URIs. This is a whitelist of sites that can successfully use this bot. In our case, the URI looks like this: If you use the standard port for https (443), omit the colon and port.
Before you leave this site, you can also choose an app icon (the bot avatar).
To get this value, you have to activate the "Developer Mode" in your Discord desktop client.
Go into your settings via the cog right beside your name in the lower left corner. Here, choose "Appearance". In the "Advanced" Section, click the "Developer Mode" slider.
Leave the settings and right click your Discord server icon. On the bottom, there is a new entry called "Copy ID". Click it and paste the value into the "guildid" field of your config.json .
In your Discord server settings, choose or create two roles for admin and mod purposes. Enter these role names into your config.json. Choose wisely who you assign to the adminrole, because these users can update your Web Control Server from the webinterface and use eval commands. Users with the modrole can use all other server and admin commands, except the two stated.
The easiest way to add the bot to your server is with an URI in your browser.
Simply replace "INSERT_CLIENT_ID_HERE" with the one you gathered above and enter the URI in your browser to authorize and subsequently, add the bot.
Lorem ipsum dolor sit amet, consectetur adipisicing elit. Ipsum at aspernatur iure facere ab a corporis mollitia molestiae quod omnis minima, est labore quidem nobis accusantium ad totam sunt doloremque laudantium impedit similique iste quasi cum! Libero fugit at praesentium vero. Maiores non consequuntur rerum, nemo a qui repellat quibusdam architecto voluptatem? Sequi, possimus, cupiditate autem soluta ipsa rerum officiis cum libero delectus explicabo facilis, odit ullam aperiam reprehenderit! Vero ad non harum veritatis tempore beatae possimus, ex odio quo.
Navigate to the IP of your server in your browser: https://IP_ADDRESS/
You will see something like this (example from Google Chrome)
Click "advanced"
And then click "proceed" / "proceed anyway"
If your site is setup for Discord integration, It will get you to this page (otherwise, click "Alternate Login" and use your username and password for the web control to login):
Click on Login, and you will be directed to the discord login screen:
Enter your credentials and you will be prompted with a Bot Confirmation page:
Click "Authorize", and you will be taken to the main page of the Web Control.