MTWS is a small but useful web server for small projects.
(Not intended for real web hosting — for that, I recommend Nginx.)
Caution
You can get the newest Version here
A compiled version is already included.
However, if you've made changes and want to compile it yourself, follow these steps.
(If you don't want to compile it, just download the mtws.cpp file and place it in your root web folder. Then skip to Step 3.)
Make sure you have the GNU C++ Compiler installed.
sudo apt install g++sudo pacman -S gccsudo dnf install gcc-c++sudo zypper install gcc-c++- Install MSYS2
- Then run:
pacman -S mingw-w64-x86_64-gcc
- Install Xcode Command Line Tools:
xcode-select --installClone the repository:
git clone https://github.com/RGBToaster299/MyTinyWebServer.gitNavigate into the new folder:
cd MyTinyWebServer/Compile the project:
g++ -std=c++17 -o mlws mlws.cpp -ldlYou should now have a compiled binary named mlws.
- Put the
mlwsbinary into your web folder
(this folder will be used as the root directory for your website). - Open your terminal (if not already open).
- Run the server:
./mlws -p 8080The server should now be running.
Type stop into the console.
Yes, plugin support is planned for MTWS.
However, I'm currently focusing on improving the stability of the core project.
MTWS includes a built-in file explorer.
It is shown when the current directory doesn't contain an index.html (or any .html) file.
Port 80 may not work on some systems — this is likely due to:
- Permission issues (requires root/admin on many OSes)
- Another process already using the port
This is a known issue, and I'm working on resolving it.
If you manage to fix it, feel free to contribute via pull request or commit!
MTWS runns as expected on Linux. Untested on Windows or MacOS.
This project is licensed under the
Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License.
See license.txt for full legal terms or visit the official license page.