Author: @mofanx
This guide covers two primary deployment methods: Docker and Node.js. Each approach has its advantages - choose the one that best fits your needs.
Docker deployment is the simplest method, requiring just two commands:
# Pull the image
docker pull ghcr.io/ccbikai/rss.beauty:main
# Run the container
docker run -d --name rss-beauty -p 4321:4321 ghcr.io/ccbikai/rss.beauty:main
Once deployed, access the site at http://localhost:4321
.
The Node.js deployment offers a lightweight alternative with enhanced customization and debugging capabilities. Here's the step-by-step process:
Ensure your system has the following software installed:
# Verify Node.js version (18.0.0 or higher required)
node --version
# Verify pnpm version (9.15.2 or higher required)
pnpm --version
If not installed:
- Node.js: Download from Node.js website
- pnpm: Install via
npm install -g pnpm
# Clone the repository
git clone https://github.com/ccbikai/RSS.Beauty.git
# Navigate to project directory
cd RSS.Beauty
# Install project dependencies
pnpm install
The project's astro.config.mjs
includes Node.js adapter configuration by default. For reference:
// Existing configuration - no modifications needed
const providers = {
// ... other adapters
node: node({
mode: 'standalone',
}),
}
export default defineConfig({
adapter: providers[adapterProvider] || providers.node, // Default to node adapter
// ...
})
# Build the project
pnpm build
# Run the built project with Node.js
node ./dist/server/entry.mjs
Access your site at http://localhost:4321
!
For production environments, PM2 is recommended for Node.js process management:
# Install PM2
npm install -g pm2
# Launch service with PM2
pm2 start ./dist/server/entry.mjs --name "rss-beauty"
# Enable startup service
pm2 startup
pm2 save
-
Choosing Your Approach
- Choose Docker for quick deployment or if you're unfamiliar with Node.js
- Choose Node.js for greater customization or lightweight deployment
-
Performance Optimization
- Configure Nginx as a reverse proxy
- Enable HTTPS
- Consider CDN for static assets
-
Key Considerations
- Ensure proper firewall port configuration
- Regularly update dependencies for security
- Implement logging and monitoring
After deployment, RSS.Beauty offers three methods to beautify any RSS feed:
Visit your deployed service (e.g., http://your-domain.com
or http://localhost:4321
), enter any RSS feed URL on the homepage for instant preview.
For RSS feed publishers, follow these steps to add RSS.Beauty styles:
-
Download Style Files
- RSS 2.0: Download from
http://your-domain.com/rss.xsl
- Atom: Download from
http://your-domain.com/atom.xsl
- RSS 2.0: Download from
-
Place style files in your static assets directory (must be same domain as RSS feed)
-
Add to your RSS file header (after
<?xml ... ?>
):<!-- For RSS 2.0 --> <?xml-stylesheet type="text/xsl" href="/path/to/rss.xsl"?> <!-- For Atom --> <?xml-stylesheet type="text/xsl" href="/path/to/atom.xsl"?>
If you can't host style files, use Base64 encoding:
- Select "Base64" tab on the website
- Copy the style reference code for your format (RSS or Atom)
- Insert after the
<?xml ...?>
declaration:
<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="data:text/xsl;base64,PD94bWw..."?>
<rss version="2.0">...</rss>
This method embeds styles directly in the RSS file without hosting requirements.
For immediate RSS feed beautification:
-
Use:
http://your-domain.com/rss?url=YOUR_RSS_URL
Example:http://your-domain.com/rss?url=https://example.com/feed.xml
-
The system automatically fetches and beautifies the RSS content
Ideal for:
- Unmodifiable RSS sources
- Quick preview purposes
- Sharing beautified RSS feeds
-
Beautify GitHub Release feeds:
http://your-domain.com/rss?url=https://github.com/username/project/releases.atom
-
Beautify blog RSS feeds:
http://your-domain.com/rss?url=https://your-blog.com/feed.xml
-
Cross-Origin Restrictions
- XSL files must share the RSS feed's domain when using file method
- No restrictions for Base64 or online methods
-
Performance Considerations
- Base64 method increases server load; implement caching
- Host style files on CDN for high-traffic sites
-
Compatibility
- Supports major RSS readers
- Mobile browser compatible
- Supports RSS 2.0 and Atom 1.0
To customize styles:
- Modify templates in
src/xsl/partials
- Update styles in
src/app.css
- Rebuild:
pnpm build
Copy these essential files to your server:
dist/ # Built files
package.json # Dependencies info
pnpm-lock.yaml # Version lock
# Install pnpm if needed
npm install -g pnpm
# Install production dependencies
pnpm install --prod --ignore-scripts
Two configuration methods:
# Listen on all interfaces
HOST=0.0.0.0 node ./dist/server/entry.mjs
# Specify port
HOST=0.0.0.0 PORT=4321 node ./dist/server/entry.mjs
- Install PM2:
npm install -g pm2
- Create
ecosystem.config.js
:
module.exports = {
apps: [{
name: 'rss-beauty',
script: './dist/server/entry.mjs',
instances: 'max',
exec_mode: 'cluster',
env: {
NODE_ENV: 'production',
HOST: '0.0.0.0',
PORT: 4321
}
}]
}
- Launch:
pm2 start ecosystem.config.js
- Enable startup (optional):
pm2 startup
pm2 save
- Local:
http://localhost:4321
- LAN:
http://your-lan-ip:4321
- Example:
http://192.168.1.100:4321
- Example:
-
Security
- Configure firewall properly
- Use localhost if LAN access isn't needed
- Use reverse proxy (e.g., Nginx) in production
-
Performance
- Utilize PM2 cluster mode for multi-core CPUs
- Implement caching strategies
-
Troubleshooting
- Check firewall settings if inaccessible
- Verify port 4321 availability
- Validate environment variables
-
Nginx Configuration Example
For Nginx reverse proxy:
server {
listen 80;
server_name your-domain.com;
location / {
proxy_pass http://localhost:4321;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection 'upgrade';
proxy_set_header Host $host;
proxy_cache_bypass $http_upgrade;
}
}