How to Install Mockoon on Windows & Ubuntu | Create REST APIs Easily
Learn how to install Mockoon on Windows and Ubuntu and create API endpoints in minutes! This step-by-step guide covers everything from installation to advanced API mocking.
Introduction to Mockoon
What is Mockoon?
Why use Mockoon for API mocking?
- No-code interface: You can build entire mock servers with a visual UI.
- Cross-platform: Available for Windows, Linux, and macOS.
- Powerful features: Supports custom headers, status codes, delays, and dynamic responses.
- Local hosting: Keeps everything offline and secure.
System Requirements for Installing Mockoon
Supported OS
Mockoon is compatible with the following operating systems:
- Windows 7 and higher (64-bit)
- Ubuntu 18.04 and above
- macOS Catalina and above
Minimum system specs
Component | Requirement |
---|---|
RAM | 2 GB minimum |
Disk Space | 100 MB |
Processor | Any 64-bit processor |
Internet | Required for download only |
How to Install Mockoon on Windows
Downloading Mockoon from the Official Website
- Visit the Mockoon official download page.
- Click on the Windows (64-bit) version.
- Save the
.exe
file to your Downloads folder.
Installation Steps with Screenshots
-
Double-click the
.exe
installer. - Choose a destination folder (default is fine).
- Click "Install" and wait for the setup to complete.
- Launch Mockoon from the Start Menu.
Verifying Installation
- Open Mockoon.
- You should see the main UI with the left sidebar for environments and a blank center pane.
- If it opens without errors, installation is successful!
How to Install Mockoon on Ubuntu
Using .deb Package Installation
-
Download the
.deb
package from the Mockoon downloads page. - Open the terminal and navigate to your Downloads folder:
cd ~/Downloads
Installing Using Terminal Commands
sudo dpkg -i mockoon-.deb
sudo apt --fix-broken install
Troubleshooting Common Errors
- If you get “dependency issues,” use
sudo apt --fix-broken install
- Use
which mockoon
to verify installation path.
Getting Started with Mockoon
Launching the Application
- On Windows: Launch from Start Menu.
- On Ubuntu: Use Activities search bar and type “Mockoon.”
User Interface Overview
- Left Panel: Environment list
- Top Menu: Add/remove environments
- Center Area: Endpoint details
Key Terminology
Term | Meaning |
---|---|
Environment | A mock server configuration |
Route | An individual API endpoint |
Response | Data returned for a route |
Creating Your First Mock API in Mockoon
Step-by-Step API Creation
-
Click “+ New Environment”
- Name it (e.g., “User API”)
- Add a new route:
/users
- Set method to
GET
Setting Up Endpoints
-
Add multiple endpoints like
/users/:id
- You can use dynamic path parameters
Defining Responses and Headers
- Use the status code dropdown to change it (e.g., 200, 404)
Advanced API Configuration in Mockoon
Adding Multiple Routes
- Click "Add Route"
- Each route can simulate a different API function
Using Dynamic Variables and Rules
Mockoon supports templating with variables like:
{
"userId": "{{uuid}}"
}
Simulating Delays and Status Codes
- Simulate slow responses (e.g., 3000ms)
- Change status to simulate 500 errors for testing
Testing Your Mock API
How to Call Your Mock API Locally
-
Your mock server will run on
http://localhost:3000
(default) - Test using your browser or API clients
Using Tools Like Postman or curl
Postman:
-
Create a new GET request to
http://localhost:3000/users
curl:
curl http://localhost:3000/users
Exporting and Importing Mockoon Environments
How to Export Environments as JSON
- Go to File > Export Environment
- Save the
.json
file
Importing Existing Mocks
- Go to File > Import Environment
- Choose the
.json
file from your disk
Troubleshooting Mockoon Installation Issues
Common Errors on Windows
- Installer fails to launch: Run as administrator
- Mockoon won't open: Disable antivirus temporarily
Common Errors on Ubuntu
-
Missing dependencies: Use
apt --fix-broken install
- UI crashes: Try reinstalling with latest
.deb
Fixing Port Conflicts
- If port 3000 is busy, change it under Environment > Settings > Port
Best Practices for Using Mockoon
- Keep environments modular (e.g., one per service)
- Use descriptive names for routes
- Export your environment regularly for versioning
Mockoon Alternatives and Comparisons
Tool | Feature Match | Notes |
---|---|---|
WireMock | ✅ | Java-based, more complex |
Postman Mock Server | ✅ | Requires Postman account |
Beeceptor | ✅ | Online-only solution |
Frequently Asked Questions (FAQs)
1. Can I use Mockoon without an internet connection?
Yes, once installed, Mockoon runs entirely offline.
2. Does Mockoon support HTTPS?
Not natively, but you can use a reverse proxy like NGINX to add HTTPS.
3. How many environments can I create?
Unlimited! You can create as many as your system can handle.
4. Can I simulate authentication with Mockoon?
Yes, you can set headers like Authorization
and define responses accordingly.
5. Is Mockoon suitable for production?
It’s designed for development/testing only. Not recommended for production use.
6. How do I update Mockoon?
Download the latest version from the website or use your OS package manager (Linux).
Conclusion
Mockoon makes API mocking incredibly easy and powerful, whether you're on Windows or Ubuntu. With just a few clicks or commands, you can simulate complex backend behavior and accelerate your development workflows. From frontend testing to DevOps automation, Mockoon is a must-have tool in every developer's toolkit.