Skip to content

Commit 3fa0ac6

Browse files
committed
feat: add self-host instructions
Closes #827 Signed-off-by: Gil Desmarais <[email protected]>
1 parent 8d792eb commit 3fa0ac6

File tree

4 files changed

+138
-17
lines changed

4 files changed

+138
-17
lines changed

src/content/docs/get-involved/index.mdx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,8 @@ sidebar:
88
Engage with the `html2rss` project. Contribute and connect with the community.
99

1010
- [**Project Roadmap**](https://github.com/orgs/html2rss/projects/3/views/1): View current work, plans, and priorities.
11+
- [**Self-Host Your Own Instance**](/get-involved/self-hosting): Take control of your information diet and join the decentralized web movement.
1112
- [**Report Bugs & Discuss Features**](/get-involved/issues-and-features): Report bugs or propose features.
1213
- [**Join Community Discussions**](/get-involved/discussions): Connect with users and contributors.
1314
- [**Contribute to html2rss**](/get-involved/contributing): Contribute code, documentation, or feed configurations.
14-
- [**Sponsoring**](/get-involved/sponsoring)
15+
- [**Sponsoring**](/get-involved/sponsoring).
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
---
2+
title: "Self-Host Your Own Instance"
3+
description: "Take control of your information diet. Host your own html2rss instance and join the decentralized web movement."
4+
sidebar:
5+
order: 3
6+
---
7+
8+
Turn any website into an RSS feed. Self-host your own instance and take back control of your information diet.
9+
10+
## Quick Start
11+
12+
1. Install [Docker](https://docs.docker.com/get-docker/).
13+
2. Create a directory for html2rss:
14+
```bash
15+
mkdir html2rss-web && cd html2rss-web
16+
```
17+
3. Download the configuration:
18+
```bash
19+
curl -O https://raw.githubusercontent.com/html2rss/html2rss-web/master/docker-compose.yml
20+
curl -O https://raw.githubusercontent.com/html2rss/html2rss-web/master/config/feeds.yml
21+
```
22+
4. Start the instance:
23+
```bash
24+
docker compose up -d
25+
```
26+
5. Visit [http://localhost:3000](http://localhost:3000)
27+
You should see the html2rss-web interface.
28+
29+
## Next Steps
30+
31+
- [Secure your instance](/web-application/how-to/deployment#security)
32+
- [Enable HTTPS](/web-application/how-to/deployment#https)
33+
- [Troubleshoot issues](/troubleshooting/troubleshooting)
34+
- [Join the community](https://github.com/orgs/html2rss/discussions)
35+
36+
---
37+
38+
## License
39+
40+
[MIT](https://github.com/html2rss/html2rss/blob/main/LICENSE)

src/content/docs/troubleshooting/troubleshooting.mdx

Lines changed: 58 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,9 @@ Your browser's developer tools are essential for troubleshooting. Use them to in
1111

1212
- **To open:** Right-click an element on a webpage and select "Inspect" or "Inspect Element."
1313

14-
## Common Issues
14+
---
15+
16+
## Common Issues (Ruby Gem / CLI)
1517

1618
### Empty Feeds
1719

@@ -21,7 +23,7 @@ If your feed is empty, check the following:
2123
- **`items.selector`:** Verify that the `items.selector` matches the elements on the page.
2224
- **Website Changes:** Websites change their HTML structure frequently. Your selectors may be outdated.
2325
- **JavaScript Content:** If the content is loaded via JavaScript, use the `browserless` strategy instead of `faraday`.
24-
- **Authentication:** Some sites require authentication - check if you need to add headers or use a different strategy.
26+
- **Authentication:** Some sites require authentication check if you need to add headers or use a different strategy.
2527

2628
### Configuration Errors
2729

@@ -54,21 +56,68 @@ If you are getting a "command not found" error, try the following:
5456
- **Re-install:** Re-install `html2rss` to ensure it is installed correctly: `gem install html2rss`.
5557
- **Check `PATH`:** Ensure that the directory where Ruby gems are installed is in your system's `PATH`.
5658

57-
### Web Application Errors
58-
59-
For html2rss-web specific issues:
59+
---
6060

61-
- **`401 Unauthorized`:** Check your `AUTO_SOURCE_USERNAME` and `AUTO_SOURCE_PASSWORD` environment variables.
62-
- **`403 Forbidden`:** The URL is not in the `AUTO_SOURCE_ALLOWED_URLS` list, or the origin is not in `AUTO_SOURCE_ALLOWED_ORIGINS`.
63-
- **`500 Internal Server Error`:** Check the application logs for detailed error information.
61+
## Web Application Issues (html2rss-web)
62+
63+
### Instance Won’t Start
64+
65+
- Verify Docker is installed and running:
66+
```bash
67+
docker --version
68+
```
69+
- Check logs for errors:
70+
```bash
71+
docker compose logs
72+
```
73+
- Ensure the port (default: 3000) isn’t already in use:
74+
```bash
75+
netstat -tulpn | grep :3000
76+
```
77+
78+
### Can’t Access the Web Interface
79+
80+
- Confirm your firewall allows traffic on port 3000 (or the port you configured)
81+
- Try accessing via the server’s IP instead of a domain name
82+
- Double-check that containers are running:
83+
```bash
84+
docker compose ps
85+
```
86+
87+
### Authentication Errors
88+
89+
- **401 Unauthorized:** Check your `AUTO_SOURCE_USERNAME` and `AUTO_SOURCE_PASSWORD` environment variables.
90+
- **403 Forbidden:** The URL is not in the `AUTO_SOURCE_ALLOWED_URLS` list, or the origin is not in `AUTO_SOURCE_ALLOWED_ORIGINS`.
91+
- **500 Internal Server Error:** Check the application logs for detailed error information.
6492
- **Health check failures:** Use the `/health_check.txt` endpoint to identify which specific feed configurations are broken.
6593

94+
### SSL / HTTPS Issues
95+
96+
- Follow the [nginx reverse proxy guide](https://docs.nginx.com/nginx/admin-guide/web-server/reverse-proxy/)
97+
- Use [Let’s Encrypt with certbot](https://certbot.eff.org/) to obtain valid certificates
98+
- Verify your reverse proxy forwards requests to the correct internal port
99+
100+
### Feed Problems
101+
102+
- Some sites may require JavaScript rendering; ensure the `browserless` service is running
103+
- Check the feed configuration in `feeds.yml` for typos or invalid selectors
104+
- Look for parsing errors in the logs:
105+
```bash
106+
docker compose logs html2rss-web
107+
```
108+
109+
---
110+
66111
## Tips & Tricks
67112

68113
- **Mobile Redirects:** Check that the channel URL does not redirect to a mobile page with a different markup structure.
69114
- **`curl` and `pup`:** For static sites, use `curl` and `pup` to quickly find selectors: `curl URL | pup`.
70115
- **CSS Selectors:** For a comprehensive overview of CSS selectors, see the [W3C documentation](https://www.w3.org/TR/selectors-4/#overview).
71116

117+
---
118+
72119
## Still Stuck?
73120

74-
If you are still having issues, please [open an issue on GitHub](https://github.com/html2rss/html2rss/issues).
121+
- Join our [community discussions](https://github.com/orgs/html2rss/discussions)
122+
- [Open an issue on GitHub](https://github.com/html2rss/html2rss/issues)
123+
- Review the [deployment guide](/web-application/how-to/deployment) for production best practices

src/content/docs/web-application/how-to/deployment.mdx

Lines changed: 38 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,26 +3,55 @@ title: "Deployment & Production"
33
description: "Deploy html2rss-web to production with Docker. Learn best practices for hosting public instances with security, monitoring, and reliability."
44
---
55

6-
html2rss-web is published on Docker Hub, making it easy to deploy with Docker. The `docker-compose.yml` from our [Installation Guide](/web-application/getting-started) provides a solid foundation for both development and production use.
6+
html2rss-web is published on Docker Hub, making it easy to deploy with Docker. The [`docker-compose.yml`](https://github.com/html2rss/html2rss-web/blob/master/docker-compose.yml) from our [Installation Guide](/web-application/getting-started) provides a solid foundation for both development and production use.
77

88
## Quick Start
99

10-
If you've already set up html2rss-web locally, you're ready to deploy it to production. The same Docker configuration works for both environments.
10+
1. Create a directory for your instance:
11+
```bash
12+
mkdir html2rss-web && cd html2rss-web
13+
```
14+
2. Download the configuration:
15+
```bash
16+
curl -O https://raw.githubusercontent.com/html2rss/html2rss-web/master/docker-compose.yml
17+
curl -O https://raw.githubusercontent.com/html2rss/html2rss-web/master/config/feeds.yml
18+
```
19+
3. Start the instance:
20+
```bash
21+
docker compose up -d
22+
```
23+
4. Open [http://localhost:3000](http://localhost:3000) to verify it’s running.
24+
25+
> 📖 Need Docker? Follow the [Docker installation guide](https://docs.docker.com/get-docker/) and [Docker Compose install](https://docs.docker.com/compose/install/).
1126
1227
## Production Best Practices
1328

1429
When hosting a **public instance** that others will use, please follow these essential guidelines:
1530

16-
### Security Essentials
31+
### Security
1732

18-
- **Use a reverse proxy** (nginx, Apache, or Cloudflare) to handle SSL termination and rate limiting
19-
- **Enable HTTPS only** - redirect all HTTP traffic to HTTPS
33+
- **Use a reverse proxy** ([nginx](https://docs.nginx.com/nginx/admin-guide/web-server/reverse-proxy/), Apache, or Cloudflare) to handle SSL termination and rate limiting
34+
- **Enable HTTPS only** redirect all HTTP traffic to HTTPS ([certbot guide](https://certbot.eff.org/))
2035
- **Set strong passwords** for health check and auto-source authentication
2136
- **Restrict access** to admin endpoints and sensitive configuration
2237

38+
### HTTPS
39+
40+
Setting up HTTPS is crucial for any public instance. Follow these steps:
41+
42+
1. **Obtain SSL certificates** using [Let's Encrypt](https://letsencrypt.org/) with [Certbot](https://certbot.eff.org/)
43+
2. **Configure your reverse proxy** to handle SSL termination
44+
3. **Redirect all HTTP traffic** to HTTPS automatically
45+
4. **Test your setup** using tools like [SSL Labs](https://www.ssllabs.com/ssltest/)
46+
47+
For detailed implementation guides, see:
48+
- [Nginx SSL configuration](https://docs.nginx.com/nginx/admin-guide/security-controls/terminating-ssl-http/)
49+
- [Apache SSL setup](https://httpd.apache.org/docs/2.4/ssl/ssl_howto.html)
50+
- [Cloudflare SSL/TLS settings](https://developers.cloudflare.com/ssl/)
51+
2352
### Reliability & Monitoring
2453

25-
- **Enable auto-updates** using watchtower or similar tools
54+
- **Enable auto-updates** using [watchtower](https://containrrr.dev/watchtower/) or similar tools
2655
- **Monitor the health check endpoint** (`/health_check.txt`) to detect issues early
2756
- **Set up logging** to track errors and performance
2857
- **Use environment variables** for configuration instead of hardcoded values
@@ -31,7 +60,7 @@ When hosting a **public instance** that others will use, please follow these ess
3160

3261
- **Configure appropriate resource limits** for your Docker containers
3362
- **Use a CDN** for static assets if serving many users
34-
- **Monitor memory usage** - html2rss-web can be memory-intensive with large feeds
63+
- **Monitor memory usage** html2rss-web can be memory-intensive with large feeds
3564
- **Set up caching** for frequently accessed feeds
3665

3766
## Environment Configuration
@@ -47,6 +76,8 @@ environment:
4776
BASE_URL: https://your-domain.com
4877
```
4978
79+
Use a [password manager](https://bitwarden.com/password-generator/) to generate strong values.
80+
5081
## Share Your Instance
5182
5283
Once your instance is running smoothly:

0 commit comments

Comments
 (0)