Setting up Selectel CDN
Selectel CDN—Russian provider with PoPs in Moscow, St. Petersburg, Amsterdam. Optimal for projects with Russian audience, works with Selectel Object Storage (S3 API compatible).
Connect CDN
- In Selectel panel → CDN → Create resource
- Specify origin server (your site URL)
- Get CNAME like
resource-id.cdn.selectel.ru - Add DNS:
cdn.example.ru → resource-id.cdn.selectel.ru
Or via API:
curl -X POST \
-H "X-Auth-Token: $SELECTEL_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"name": "example-assets",
"origin_protocol": "HTTPS",
"origins": [{"source": "example.ru", "backup": false}],
"options": {
"edge_cache_settings": {"enabled": true, "value": "2592000"},
"browser_cache_settings": {"enabled": true, "value": "31536000"}
}
}' \
https://api.selectel.ru/cdn/resources/
Object Storage as CDN origin
# Create public container in Object Storage (S3 API compatible)
aws s3 mb s3://example-assets \
--endpoint-url https://s3.selcdn.ru
# Upload files
aws s3 sync ./public/assets s3://example-assets/assets/ \
--endpoint-url https://s3.selcdn.ru \
--cache-control "public, max-age=31536000, immutable"
Laravel integration (S3 + CDN)
// config/filesystems.php
'selectel' => [
'driver' => 's3',
'key' => env('SELECTEL_KEY'),
'secret' => env('SELECTEL_SECRET'),
'bucket' => env('SELECTEL_BUCKET'),
'endpoint' => 'https://s3.selcdn.ru',
'url' => env('CDN_URL'),
],
// Upload via CDN
Storage::disk('selectel')->put(
'images/' . $filename,
$file->getContent(),
['CacheControl' => 'public, max-age=31536000']
);
Setup time: few hours for CNAME and Object Storage.







